11name : CI
22
3+ on : [push, pull_request]
4+
35concurrency :
46 group : ${{ github.workflow }}-${{ github.ref }}
57 cancel-in-progress : true
6- on : [push, pull_request]
78
89jobs :
10+ fmt :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ - uses : dtolnay/rust-toolchain@nightly
15+ with :
16+ components : rustfmt
17+ - name : Format code
18+ run : cargo fmt --all --check
19+
920 check :
1021 runs-on : ubuntu-latest
1122 strategy :
1223 fail-fast : false
1324 matrix :
14- targets : [x86_64-unknown-linux-gnu, x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none-softfloat]
25+ target :
26+ - x86_64-unknown-linux-gnu
27+ - x86_64-unknown-none
28+ - riscv64gc-unknown-none-elf
29+ - aarch64-unknown-none-softfloat
30+ - loongarch64-unknown-none-softfloat
1531 steps :
1632 - uses : actions/checkout@v4
1733 - uses : dtolnay/rust-toolchain@nightly
1834 with :
19- components : rust-src, clippy, rustfmt
20- targets : ${{ matrix.targets }}
21- - name : Check rust version
22- run : rustc --version --verbose
23- - name : Check code format
24- run : cargo fmt --all -- --check
35+ components : rust-src, clippy, rustfmt
36+ targets : ${{ matrix.target }}
2537 - name : Clippy
26- run : cargo clippy --target ${{ matrix.targets }} --all-features
38+ run : cargo clippy --target ${{ matrix.target }} --all-features
2739 - name : Unit test
28- if : ${{ matrix.targets == 'x86_64-unknown-linux-gnu' }}
29- run : cargo test --target ${{ matrix.targets }} -- --nocapture
40+ if : ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
41+ run : cargo test --target ${{ matrix.target }} -- --nocapture
42+
3043 doc :
3144 runs-on : ubuntu-latest
3245 steps :
4053 uses : actions/upload-pages-artifact@v3
4154 with :
4255 path : target/doc
56+
4357 deploy :
4458 runs-on : ubuntu-latest
4559 needs : doc
5468 steps :
5569 - name : Deploy to GitHub Pages
5670 id : deployment
57- uses : actions/deploy-pages@v4
71+ uses : actions/deploy-pages@v4
0 commit comments