Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
--arg withPerfetto ${{ matrix.perfetto || false }} \
--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' || '' }}

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.

I don't understand why we need two make calls, can't we merge them?

Suggested change
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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

' tools/nix/ci-shell.nix
env:
SCCACHE_LOCAL_RW_MODE: READ_ONLY
Expand Down
6 changes: 5 additions & 1 deletion benchmark/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,11 @@ module.exports = {
return process.binding(bindingName);
}
},
buildType: process.features.debug ? 'Debug' : 'Release',
// As in test/common: a --debug-node build is still a Release build, and its
// addons are in build/Release.
buildType: process.config.target_defaults ?
process.config.target_defaults.default_configuration :
'Release',
createBenchmark(fn, configs, options) {
return new Benchmark(fn, configs, options);
},
Expand Down
Loading