@@ -141,15 +141,10 @@ jobs:
141141 strategy :
142142 fail-fast : false
143143 matrix :
144+ install-nix-action : [96951a368ba55167b55f1c916f7d416bac6505fe, 616559265b40713947b9c190a8ff4b507b5df49b]
144145 include :
145- - runner : ubuntu-24.04
146- system : x86_64-linux
147146 - runner : ubuntu-24.04-arm
148147 system : aarch64-linux
149- - runner : macos-15-intel
150- system : x86_64-darwin
151- - runner : macos-latest
152- system : aarch64-darwin
153148 name : ' ${{ matrix.system }}: with shared libraries'
154149 runs-on : ${{ matrix.runner }}
155150 steps :
@@ -166,6 +161,12 @@ jobs:
166161 echo "TAR_DIR=$RUNNER_TEMP/$(basename tarballs/*.tar.gz .tar.gz)" >> "$GITHUB_ENV"
167162
168163 - uses : cachix/install-nix-action@96951a368ba55167b55f1c916f7d416bac6505fe # v31.10.3
164+ if : ${{ matrix.install-nix-action == '96951a368ba55167b55f1c916f7d416bac6505fe' }}
165+ with :
166+ extra_nix_config : sandbox = true
167+
168+ - uses : cachix/install-nix-action@616559265b40713947b9c190a8ff4b507b5df49b # v31.10.3
169+ if : ${{ matrix.install-nix-action == '616559265b40713947b9c190a8ff4b507b5df49b' }}
169170 with :
170171 extra_nix_config : sandbox = true
171172
@@ -174,29 +175,42 @@ jobs:
174175 name : nodejs
175176 authToken : ${{ secrets.CACHIX_AUTH_TOKEN }}
176177
177- - name : Configure sccache
178- if : github.base_ref == 'main' || github.ref_name == 'main'
179- uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
178+ - name : Instantiate derivation
179+ id : drv
180+ run : |
181+ echo "DRV=$(nix-instantiate -E 'builtins.filter (p: p.pname == "v8") (import ./shell.nix { useSeparateDerivationForV8=true; }).buildInputs')" >> "$GITHUB_OUTPUT"
182+
183+ - name : Upload tarball artifact
184+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
180185 with :
181- script : |
182- core.exportVariable('SCCACHE_GHA_ENABLED', 'on');
183- core.exportVariable('ACTIONS_CACHE_SERVICE_V2', 'on');
184- core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || '');
185- core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
186- core.exportVariable('NIX_SCCACHE', '(import <nixpkgs> {}).sccache');
187-
188- - name : Build Node.js and run tests
186+ name : ${{ matrix.install-nix-action }}.drv
187+ path : ${{ steps.drv.outputs.DRV }}
188+
189+ nix-diff :
190+ needs : build
191+ runs-on : ubuntu-slim
192+ steps :
193+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
194+ with :
195+ persist-credentials : false
196+ sparse-checkout : ' *.nix'
197+ sparse-checkout-cone-mode : false
198+
199+ - name : Download benchmark raw results
200+ uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
201+ with :
202+ pattern : csv-*
203+ merge-multiple : true
204+ path : raw-results
205+
206+ - uses : cachix/install-nix-action@96951a368ba55167b55f1c916f7d416bac6505fe # v31.10.3
207+ with :
208+ extra_nix_config : sandbox = true
209+
210+ - name : Benchmark results
189211 run : |
190212 nix-shell \
191- -I "nixpkgs=$TAR_DIR/tools/nix/pkgs.nix" \
192- --pure --keep TAR_DIR --keep FLAKY_TESTS \
193- --keep SCCACHE_GHA_ENABLED --keep ACTIONS_CACHE_SERVICE_V2 --keep ACTIONS_RESULTS_URL --keep ACTIONS_RUNTIME_TOKEN \
194- --arg loadJSBuiltinsDynamically false \
195- --arg useSeparateDerivationForV8 true \
196- --arg ccache "${NIX_SCCACHE:-null}" \
197- --arg devTools '[]' \
198- --arg benchmarkTools '[]' \
199- ${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withLief false --arg withSQLite false --arg withFFI false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }}
200- --run '
201- make -C "$TAR_DIR" run-ci -j4 V=1 TEST_CI_ARGS="-p actions --measure-flakiness 9 --skip-tests=$CI_SKIP_TESTS"
202- ' "$TAR_DIR/shell.nix"
213+ -I nixpkgs=./tools/nix/pkgs.nix \
214+ -p nix-diff
215+ --run 'nix-diff *.drv'
216+
0 commit comments