817601a0f3
The prod-gating measurement (complex-query-bench: tuple-to-userset, chains, defeasible, comparators, OWA, nested fusion, mixed unions over cold traffic with binary parity) was committed but never ran in CI. The benchmark job now runs it alongside the possibilistic baseline compare, uploads the results artifact, and surfaces both in the run summary. Also: refreshed the committed .rigor-baseline.json (engine unchanged since the tag; the runner's canonical baseline lives in its artifact store), and added npm run benchmark:complex-query for local runs.
139 lines
4.5 KiB
YAML
139 lines
4.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
tags: ['v*']
|
|
pull_request:
|
|
branches: [master, main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
fetch-tags: true
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Auth for Gitea npm registry
|
|
run: |
|
|
echo "@rigor:registry=https://hub.kl1.tenere.ai/api/packages/Rigor/npm/" > .npmrc
|
|
echo "//hub.kl1.tenere.ai/api/packages/Rigor/npm/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc
|
|
echo "@tenere:registry=https://hub.kl1.tenere.ai/api/packages/Tenere/npm/" >> .npmrc
|
|
echo "//hub.kl1.tenere.ai/api/packages/Tenere/npm/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc
|
|
|
|
- run: npm ci
|
|
|
|
- name: Full suite
|
|
run: npm test
|
|
|
|
- name: Rigor campaigns
|
|
run: npm run test:rigor
|
|
|
|
benchmark:
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
fetch-tags: true
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Auth for Gitea npm registry
|
|
run: |
|
|
echo "@rigor:registry=https://hub.kl1.tenere.ai/api/packages/Rigor/npm/" > .npmrc
|
|
echo "//hub.kl1.tenere.ai/api/packages/Rigor/npm/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc
|
|
echo "@tenere:registry=https://hub.kl1.tenere.ai/api/packages/Tenere/npm/" >> .npmrc
|
|
echo "//hub.kl1.tenere.ai/api/packages/Tenere/npm/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc
|
|
|
|
- run: npm ci
|
|
|
|
- name: Download previous baseline
|
|
uses: dawidd6/action-download-artifact@v6
|
|
with:
|
|
name: baseline
|
|
path: .
|
|
continue-on-error: true
|
|
|
|
- name: Run benchmarks (compare against baseline)
|
|
run: node --expose-gc scripts/benchmark.js --json > bench-results.json
|
|
continue-on-error: true
|
|
|
|
- name: Run complex-query benchmarks (cold traffic, normal vs binary)
|
|
run: node --expose-gc benchmarks/complex-query-bench.js --size=25000 --samples=10000 > complex-query-results.json
|
|
continue-on-error: true
|
|
|
|
- name: Save baseline (on tag)
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
run: node --expose-gc scripts/benchmark.js --save
|
|
|
|
- name: Upload baseline artifact
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: baseline
|
|
path: .rigor-baseline.json
|
|
retention-days: 90
|
|
|
|
- name: Upload benchmark results
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: bench-results
|
|
path: |
|
|
bench-results.json
|
|
complex-query-results.json
|
|
retention-days: 30
|
|
|
|
- name: Benchmark summary
|
|
if: always()
|
|
run: |
|
|
echo '### Benchmark Results' >> $GITHUB_STEP_SUMMARY
|
|
if [ -f bench-results.json ]; then
|
|
echo '```json' >> $GITHUB_STEP_SUMMARY
|
|
cat bench-results.json >> $GITHUB_STEP_SUMMARY
|
|
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
fi
|
|
if [ -f complex-query-results.json ]; then
|
|
echo '### Complex-Query Results (cold traffic, normal vs binary)' >> $GITHUB_STEP_SUMMARY
|
|
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
cat complex-query-results.json >> $GITHUB_STEP_SUMMARY
|
|
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
fi
|
|
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
needs: [test, benchmark]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Auth for Gitea npm registry
|
|
run: |
|
|
echo "@rigor:registry=https://hub.kl1.tenere.ai/api/packages/Rigor/npm/" > .npmrc
|
|
echo "//hub.kl1.tenere.ai/api/packages/Rigor/npm/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc
|
|
echo "@tenere:registry=https://hub.kl1.tenere.ai/api/packages/Tenere/npm/" >> .npmrc
|
|
echo "//hub.kl1.tenere.ai/api/packages/Tenere/npm/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc
|
|
echo "@arbiter:registry=https://hub.kl1.tenere.ai/api/packages/Arbiter/npm/" >> .npmrc
|
|
echo "//hub.kl1.tenere.ai/api/packages/Arbiter/npm/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm publish
|