-
Notifications
You must be signed in to change notification settings - Fork 18
40 lines (37 loc) · 983 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
40
name: Rust
on:
push:
branches: [debug, main, release]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
build:
strategy:
matrix:
toolchain: [stable, nightly]
os: [windows-latest, ubuntu-latest, macos-latest]
exclude:
- os: macos-latest
toolchain: nightly
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
components: rustfmt, clippy
toolchain: ${{ matrix.toolchain }}
- name: fmt
if: matrix.toolchain == 'nightly'
run: cargo fmt --all -- --check
- name: check
run: cargo check
- name: update & install
if: runner.os == 'linux'
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: build & test
run: cargo test --verbose
- name: clippy
run: cargo clippy --all