chore: Update workflows #28
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: Build and Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths-ignore: | |
| - 'LICENSE' | |
| - 'README.md' | |
| - 'RELEASE_CHECKLIST.md' | |
| pull_request: | |
| branches: [ "main" ] | |
| paths-ignore: | |
| - 'LICENSE' | |
| - 'README.md' | |
| - 'RELEASE_CHECKLIST.md' | |
| # Cancel in-progress runs when a new commit is pushed to the same branch/PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| name: Build and Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| include: | |
| - os: ubuntu-latest | |
| name: Linux | |
| - os: macos-latest | |
| name: macOS | |
| - os: windows-latest | |
| name: Windows | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Windows git setup | |
| if: matrix.os == 'windows-latest' | |
| run: git config --global core.autocrlf false | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| # Add a small unique value to key to avoid cache conflicts | |
| # between jobs | |
| key: ${{ matrix.os }} | |
| - name: Build | |
| run: cargo build --all --locked | |
| - name: Run tests | |
| run: cargo test --all |