Skip to content

Parse constant queries without synthetic declarations #196

Parse constant queries without synthetic declarations

Parse constant queries without synthetic declarations #196

Workflow file for this run

name: Benchmarks
on:
pull_request:
paths:
- "Cargo.toml"
- "Cargo.lock"
- "crates/**"
- "corpus/manifest.json"
- "scripts/prepare_corpus.py"
- ".github/workflows/benchmarks.yml"
push:
branches: [main]
workflow_dispatch:
permissions: {}
concurrency:
group: benchmarks-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmarks:
name: Instrumented benchmarks
runs-on: ${{ github.repository_owner == 'astral-sh' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-24.04' }}
timeout-minutes: 30
permissions:
contents: read
id-token: write # OIDC authentication with CodSpeed
env:
CARGO_INCREMENTAL: "0"
CARGO_TERM_COLOR: always
SOURCE_DATE_EPOCH: "0"
TOUCAN_BENCH_CORPUS: corpus/cache/prepared.json
TOUCAN_BENCH_CLANG_INCLUDE: /usr/lib/llvm-18/lib/clang/18/include
steps:
- name: Check out the source
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@d1031067263f94b142dd6c0ce24c5eb9d02d52a0
with:
toolchain: "1.96.0"
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
shared-key: codspeed
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install native build prerequisites
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends clang-18 cmake python3.12 tcl
- name: Prepare the four pinned libraries
env:
GH_TOKEN: ${{ github.token }}
run: python3.12 scripts/prepare_corpus.py --cache corpus/cache --gh gh --jobs 2 --workers 2
- name: Install CodSpeed
run: cargo install cargo-codspeed --version 5.0.1 --locked
- name: Build benchmarks
run: cargo codspeed build -m simulation -m memory --features codspeed --profile profiling -p toucan_benchmark --bench bindings --locked
- name: Run benchmarks
uses: CodSpeedHQ/action@4296e51e7041e24dadb86d1d6e8b9320d223dbe8 # v5.0.3
with:
mode: simulation,memory
run: cargo codspeed run