Rust Rewrite #340
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - README.md | |
| - LICENSE | |
| - doc/** | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - README.md | |
| - LICENSE | |
| - doc/** | |
| workflow_call: | |
| inputs: | |
| include-ignored: | |
| description: Set to true to include all ignored test, this will be longer | |
| type: boolean | |
| default: false | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Refers to | |
| # - https://github.com/actions/runner-images | |
| # - https://github.com/actions/partner-runner-images | |
| image: | |
| - ubuntu-24.04 | |
| - macos-15-intel | |
| - macos-15 | |
| - windows-2022 | |
| - ubuntu-24.04-arm | |
| name: Test ${{ matrix.image }} | |
| runs-on: ${{ matrix.image }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: cargo-registry | |
| - name: Cache cargo target | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: cargo-${{ matrix.image }}-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Build | |
| run: cargo build | |
| - name: Test | |
| if: ${{ !inputs.include-ignored }} | |
| run: cargo test | |
| - name: Test (include ignored) | |
| if: ${{ inputs.include-ignored }} | |
| run: cargo test -- --include-ignored | |
| - name: Doc | |
| run: cargo doc --no-deps |