fix: pin all 8 quality-gate benchmark repos to baseline SHAs #4
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: Quality Gate | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| quality-gate: | |
| name: Compression Quality Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-qg-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo-qg- | |
| # Node is required for express npm test / npm audit / npm ls | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| # Benchmark repos are pinned to the exact SHAs baseline.json was | |
| # generated against — unpinned HEADs drift and produce false | |
| # compression regressions. Cached so later runs skip the clones. | |
| - name: Cache benchmark repos | |
| uses: actions/cache@v4 | |
| with: | |
| path: ccr-eval/benchmarks/repos | |
| key: qg-repos-8e022edc-916edab5-2ac89889-d3ffc998-ef95886e-8eb5cb9f-8e731906-7df0edd4 | |
| - name: Clone benchmark repos (pinned) | |
| run: | | |
| set -euo pipefail | |
| mkdir -p ccr-eval/benchmarks/repos | |
| cd ccr-eval/benchmarks/repos | |
| while read -r name url sha; do | |
| if [ -d "$name/.git" ]; then | |
| echo "$name already present (cache hit), skipping" | |
| continue | |
| fi | |
| git init -q "$name" | |
| git -C "$name" remote add origin "$url" | |
| git -C "$name" fetch --depth=50 origin "$sha" | |
| git -C "$name" checkout -q --detach FETCH_HEAD | |
| done <<'EOF' | |
| express https://github.com/expressjs/express.git 8e022edc9185f540a3fcecaf5e56b850d919cdac | |
| fastapi https://github.com/fastapi/fastapi.git 916edab52685d6275f67017aab9905cabd8b9cae | |
| flask https://github.com/pallets/flask.git 2ac89889f4cc330eabd50f295dcef02828522c69 | |
| gin https://github.com/gin-gonic/gin.git d3ffc9985281dcf4d3bef604cce4e662b1a327a6 | |
| rails https://github.com/rails/rails.git ef95886ef996db20ddc05f2d1c8c7342b05121e6 | |
| rust-analyzer https://github.com/rust-lang/rust-analyzer.git 8eb5cb9fcc8a016ecdfe900b7ff2671c4b94cb9f | |
| svelte https://github.com/sveltejs/svelte.git 8e7319063aa609cca2cbf8cdf1958e5392dd2fa0 | |
| vue-core https://github.com/vuejs/core.git 7df0edd46c1636751750588d8db2fafd2ef68443 | |
| EOF | |
| - name: Install express dependencies | |
| run: npm install --prefer-offline | |
| working-directory: ccr-eval/benchmarks/repos/express | |
| # Debug build is intentional: compression logic is identical to release, | |
| # and the latency gate is soft-only (warn, never fail), so the slower | |
| # debug binary does not cause false failures. | |
| - name: Build panda | |
| run: cargo build -p panda | |
| - name: Run quality gate | |
| run: | | |
| python3 ccr-eval/benchmarks/quality_gate.py \ | |
| --panda target/debug/panda \ | |
| --baseline ccr-eval/benchmarks/baseline.json \ | |
| --ci \ | |
| --report-dir /tmp/qg-report | |
| # Always upload the report so per-command deltas are visible | |
| # on every run — pass or fail. | |
| - name: Upload report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: quality-gate-report-${{ github.run_number }} | |
| path: /tmp/qg-report/ | |
| retention-days: 90 |