@@ -111,92 +111,63 @@ permissions:
111111jobs :
112112 build-tarball :
113113 if : github.event.pull_request.draft == false
114- name : ${{ github.event_name == 'workflow_dispatch' && 'Skipped job' || 'Build slim tarball' }}
114+ strategy :
115+ matrix :
116+ install-nix-action : [96951a368ba55167b55f1c916f7d416bac6505fe, 616559265b40713947b9c190a8ff4b507b5df49b]
115117 runs-on : ubuntu-slim
116118 steps :
117119 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
118120 if : ${{ github.event_name != 'workflow_dispatch' }}
119121 with :
120122 persist-credentials : false
121123
122- - name : Make tarball
123- if : ${{ github.event_name != 'workflow_dispatch' }}
124+ - uses : cachix/install-nix-action@96951a368ba55167b55f1c916f7d416bac6505fe # v31.10.3
125+ if : ${{ matrix.install-nix-action == '96951a368ba55167b55f1c916f7d416bac6505fe' }}
126+ with :
127+ extra_nix_config : sandbox = true
128+
129+ - uses : cachix/install-nix-action@616559265b40713947b9c190a8ff4b507b5df49b # v31.10.3
130+ if : ${{ matrix.install-nix-action == '616559265b40713947b9c190a8ff4b507b5df49b' }}
131+ with :
132+ extra_nix_config : sandbox = true
133+
134+ - name : Instantiate derivation
135+ id : drv
124136 run : |
125- export DATESTRING=$(date "+%Y-%m-%d")
126- export COMMIT=$(git rev-parse --short=10 "$GITHUB_SHA")
127- ./configure && make tar -j4 SKIP_XZ=1 SKIP_SHARED_DEPS=1
128- env :
129- DISTTYPE : nightly
137+ echo "DRV=$(nix-instantiate -E 'builtins.filter (p: p.pname == "v8") (import ./shell.nix { useSeparateDerivationForV8=true; }).buildInputs')" >> "$GITHUB_OUTPUT"
130138
131139 - name : Upload tarball artifact
132- if : ${{ github.event_name != 'workflow_dispatch' }}
133140 uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
134141 with :
135- name : tarballs
136- path : ' *.tar.gz'
137- compression-level : 0
142+ name : ${{ matrix.install-nix-action }}.drv
143+ path : ${{ steps.drv.outputs.DRV }}
138144
139- build :
145+ nix-diff :
140146 needs : build-tarball
141- strategy :
142- fail-fast : false
143- matrix :
144- include :
145- - runner : ubuntu-24.04
146- system : x86_64-linux
147- - runner : ubuntu-24.04-arm
148- system : aarch64-linux
149- - runner : macos-15-intel
150- system : x86_64-darwin
151- - runner : macos-latest
152- system : aarch64-darwin
153- name : ' ${{ matrix.system }}: with shared libraries'
154- runs-on : ${{ matrix.runner }}
147+ runs-on : ubuntu-slim
155148 steps :
156- - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
157- if : ${{ github.event_name != 'workflow_dispatch' }}
149+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
158150 with :
159- name : tarballs
160- path : tarballs
161-
162- - name : Extract tarball
163- if : ${{ github.event_name != 'workflow_dispatch' }}
164- run : |
165- tar xzf tarballs/*.tar.gz -C "$RUNNER_TEMP"
166- echo "TAR_DIR=$RUNNER_TEMP/$(basename tarballs/*.tar.gz .tar.gz)" >> "$GITHUB_ENV"
151+ persist-credentials : false
152+ sparse-checkout : ' *.nix'
153+ sparse-checkout-cone-mode : false
167154
168- - uses : cachix/install-nix-action@96951a368ba55167b55f1c916f7d416bac6505fe # v31.10.3
155+ - name : Download benchmark raw results
156+ uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
169157 with :
170- extra_nix_config : sandbox = true
158+ pattern : csv-*
159+ merge-multiple : true
160+ path : raw-results
161+ - run : ls
171162
172- - uses : cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17
173- with :
174- name : nodejs
175- authToken : ${{ secrets.CACHIX_AUTH_TOKEN }}
163+ # - uses: cachix/install-nix-action@96951a368ba55167b55f1c916f7d416bac6505fe # v31.10.3
164+ # with:
165+ # extra_nix_config: sandbox = true
176166
177- - name : Configure sccache
178- if : github.base_ref == 'main' || github.ref_name == 'main'
179- uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
180- 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');
167+ # - name: Benchmark results
168+ # run: |
169+ # nix-shell \
170+ # -I nixpkgs=./tools/nix/pkgs.nix \
171+ # -p nix-diff \
172+ # --run 'nix-diff *.drv'
187173
188- - name : Build Node.js and run tests
189- run : |
190- 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"
0 commit comments