11env :
22 RUST_STABLE_VER : " 1.87"
3-
3+
44name : CI
55
66on :
2323 toolchain : ${{ env.RUST_STABLE_VER }}
2424 components : rustfmt
2525
26- # For now, we only check `fearless_simd_gen`, since `fearless_simd` uses `prettyplease`.
2726 - name : cargo fmt
28- run : cd fearless_simd_gen && cargo fmt --check
27+ run : cargo fmt --all --check
28+
29+ clippy-stable :
30+ name : cargo clippy
31+ runs-on : ${{ matrix.os }}
32+ strategy :
33+ matrix :
34+ os : [windows-latest, macos-latest, ubuntu-latest]
35+ steps :
36+ - uses : actions/checkout@v4
37+
38+ - name : install stable toolchain
39+ uses : dtolnay/rust-toolchain@master
40+ with :
41+ toolchain : ${{ env.RUST_STABLE_VER }}
42+ targets : x86_64-unknown-none
43+ components : clippy
44+
45+ - name : install cargo-hack
46+ uses : taiki-e/install-action@v2
47+ with :
48+ tool : cargo-hack
49+
50+ - name : install native dependencies
51+ if : matrix.os == 'ubuntu-latest'
52+ run : sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
53+
54+ - name : restore cache
55+ uses : Swatinem/rust-cache@v2
56+ with :
57+ save-if : ${{ github.event_name != 'merge_group' }}
58+
59+ # TODO: Add back the suffix ` -- -D warnings` onto this command to make warnings errors.
60+ # Currently there are too many warnings to turn on this lint.
61+ - name : cargo clippy (no_std)
62+ run : cargo hack clippy -p fearless_simd --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features std,default,half --target x86_64-unknown-none
63+
64+ # TODO: Add back the suffix ` -- -D warnings` onto this command to make warnings errors.
65+ # Currently there are too many warnings to turn on this lint.
66+ - name : cargo clippy
67+ run : cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features std
68+
69+
70+ clippy-stable-wasm :
71+ name : cargo clippy (wasm32)
72+ runs-on : ubuntu-latest
73+ steps :
74+ - uses : actions/checkout@v4
75+
76+ - name : install stable toolchain
77+ uses : dtolnay/rust-toolchain@master
78+ with :
79+ toolchain : ${{ env.RUST_STABLE_VER }}
80+ targets : wasm32-unknown-unknown
81+ components : clippy
82+
83+ - name : install cargo-hack
84+ uses : taiki-e/install-action@v2
85+ with :
86+ tool : cargo-hack
87+
88+ - name : restore cache
89+ uses : Swatinem/rust-cache@v2
90+ with :
91+ save-if : ${{ github.event_name != 'merge_group' }}
92+
93+ # TODO: Add back the suffix ` -- -D warnings` onto this command to make warnings errors.
94+ # Currently there are too many warnings to turn on this lint.
95+ - name : cargo clippy (no_std)
96+ run : cargo hack clippy -p fearless_simd --locked --target wasm32-unknown-unknown --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features std,default,half
97+
98+ # TODO: Add back the suffix ` -- -D warnings` onto this command to make warnings errors.
99+ # Currently there are too many warnings to turn on this lint.
100+ - name : cargo clippy
101+ run : cargo hack clippy -p fearless_simd --locked --target wasm32-unknown-unknown --optional-deps --each-feature --ignore-unknown-features --features std
102+
29103
30104 test-stable :
31105 name : test
94168
95169 - name : cargo build
96170 run : cd fearless_simd && cargo build --no-default-features --features libm
171+
97172
0 commit comments