-
Notifications
You must be signed in to change notification settings - Fork 63
39 lines (38 loc) · 983 Bytes
/
build.yaml
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: Check
env:
CARGO_TERM_COLOR: always
on:
pull_request:
push:
branches:
- main
jobs:
check:
runs-on: ${{ matrix.os }}
env:
RUSTFLAGS: -D warnings
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install alsa and udev
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Load cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Check
run: cargo check --examples --workspace
- name: Format
run: cargo fmt --check
- name: Test
run: cargo test --workspace