on: [push, pull_request] name: lint jobs: check: name: Check (${{ matrix.os }}) strategy: fail-fast: false matrix: include: - target: i686-pc-windows-msvc os: windows-latest - target: x86_64-unknown-linux-gnu os: ubuntu-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v5 - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable with: target: ${{ matrix.target }} - name: Cache dependencies uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo check run: cargo check --target ${{ matrix.target }} test: name: Test (${{ matrix.os }}) strategy: fail-fast: false matrix: include: - target: i686-pc-windows-msvc os: windows-latest - target: x86_64-unknown-linux-gnu os: ubuntu-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v5 - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable with: target: ${{ matrix.target }} - name: Cache dependencies uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo test run: cargo test --target ${{ matrix.target }} lints: name: Lints (${{ matrix.os }}) strategy: fail-fast: false matrix: include: - target: i686-pc-windows-msvc os: windows-latest - target: x86_64-unknown-linux-gnu os: ubuntu-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v5 - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable with: target: ${{ matrix.target }} components: rustfmt, clippy - name: Cache dependencies uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo fmt run: cargo fmt --all -- --check - name: Run cargo clippy run: cargo clippy --target ${{ matrix.target }}