-
Notifications
You must be signed in to change notification settings - Fork 55
43 lines (31 loc) · 1.04 KB
/
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
41
42
43
on: [push, pull_request]
name: Rust
jobs:
fmt-crank-check-test:
name: format + check + test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.72.0
- name: install dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: cache
uses: Swatinem/rust-cache@v2
- name: fmt
run: cargo fmt --all -- --check
- name: install cargo-cranky
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-cranky
- name: check --all-features
run: cargo check --all-features --all-targets
- name: test doc-tests
run: cargo test --doc --all-features
- name: test
run: cargo test --all-features
- name: cranky
run: cargo cranky --all-targets --all-features -- -D warnings
- name: cranky --release
run: cargo cranky --all-targets --all-features --release -- -D warnings