diff --git a/.github/workflows/bench-publish-gh-pages.yaml b/.github/workflows/bench-publish-gh-pages.yaml deleted file mode 100644 index 730cb676..00000000 --- a/.github/workflows/bench-publish-gh-pages.yaml +++ /dev/null @@ -1,115 +0,0 @@ -name: Publish Bench JSON to gh-pages - -on: - workflow_run: - workflows: ["Benchmark Pull Requests"] - types: [completed] - workflow_dispatch: # just for now, for debug - -concurrency: - group: gh-pages-bench-publish - cancel-in-progress: false - -permissions: - actions: read - contents: write - -jobs: - publish: - if: ${{ github.event.workflow_run.conclusion == 'success' }} # for now, only publish if the benchmark workflow succeeded. In the future, we might want to publish even on failure to track regressions. - # ${{ github.event.workflow_run.conclusion == 'success' && - # github.event.workflow_run.event == 'pull_request' }} - runs-on: ubuntu-latest - steps: - - name: Debug list run artifacts - env: - GH_TOKEN: ${{ github.token }} - REPO: ${{ github.repository }} - RUN_ID: ${{ github.event.workflow_run.id }} - run: | - set -euo pipefail - echo "Listing artifacts for $REPO run_id=$RUN_ID" - gh api "/repos/$REPO/actions/runs/$RUN_ID/artifacts" \ - --jq '.artifacts[] | {name, expired, size_in_bytes, updated_at}' - - - name: Download benchmark artifact - uses: actions/download-artifact@v4 - with: - github-token: ${{ github.token }} - repository: ${{ github.repository }} - run-id: ${{ github.event.workflow_run.id }} - name: bench-current - path: ./artifact - - - name: Checkout gh-pages - uses: actions/checkout@v6 - with: - ref: gh-pages - - - name: Update benchmark JSON file - run: | - set -euo pipefail - mkdir -p dev/bench - node <<'NODE' - const fs = require('fs'); - const path = require('path'); - - const incomingPath = path.join('artifact', 'bench-current.json'); - const destPath = path.join('dev', 'bench', 'pr-benchmarks.json'); - - const incoming = JSON.parse(fs.readFileSync(incomingPath, 'utf8')); - const headSha = incoming?.head?.sha; - const prNumber = incoming?.pr_number; - - let existingRaw = null; - let existingWasArray = false; - let items = []; - if (fs.existsSync(destPath)) { - try { - existingRaw = JSON.parse(fs.readFileSync(destPath, 'utf8')); - } catch { - existingRaw = null; - } - } - - if (Array.isArray(existingRaw)) { - existingWasArray = true; - items = existingRaw; - } else if (existingRaw && typeof existingRaw === 'object') { - if (Array.isArray(existingRaw.items)) items = existingRaw.items; - else if (Array.isArray(existingRaw.entries)) items = existingRaw.entries; - else items = []; - } - - const isSameEntry = (e) => e && e.head && e.head.sha === headSha && e.pr_number === prNumber; - const filtered = items.filter((e) => !isSameEntry(e)); - filtered.push(incoming); - - // Keep file from growing without bound: keep newest 200 entries - const trimmed = filtered.slice(-200); - - if (existingWasArray) { - fs.writeFileSync(destPath, JSON.stringify(trimmed, null, 2)); - } else { - const out = (existingRaw && typeof existingRaw === 'object' && !Array.isArray(existingRaw)) - ? { ...existingRaw } - : { version: 1 }; - out.last_update = new Date().toISOString(); - out.items = trimmed; - fs.writeFileSync(destPath, JSON.stringify(out, null, 2)); - } - console.log(`Updated ${destPath} with sha=${headSha} pr=${prNumber}`); - NODE - - - name: Commit and push - run: | - set -euo pipefail - if git diff --quiet; then - echo "No changes to publish" - exit 0 - fi - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add dev/bench/pr-benchmarks.json - git commit -m "bench: update PR benchmarks" - git push origin gh-pages diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml deleted file mode 100644 index 1ad7aead..00000000 --- a/.github/workflows/docs.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# Derived from: https://github.com/actions/starter-workflows/blob/main/pages/mdbook.yml -# -name: Deploy doc to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: main - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - # Build job - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Setup environment - uses: ./.github/actions/setup-env - - - name: Build docs - run: mise run docs - - - name: Setup Pages - id: pages - uses: actions/configure-pages@v5 - - - name: Upload artifact - uses: actions/upload-pages-artifact@v4 - with: - path: ./website - - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/scripts/index.html b/scripts/index.html new file mode 100644 index 00000000..c220773e --- /dev/null +++ b/scripts/index.html @@ -0,0 +1,663 @@ + + + + + + IXA Bench History + + + + +
+

IXA benchmark history

+
Loading…
+
+ +
+
+ + + + + + + + + +
+ +
+
+

Time series

+
+
+
+ +
+

Latest vs previous (percent change)

+
+
+
+
+ + +
+ + + + +