Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ jobs:
include:
- runner: ubuntu-24.04
system: x86_64-linux
perfetto: true
- runner: ubuntu-24.04-arm
system: aarch64-linux
- runner: macos-15-intel
system: x86_64-darwin
- runner: macos-latest
system: aarch64-darwin
name: '${{ matrix.system }}: with shared libraries'
name: '${{ matrix.system }}: with shared libraries${{ matrix.perfetto && '' and perfetto'' || '''' }}'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW this is going away in #65794

runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -105,7 +106,8 @@ jobs:
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
core.exportVariable('SCCACHE_GHA_VERSION', 'on');
core.exportVariable('SCCACHE_GHA_ENABLED', 'on');
core.exportVariable('SCCACHE_GHA_RW_MODE', 'READ_ONLY');
core.exportVariable('ACTIONS_CACHE_SERVICE_V2', 'on');
core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
Expand All @@ -115,34 +117,39 @@ jobs:
nix-shell \
-I nixpkgs=./tools/nix/pkgs.nix \
--pure --keep TAR_DIR --keep FLAKY_TESTS \
--keep SCCACHE_GHA_ENABLED --keep ACTIONS_CACHE_SERVICE_V2 --keep ACTIONS_RESULTS_URL --keep ACTIONS_RUNTIME_TOKEN \
--keep SCCACHE_GHA_ENABLED --keep SCCACHE_GHA_RW_MODE \
--keep ACTIONS_CACHE_SERVICE_V2 --keep ACTIONS_RESULTS_URL --keep ACTIONS_RUNTIME_TOKEN \
--arg useSeparateDerivationForV8 true \
--arg withPerfetto ${{ matrix.perfetto || false }} \
--arg loadJSBuiltinsDynamically false \
--arg ccache "${NIX_SCCACHE:-null}" \
--arg ccache '(import <nixpkgs> {}).sccache' \
--arg devTools '[]' \
--arg benchmarkTools '[]' \
--run '
make build-ci -j4 V=1
make build-ci -j4 V=1 && sccache --stop-server
'
mv out/Release/node base_node

- name: Checkout the merge commit
run: git reset FETCH_HEAD --hard

- name: Re-build Node.js on the merge commit
# ccache is disabled here to avoid polluting the cache. Local build outputs should make this build relatively quick anyway.
# Keep the compiler command unchanged for incremental builds, but never cache PR build outputs.
run: |
nix-shell \
-I nixpkgs=./tools/nix/pkgs.nix \
--pure \
--pure --keep SCCACHE_LOCAL_RW_MODE \
--arg useSeparateDerivationForV8 true \
--arg withPerfetto ${{ matrix.perfetto || false }} \
--arg loadJSBuiltinsDynamically false \
--arg ccache 'null' \
--arg ccache '(import <nixpkgs> {}).sccache' \
--arg devTools '[]' \
--arg benchmarkTools '[]' \
--run '
make build-ci -j4 V=1
'
env:
SCCACHE_LOCAL_RW_MODE: READ_ONLY

- name: Run benchmark
run: |
Expand Down