build: Bump actions/checkout from 4 to 5 (#52) #132
This file contains hidden or 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: cargo-test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-Dwarnings" | |
| jobs: | |
| test: | |
| name: ${{ matrix.target }} / ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false # Don't cancel all jobs if one fails | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-24.04 | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-24.04-arm | |
| - target: x86_64-unknown-linux-musl | |
| os: ubuntu-24.04 | |
| setup: | | |
| sudo apt-get install -y musl-tools | |
| - target: aarch64-unknown-linux-musl | |
| os: ubuntu-24.04-arm | |
| setup: | | |
| sudo apt-get install -y musl-tools | |
| - target: x86_64-apple-darwin | |
| os: macos-13 | |
| - target: aarch64-apple-darwin | |
| os: macos-15 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "v0-${{ matrix.target }}" | |
| - name: Install dependencies | |
| if: matrix.setup != null && startsWith(matrix.os, 'ubuntu') | |
| run: ${{ matrix.setup }} | |
| shell: bash | |
| # Run build & test separately so that their time can be measured individually | |
| - run: cargo build --verbose --target ${{ matrix.target }} | |
| - run: cargo test --verbose --target ${{ matrix.target }} |