Skip to content

fix(tokenizer)!: Fix underscore separator with scientific notation #15

fix(tokenizer)!: Fix underscore separator with scientific notation

fix(tokenizer)!: Fix underscore separator with scientific notation #15

name: Benchmark Rust tokenizer changes
on:
pull_request:
paths:
- 'sqlglotrs/**'
jobs:
run-benchmark:
name: run benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Python for benchmarks
run: |
sudo apt-get update
sudo apt-get install -y python3-dev
# Get the exact Python linking flags from python3-config
PYTHON_LDFLAGS=$(python3-config --ldflags --embed 2>/dev/null || python3-config --ldflags)
echo "Python LDFLAGS: ${PYTHON_LDFLAGS}"
# Convert to Rust linker arguments
RUST_LINK_ARGS=$(echo "${PYTHON_LDFLAGS}" | sed 's/-l/-C link-arg=-l/g' | sed 's/-L/-C link-arg=-L/g')
echo "RUSTFLAGS=${RUST_LINK_ARGS}" >> $GITHUB_ENV
- uses: boa-dev/criterion-compare-action@v3
with:
branchName: ${{ github.base_ref }}
cwd: "sqlglotrs"