Repository navigation
benchmark,tools: fix napi benchmarks on GHA - #66423
nigrosimone wants to merge 1 commit into
Conversation
|
Review requested:
|
|
This conflicts with #66351 (already in
commit-queue
|
This comment was marked as resolved.
This comment was marked as resolved.
d1e747a to
e0dad8b
Compare
The GHA benchmark never built the addons of benchmark/napi, and its --debug-node build made benchmark/common.js look for them in build/Debug. Build them when the napi category runs, and pick the build type as test/common does. Refs: nodejs#66395 Signed-off-by: Nigro Simone <nigro.simone@gmail.com>
e0dad8b to
235ee9b
Compare
| --arg ccache '(import <nixpkgs> {}).sccache' \ | ||
| --run ' | ||
| make build-ci -j4 V=1 | ||
| make build-ci -j4 V=1 ${{ contains(format(' {0} ', inputs.category), ' napi ') && '&& make bench-addons-build' || '' }} |
There was a problem hiding this comment.
I don't understand why we need two make calls, can't we merge them?
| make build-ci -j4 V=1 ${{ contains(format(' {0} ', inputs.category), ' napi ') && '&& make bench-addons-build' || '' }} | |
| make build-ci ${{ contains(format(' {0} ', inputs.category), ' napi ') && 'bench-addons-build' || '' }} -j4 V=1 |
There was a problem hiding this comment.
They can't be merged safely: with -j4 make builds both goals concurrently, and nothing orders bench-addons-build after build-ci.
On a clean checkout $(NODE_EXE) can hit config.gypi before configure runs, or race with build-ci's inner make on out/Release. && guarantees the full build finishes first.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66423 +/- ##
==========================================
+ Coverage 90.42% 93.23% +2.80%
==========================================
Files 790 422 -368
Lines 275435 193715 -81720
Branches 52825 32844 -19981
==========================================
- Hits 249074 180611 -68463
+ Misses 16772 12796 -3976
+ Partials 9589 308 -9281 🚀 New features to boost your workflow:
|
The GHA benchmark cannot run any
napi/*benchmark: every run prints "Binding failed to load" (for example on #66395). Two reasons:--debug-node(the default ofshell.nix), soprocess.features.debugis true andbenchmark/common.jslooks for the addon inbuild/Debug, while node-gyp builds it inbuild/ReleaseNow the workflow runs
make bench-addons-buildwhen the category hasnapi, andbenchmark/common.jstakes the build type fromprocess.config, astest/commondoes.Tested on my fork,
napi/make_callbackwith the same code on both sides (x86_64-linux only): https://github.com/nigrosimone/node/actions/runs/36763821317Disclosure: I used Opus 5.5 (Max) as coding assistant