GeezerVison is showing github.com — benchmark,tools: fix napi benchmarks on GHA · nodejs/node@d1e747a
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/benchmark.yml +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -140,18 +140,22 @@ jobs: |
140 | 140 | run: | |
141 | 141 | nix-shell \ |
142 | 142 | -I nixpkgs=./tools/nix/pkgs.nix \ |
143 | | - --pure --keep SCCACHE_LOCAL_RW_MODE \ |
| 143 | + --pure --keep SCCACHE_LOCAL_RW_MODE --keep CATEGORIES \ |
144 | 144 | --arg useSeparateDerivationForV8 true \ |
145 | 145 | --arg withPerfetto ${{ matrix.perfetto || false }} \ |
146 | 146 | --arg loadJSBuiltinsDynamically false \ |
147 | 147 | --arg ccache '(import <nixpkgs> {}).sccache' \ |
148 | 148 | --arg devTools '[]' \ |
149 | 149 | --arg benchmarkTools '[]' \ |
150 | 150 | --run ' |
| 151 | + set -e |
151 | 152 | make build-ci -j4 V=1 |
| 153 | + # The napi benchmarks load addons of their own, both binaries use these. |
| 154 | + if [[ " $CATEGORIES " == *" napi "* ]]; then make bench-addons-build; fi |
152 | 155 | ' |
153 | 156 | env: |
154 | 157 | SCCACHE_LOCAL_RW_MODE: READ_ONLY |
| 158 | + CATEGORIES: ${{ inputs.category }} |
155 | 159 |
|
156 | 160 | - name: Run benchmark |
157 | 161 | run: | |
|
Collapse file
Copy file name to clipboardExpand all lines: benchmark/common.js +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -470,7 +470,11 @@ module.exports = { |
470 | 470 | return process.binding(bindingName); |
471 | 471 | } |
472 | 472 | }, |
473 | | - buildType: process.features.debug ? 'Debug' : 'Release', |
| 473 | + // As in test/common: a --debug-node build is still a Release build, and its |
| 474 | + // addons are in build/Release. |
| 475 | + buildType: process.config.target_defaults ? |
| 476 | + process.config.target_defaults.default_configuration : |
| 477 | + 'Release', |
474 | 478 | createBenchmark(fn, configs, options) { |
475 | 479 | return new Benchmark(fn, configs, options); |
476 | 480 | }, |
|