Merge pull request #1 from os-checker/fix-diagnostics #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Check CI | |
on: [push, pull_request] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust-toolchain: [nightly] | |
targets: [aarch64-unknown-none-softfloat, x86_64-unknown-linux-gnu] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
components: rust-src, clippy, rustfmt | |
targets: ${{ matrix.targets }} | |
- name: Check rust version | |
run: rustc --version --verbose | |
- name: Check code format | |
run: cargo fmt --all -- --check | |
- name: Clippy | |
run: cargo clippy --target ${{ matrix.targets }} --all-features -- -D warnings | |
- name: Build | |
run: cargo build --target aarch64-unknown-none-softfloat --all-features | |
if: ${{ matrix.targets == 'aarch64-unknown-none-softfloat' }} | |
- name: Unit test | |
if: ${{ matrix.targets == 'x86_64-unknown-linux-gnu' }} | |
run: cargo test --target ${{ matrix.targets }} -- --nocapture |