-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (45 loc) · 1.34 KB
/
ci.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
41
42
43
44
45
46
47
48
49
50
name: CI
on:
pull_request:
branches: ["main"]
types: [opened, synchronize, reopened]
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: install libasound2-dev
run: |
sudo apt-get update
sudo apt-get install libasound2-dev
- name: Set up Rust
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} && rustup component add rustfmt && rustup component add clippy
- name: Print Rust version
run: rustc --version
- name: Formatter
run: cargo fmt -- --check
- name: Build
run: cargo build --verbose
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo test --verbose
- name: Run examples
run: |
cargo build --example beep
cargo build --example beep_imaadpcm
cargo build --example beep_imaadpcm_stereo
cargo build --example print_sample_values
cargo build --example read_wav_no_std
cargo build --example read_ima_adpcm_no_std