-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (35 loc) · 970 Bytes
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Rust
on:
push:
branches: ["master"]
pull_request:
branches: ["*"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies Ubuntu
if: ${{contains(runner.os,'Linux')}}
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ncurses-dev libncursesw5-dev libgtk-3-dev
- name: Install Dependencies Mac
if: ${{contains(runner.os,'macOS')}}
run: |
brew install cairo gtk+3
rustup component add rustfmt clippy --toolchain stable-x86_64-apple-darwin
- name: Lint
run: |
cargo fmt -- --check
cargo clippy -- -D warnings
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose