Add missing features and target flag to clippy and test in CI #441
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: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
fmt: | |
name: Check formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Check Formatting | |
run: cargo fmt -- --check | |
ci: | |
needs: ["fmt"] | |
strategy: | |
matrix: | |
include: | |
- name: Windows x86_64 | |
runner-os: windows-latest | |
cargo-target: x86_64-pc-windows-msvc | |
- name: Linux x86_64 | |
runner-os: ubuntu-latest | |
cargo-target: x86_64-unknown-linux-gnu | |
- name: Linux aarch64 | |
runner-os: ubuntu-latest | |
cargo-target: aarch64-unknown-linux-gnu | |
- name: macOS x86_64 | |
runner-os: macos-latest | |
cargo-target: x86_64-apple-darwin | |
- name: macOS aarch64 | |
runner-os: macos-latest | |
cargo-target: aarch64-apple-darwin | |
name: CI - ${{ matrix.name }} | |
runs-on: ${{ matrix.runner-os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
targets: ${{ matrix.cargo-target }} | |
- name: Install build tooling (aarch64-unknown-linux-gnu) | |
if: matrix.cargo-target == 'aarch64-unknown-linux-gnu' | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y musl-tools clang llvm | |
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
- name: Build | |
run: | | |
cargo build \ | |
--locked --all-features \ | |
--target ${{ matrix.cargo-target }} | |
- name: Lint | |
run: | | |
cargo clippy \ | |
--locked --all-features \ | |
--target ${{ matrix.cargo-target }} | |
- name: Test | |
run: | | |
cargo test \ | |
--locked --all-features \ | |
--target ${{ matrix.cargo-target }} |