Don't build on CI, but check MSRV #8
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: CI | |
| on: | |
| push: | |
| workflow_dispatch: | |
| env: | |
| CI: 1 | |
| jobs: | |
| clippy: | |
| name: Clippy validation${{ matrix.all-features && ' with all features' || '' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| all-features: [ false, true ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Install Rust with clippy | |
| uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| cache: false | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5 | |
| with: | |
| prefix-key: v1-rust | |
| key: all-features-${{ matrix.all-features }} | |
| cache-on-failure: true | |
| - name: Run clippy | |
| uses: clechasseur/rs-clippy-check@50a0fd6f2f1a33307d603ee50d91eadbb2561120 # v3.0.6 | |
| with: | |
| args: --workspace --all-targets ${{ matrix.all-features && '--all-features' || '' }} -- -D warnings | |
| fmt: | |
| name: Rustfmt check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Install Rust nightly with rustfmt | |
| uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| cache: false | |
| - name: Run Rustfmt | |
| uses: clechasseur/rs-fmt-check@62d371a9fa3c950fbb4a54cfdc587d96b4e0293a # v2.0.6 | |
| with: | |
| args: --all | |
| msrv-check: | |
| name: MSRV check for Rust ${{ matrix.toolchain }} on ${{ matrix.os }}${{ matrix.all-features && ' with all features' || '' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| toolchain: [ 1.70.0 ] | |
| os: [ ubuntu, macos, windows ] | |
| all-features: [ false, true ] | |
| runs-on: ${{ matrix.os }}-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Install Rust nightly and ${{ matrix.toolchain }} | |
| uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | |
| with: | |
| toolchain: nightly,${{ matrix.toolchain }} | |
| cache: false | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5 | |
| with: | |
| prefix-key: v8-rust | |
| key: all-features-${{ matrix.all-features }} | |
| cache-on-failure: true | |
| - name: Run checks | |
| uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386 # v2.0.6 | |
| with: | |
| command: check | |
| args: --workspace ${{ matrix.all-features && '--all-features' || '' }} |