Merge pull request #661 from achaikou/after_release_updates #296
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 | |
| run: python3 -m pip install cibuildwheel | |
| - 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=88ffaa6c3f33e3085948127740b2eb1e797fa73f" >> $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 }} |