chore(main): release 0.3.9 (#57) #145
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] | |
| merge_group: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_BUILD_JOBS: 2 | |
| CARGO_INCREMENTAL: 0 | |
| jobs: | |
| flake: | |
| name: Nix flake check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| max-jobs = 2 | |
| cores = 2 | |
| - uses: cachix/cachix-action@38b082610b782e7e93e209c35fd730d399dee866 # v17 | |
| with: | |
| name: nix-community | |
| skipPush: true | |
| - name: Check flake and static quality rules | |
| run: nix flake check --no-update-lock-file --max-jobs 2 --cores 2 | |
| bazel: | |
| name: Bazel test suite | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| max-jobs = 2 | |
| cores = 2 | |
| - uses: cachix/cachix-action@38b082610b782e7e93e209c35fd730d399dee866 # v17 | |
| with: | |
| name: nix-community | |
| skipPush: true | |
| - name: Run authoritative tests | |
| run: nix develop --command bazel test //:all_tests | |
| rust: | |
| name: Cargo fmt, Clippy and rustdoc | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| max-jobs = 2 | |
| cores = 2 | |
| - name: Run Rust quality gates | |
| run: nix develop --command tools/quality/quality.sh rust | |
| node-generated: | |
| name: Node.js generated files | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| max-jobs = 2 | |
| cores = 2 | |
| - name: Regenerate the NAPI-RS loader and declarations | |
| working-directory: bindings/nodejs | |
| run: nix develop ../.. --command npm ci | |
| - name: Check generated files for drift | |
| working-directory: bindings/nodejs | |
| run: | | |
| nix develop ../.. --command npm run build | |
| git diff --exit-code -- index.js index.d.ts | |
| coverage: | |
| name: stdbr-core coverage | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| max-jobs = 2 | |
| cores = 2 | |
| - name: Enforce stdbr-core line coverage | |
| run: nix develop --command tools/quality/quality.sh coverage | |
| fuzz-build: | |
| name: Compile fuzz targets | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| max-jobs = 2 | |
| cores = 2 | |
| - name: Compile fuzz targets with nightly Rust | |
| run: nix develop --command tools/quality/quality.sh fuzz-build | |
| compatibility: | |
| name: MSRV 1.85 and no_std | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| max-jobs = 2 | |
| cores = 2 | |
| - name: Check minimum supported Rust version | |
| run: nix develop --command tools/quality/quality.sh msrv | |
| - name: Check no_std facade and core | |
| run: nix develop --command tools/quality/quality.sh no-std | |
| audit: | |
| name: Dependency audit | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| max-jobs = 2 | |
| cores = 2 | |
| - name: Audit locked dependencies | |
| run: nix develop --command tools/quality/quality.sh audit | |
| semver: | |
| name: Semver compatibility | |
| if: github.event_name != 'push' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 | |
| - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| max-jobs = 2 | |
| cores = 2 | |
| - name: Check published Rust API compatibility | |
| run: nix develop --command tools/quality/quality.sh semver | |
| required: | |
| name: Build & Test | |
| if: always() | |
| needs: | |
| - flake | |
| - bazel | |
| - rust | |
| - node-generated | |
| - coverage | |
| - fuzz-build | |
| - compatibility | |
| - audit | |
| - semver | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Require every quality gate | |
| env: | |
| EVENT_NAME: ${{ github.event_name }} | |
| FLAKE_RESULT: ${{ needs.flake.result }} | |
| BAZEL_RESULT: ${{ needs.bazel.result }} | |
| RUST_RESULT: ${{ needs.rust.result }} | |
| NODE_GENERATED_RESULT: ${{ needs['node-generated'].result }} | |
| COVERAGE_RESULT: ${{ needs.coverage.result }} | |
| FUZZ_RESULT: ${{ needs['fuzz-build'].result }} | |
| COMPATIBILITY_RESULT: ${{ needs.compatibility.result }} | |
| AUDIT_RESULT: ${{ needs.audit.result }} | |
| SEMVER_RESULT: ${{ needs.semver.result }} | |
| run: | | |
| set -euo pipefail | |
| for result in \ | |
| "$FLAKE_RESULT" \ | |
| "$BAZEL_RESULT" \ | |
| "$RUST_RESULT" \ | |
| "$NODE_GENERATED_RESULT" \ | |
| "$COVERAGE_RESULT" \ | |
| "$FUZZ_RESULT" \ | |
| "$COMPATIBILITY_RESULT" \ | |
| "$AUDIT_RESULT"; do | |
| if [[ "$result" != success ]]; then | |
| echo "required quality gate finished with: $result" >&2 | |
| exit 1 | |
| fi | |
| done | |
| if [[ "$SEMVER_RESULT" != success ]] && \ | |
| [[ ! ("$EVENT_NAME" == push && "$SEMVER_RESULT" == skipped) ]]; then | |
| echo "semver gate finished with: $SEMVER_RESULT" >&2 | |
| exit 1 | |
| fi |