Use cfg-elif
#8401
Workflow file for this run
This file contains 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: bench | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: bench-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
interpret: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-15 | |
options: | |
- | |
- -d | |
exclude: | |
- os: ${{ github.ref == 'refs/heads/main' && 'none' || 'macos-15' }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- run: tools/bench.sh ${{ matrix.options }} | |
codspeed: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- run: cargo install --features vendored-openssl cargo-codspeed | |
- run: cargo codspeed build | |
- uses: codspeedhq/action@v3 | |
with: | |
run: cargo codspeed run | |
token: ${{ secrets.CODSPEED_TOKEN }} | |
bench: | |
needs: | |
- interpret | |
- codspeed | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- run: for result in ${{ join(needs.*.result, ' ') }}; do [ $result = success ]; done |