Merge pull request #623 from yngve793/fix/python_binding #152
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 | |
| 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: "" | |
| - name: Benchmark current commit and compare | |
| uses: "./.github/actions/benchmark" | |
| with: | |
| ref: ${{ github.sha }} |