diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2973a6c..00cdb98 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,84 +4,98 @@ 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 - continue-on-error: true - name: Check runs-on: ${{ matrix.os }} steps: - - name: Checkout sources - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable with: - toolchain: stable + 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 - uses: clechasseur/rs-cargo@v2 - with: - command: 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 - continue-on-error: true - name: Test Suite runs-on: ${{ matrix.os }} steps: - - name: Checkout sources - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable with: - toolchain: stable + 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 - uses: clechasseur/rs-cargo@v2 - with: - command: 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 - continue-on-error: true - name: Lints runs-on: ${{ matrix.os }} steps: - - name: Checkout sources - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable with: - toolchain: stable + target: ${{ matrix.target }} components: rustfmt, clippy - - name: Run cargo fmt - uses: clechasseur/rs-cargo@v2 + - name: Cache dependencies + uses: actions/cache@v4 with: - command: fmt - args: --all -- --check + 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 - uses: clechasseur/rs-cargo@v2 - with: - command: clippy - args: -- -D warnings + run: cargo clippy --target ${{ matrix.target }} -- -D warnings