chore: release v0.13.4 #3533
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: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "ci-${{ github.ref }}" | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| msrv: | |
| name: Minimum supported Rust version | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - name: Read MSRV from Cargo.toml | |
| id: msrv | |
| run: | | |
| msrv="$(sed -n 's/^rust-version[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' Cargo.toml)" | |
| test -n "$msrv" | |
| echo "version=$msrv" >> "$GITHUB_OUTPUT" | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 | |
| with: | |
| toolchain: ${{ steps.msrv.outputs.version }} | |
| - name: Check with MSRV | |
| run: cargo check --all-targets --all-features --locked | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - name: Use Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e | |
| with: | |
| node-version: latest | |
| cache: "npm" | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 | |
| with: | |
| toolchain: nightly,stable | |
| components: rustfmt,clippy | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check formatting | |
| run: npm run format:check | |
| - name: Check for typos | |
| uses: crate-ci/typos@aca895bf05aec0cb7dffa6f94495e923224d9f17 | |
| with: | |
| config: ./typos.toml | |
| - name: Lint | |
| run: cargo clippy --all-features | |
| - name: Build | |
| run: cargo build --all-targets --all-features | |
| - name: Run tests | |
| run: cargo test --all-features | |
| - name: Check generated files are up to date | |
| run: | | |
| npm run generate | |
| git diff --exit-code || (echo "Generated files are out of date. Run 'npm run generate' and commit the changes." && exit 1) | |
| rust-changes: | |
| name: Detect Rust changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| changed: ${{ steps.rust-changes.outputs.changed }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Check for Rust file changes | |
| id: rust-changes | |
| env: | |
| EVENT_NAME: ${{ github.event_name }} | |
| BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} | |
| HEAD_SHA: ${{ github.sha }} | |
| run: | | |
| if [ "$EVENT_NAME" = "workflow_dispatch" ]; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| if [ "$BASE_SHA" = "0000000000000000000000000000000000000000" ]; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| if git diff --name-only "$BASE_SHA" "$HEAD_SHA" | grep -Eq '(^|/)(Cargo\.toml|Cargo\.lock)$|\.rs$'; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| feature-powerset: | |
| name: Feature powerset (${{ matrix.partition }}) | |
| needs: rust-changes | |
| if: needs.rust-changes.outputs.changed == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| partition: ["1/4", "2/4", "3/4", "4/4"] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| persist-credentials: false | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 | |
| with: | |
| toolchain: stable | |
| - name: Install cargo-hack | |
| uses: taiki-e/install-action@b550161ef8a7bc4f2a671c0b03a18ac9ccedea1e | |
| with: | |
| tool: cargo-hack | |
| - name: Check feature powerset | |
| # `unstable` is an aggregate alias for the individual unstable_* features, | |
| # so excluding it avoids duplicate combinations. Limit the powerset to | |
| # feature pairs to keep CI practical; the regular CI all-features build | |
| # still covers the all-on case. | |
| run: cargo hack --locked check --feature-powerset --exclude-features unstable --no-dev-deps --depth 2 --partition ${{ matrix.partition }} |