@@ -172,6 +172,7 @@ jobs:
172172 name : ' aarch64-linux: Cache V8 build'
173173 outputs :
174174 local-cache : ${{ steps.upload.outcome != 'skipped' && 'true' || '' }}
175+ matrix : ${{ steps.query.outputs.matrix }}
175176 steps :
176177 - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
177178 with :
@@ -227,25 +228,17 @@ jobs:
227228 name : libv8
228229 path : libv8
229230
230- # Builds the matrix for `build-openssl` from tools/nix/openssl-matrix.json.
231- # Output shape:
232- # [{ "version": "3.6.1", "attr": "openssl_3_6", "continue-on-error": false }, ...]
233- collect-openssl-versions :
234- if : github.event.pull_request.draft == false
235- runs-on : ubuntu-slim
236- outputs :
237- matrix : ${{ steps.query.outputs.matrix }}
238- steps :
239- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
240- with :
241- persist-credentials : false
242- sparse-checkout : tools/nix/openssl-matrix.json
243- sparse-checkout-cone-mode : false
244- - id : query
231+ - name : Collect matrix of support OpenSSL versions
232+ id : query
245233 run : |
246234 {
247235 echo 'matrix<<EOF'
248- cat tools/nix/openssl-matrix.json
236+ nix-instantiate --eval --strict --json -E "
237+ let
238+ matrix = import $TAR_DIR/tools/nix/openssl-matrix.nix {};
239+ in
240+ builtins.map (attr: { inherit attr; inherit (builtins.getAttr attr matrix) name; }) (builtins.attrNames matrix)
241+ "
249242 echo 'EOF'
250243 } >> "$GITHUB_OUTPUT"
251244
@@ -255,19 +248,16 @@ jobs:
255248 # entry, while all other shared libs remain at their defaults. Only runs on
256249 # a single runner/system (aarch64-linux) to keep the matrix to a minimum.
257250 build-openssl :
258- needs :
259- - build-aarch64-linux-v8
260- - collect-openssl-versions
251+ needs : build-aarch64-linux-v8
261252 strategy :
262253 fail-fast : false
263254 matrix :
264- openssl : ${{ fromJSON(needs.collect-openssl-versions .outputs.matrix) }}
265- name : ' aarch64-linux: with shared ${{ matrix.openssl.attr }} (${{ matrix.openssl.version }}) '
255+ openssl : ${{ fromJSON(needs.build-aarch64-linux-v8 .outputs.matrix) }}
256+ name : ' aarch64-linux: with shared ${{ matrix.openssl.name }}'
266257 runs-on : ubuntu-24.04-arm
267- continue-on-error : ${{ matrix.openssl['continue-on-error'] }}
258+ continue-on-error : false
268259 env :
269260 OPENSSL_ATTR : ${{ matrix.openssl.attr }}
270- OPENSSL_VERSION : ${{ matrix.openssl.version }}
271261 steps :
272262 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
273263 with :
@@ -293,5 +283,5 @@ jobs:
293283 extra-nix-flags : |
294284 --arg useSeparateDerivationForV8 ${{ needs.build-aarch64-linux-v8.outputs.local-cache && '"$(nix-store --import < libv8)"' || 'true' }} \
295285 --arg sharedLibDeps "(import $TAR_DIR/tools/nix/sharedLibDeps.nix {}) // {
296- openssl = (import $TAR_DIR/tools/nix/pkgs .nix { config.permittedInsecurePackages = [ \"openssl-$OPENSSL_VERSION\" ]; }).$OPENSSL_ATTR;
286+ openssl = (import $TAR_DIR/tools/nix/openssl-matrix .nix {}).$OPENSSL_ATTR;
297287 }" \
0 commit comments