Remove all WASM packages and upstream parity tree #50
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: Native Benchmark | |
| on: | |
| push: | |
| branches: [napi-jemalloc, main] | |
| paths: | |
| - "native/**" | |
| - ".github/workflows/native-benchmark.yml" | |
| pull_request: | |
| paths: | |
| - "native/**" | |
| - ".github/workflows/native-benchmark.yml" | |
| # Cancel superseded runs on the same ref so baselines aren't raced. | |
| concurrency: | |
| group: native-benchmark-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| benchmark: | |
| name: Benchmark (linux-x64, jemalloc) | |
| # Pinned to a single runner so stored baselines stay comparable. | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write # push the baseline to gh-pages (on main) | |
| pull-requests: write # comment on PRs when a regression alerts | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: "24" | |
| package-manager-cache: false | |
| - name: Install jemalloc | |
| run: sudo apt-get update && sudo apt-get install -y libjemalloc2 | |
| - name: Build native addon | |
| working-directory: native | |
| run: | | |
| npm ci | |
| make build PLATFORM_KEY=linux-x64 | |
| npm run build:ts | |
| - name: Run benchmark (under jemalloc) | |
| working-directory: native | |
| env: | |
| LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 | |
| run: node --expose-gc benchmark/ci-bench.mjs --out "$GITHUB_WORKSPACE/benchmark-results.json" | |
| - name: Track results and compare against baseline | |
| uses: benchmark-action/github-action-benchmark@4bdcce38c94cec68da58d012ac24b7b1155efe8b # v1.20.7 | |
| with: | |
| name: native libpg-query (linux-x64, jemalloc) | |
| tool: customSmallerIsBetter | |
| output-file-path: benchmark-results.json | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| # Store/track history on gh-pages, but only write/push from main. | |
| gh-pages-branch: gh-pages | |
| benchmark-data-dir-path: dev/bench/native | |
| auto-push: ${{ github.event_name == 'push' }} | |
| save-data-file: ${{ github.event_name == 'push' }} | |
| # Report every run; fail only on a large (2x) regression. | |
| summary-always: true | |
| comment-on-alert: true | |
| fail-on-alert: true | |
| alert-threshold: "200%" |