Add MSRV checks to CI #3631
Workflow file for this run
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: Rust | |
| on: | |
| push: | |
| branches-ignore: | |
| - master | |
| - 'gh-readonly-queue/**' | |
| paths-ignore: | |
| - '**.md' | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| merge_group: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - name: windows-latest | |
| runs-on: [self-hosted, Windows, 25.05] | |
| self-hosted: true | |
| shell: wsl -e wsl-bash {0} | |
| target: x86_64-pc-windows-msvc | |
| - name: ubuntu-latest | |
| runs-on: ubuntu-latest | |
| self-hosted: false | |
| shell: bash | |
| target: x86_64-unknown-linux-gnu | |
| - name: macos-latest | |
| runs-on: macos-latest | |
| self-hosted: false | |
| shell: bash | |
| target: aarch64-apple-darwin | |
| fail-fast: false | |
| name: build / ${{ matrix.name }} | |
| runs-on: ${{ matrix.runs-on }} | |
| defaults: | |
| run: | |
| shell: ${{ matrix.shell }} | |
| env: | |
| common_args: --target ${{ matrix.target }} --profile CI --color always --verbose | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| if: ${{ ! matrix.self-hosted }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ${{ matrix.name }} | |
| - name: Run clippy | |
| run: nix develop .#CI -c cargo clippy ${{ env.common_args }} -- -Dwarnings | |
| - name: Build tests | |
| run: nix develop .#CI -c cargo build ${{ env.common_args }} --tests | |
| - name: Run tests | |
| run: nix develop .#CI -c cargo test ${{ env.common_args }} | |
| - name: Build examples | |
| run: nix develop .#CI -c cargo build ${{ env.common_args }} --bins | |
| msrv: | |
| strategy: | |
| matrix: | |
| include: | |
| - name: windows-latest | |
| runs-on: [self-hosted, Windows, 25.05] | |
| self-hosted: true | |
| shell: wsl -e wsl-bash {0} | |
| target: x86_64-pc-windows-msvc | |
| - name: ubuntu-latest | |
| runs-on: ubuntu-latest | |
| self-hosted: false | |
| shell: bash | |
| target: x86_64-unknown-linux-gnu | |
| - name: macos-latest | |
| runs-on: macos-latest | |
| self-hosted: false | |
| shell: bash | |
| target: aarch64-apple-darwin | |
| fail-fast: false | |
| name: msrv / ${{ matrix.name }} | |
| runs-on: ${{ matrix.runs-on }} | |
| defaults: | |
| run: | |
| shell: ${{ matrix.shell }} | |
| env: | |
| common_args: --target ${{ matrix.target }} --profile CI --color always --verbose | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| if: ${{ ! matrix.self-hosted }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ${{ matrix.name }}-msrv | |
| - name: Build libraries | |
| run: nix develop .#CI-MSRV -c cargo build ${{ env.common_args }} --lib | |
| fmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| - name: Run fmt check | |
| run: nix develop .#CI -c cargo fmt --check | |
| typos: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| - name: Run typos | |
| run: nix develop .#CI -c typos |