[v2] feat(diagnostics): Check double override across definitions #1669
Workflow file for this run
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: "benchmark_npm" | |
| on: | |
| # Run using manual triggers from GitHub UI: | |
| # https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow | |
| workflow_dispatch: | |
| inputs: | |
| dryRun: | |
| description: "Attempt a local run and report results here, without updating the bencher dashboard." | |
| type: "boolean" | |
| required: true | |
| default: true | |
| bencherProject: | |
| description: "Bencher project:" | |
| type: "string" | |
| # Run on pushes to 'main' branch: | |
| push: | |
| branches: | |
| - "main" | |
| # Run on pull requests (smoke test always, full benchmark with 'ci:perf' label): | |
| pull_request: | |
| types: | |
| - "opened" | |
| - "synchronize" | |
| - "reopened" | |
| - "labeled" | |
| permissions: {} | |
| # Queue benchmark workflows for the same branch (main pushes queue for ordered results; PR runs cancel stale ones): | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref_name }}" | |
| cancel-in-progress: "${{ github.event_name == 'pull_request' }}" | |
| jobs: | |
| benchmark: | |
| runs-on: "ubuntu-24.04" # _SLANG_DEV_CONTAINER_BASE_IMAGE_ (keep in sync) | |
| permissions: | |
| contents: "read" | |
| pull-requests: "write" | |
| # Skip fork PRs (can't access BENCHER_API_TOKEN). For non-PR events, only run on the main repo. | |
| if: >- | |
| ${{ | |
| (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) | |
| || (github.event_name != 'pull_request' && (github.repository == 'NomicFoundation/slang' || inputs.dryRun == true)) | |
| }} | |
| steps: | |
| - name: "Checkout Repository" | |
| uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 # Full history is needed by 'git/restore-mtime' to find each file's last commit time. | |
| - name: "Free up disk space" | |
| uses: "./.github/actions/free-disk-space" | |
| - name: "Restore file mtimes from git" | |
| uses: "./.github/actions/git/restore-mtime" | |
| - name: "Restore Dependencies Cache" | |
| uses: "./.github/actions/cache/dependencies/restore" | |
| - name: "Restore Cargo Target Cache" | |
| uses: "./.github/actions/cache/cargo-target/restore" | |
| - name: "infra setup cargo npm" | |
| run: "./scripts/bin/infra setup cargo npm" | |
| - name: "infra check npm" | |
| run: "./scripts/bin/infra check npm" | |
| - name: "Smoke Test > infra perf npm --smoke" | |
| if: "${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci:perf') }}" | |
| run: "./scripts/bin/infra perf npm --smoke" | |
| - name: "Benchmark > infra perf npm" | |
| if: "${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:perf') }}" | |
| run: "./scripts/bin/infra perf npm ${{ github.event_name == 'pull_request' && '--pr-benchmark' || (inputs.dryRun == true && '--dry-run' || '') }}" | |
| env: | |
| SLANG_BENCHER_PROJECT: "${{ inputs.bencherProject }}" | |
| BENCHER_API_TOKEN: "${{ secrets.BENCHER_API_TOKEN }}" | |
| BENCHER_PR_HEAD_HASH: "${{ github.event.pull_request.head.sha }}" | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |