Benchmarks #273
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: Benchmarks | |
| permissions: {} | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| commit_ref: | |
| description: "optional: compare to specific ref" | |
| required: false | |
| jobs: | |
| benchmarks: | |
| name: Benchmark scripts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install cibuildwheel | |
| # old ref is incompatible with cmake 4.0.0, which is used in cbuildwheel > 2.23.2 | |
| # once default ref is updated, restriction can be removed | |
| run: python3 -m pip install cibuildwheel==2.23.2 | |
| - name: Install build/test dependencies | |
| working-directory: python | |
| run: | | |
| python3 -m pip install -r requirements-dev.txt | |
| - name: Set default benchmark reference | |
| run: echo "BENCHMARK_REF=142e45a2b941a1b603723c38882b193db1c1d968" >> $GITHUB_ENV | |
| - name: Set benchmark reference if defined by workflow_dispatch | |
| if: github.event.inputs.commit_ref != '' | |
| run: echo "BENCHMARK_REF=${{ github.event.inputs.commit_ref }}" >> $GITHUB_ENV | |
| - name: Benchmark old commit | |
| uses: "./.github/actions/benchmark" | |
| with: | |
| ref: ${{ env.BENCHMARK_REF }} | |
| compare: "" | |
| # Head of repository is incompatible with cibuildwheel < 3.0.0 due to | |
| # using the "test-sources" feature in pyproject.toml | |
| - name: Update cibuildwheel for new commit | |
| run: python3 -m pip install --upgrade cibuildwheel | |
| - name: Benchmark current commit and compare | |
| uses: "./.github/actions/benchmark" | |
| with: | |
| ref: ${{ github.sha }} |