| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 56917af commit ac49e7c
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -172,6 +172,7 @@ jobs: | |||
| 172 | 172 | name: 'aarch64-linux: Cache V8 build' | |
| 173 | 173 | outputs: | |
| 174 | 174 | local-cache: ${{ steps.upload.outcome != 'skipped' && 'true' || '' }} | |
| 175 | + matrix: ${{ steps.query.outputs.matrix }} | ||
| 175 | 176 | steps: | |
| 176 | 177 | - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| 177 | 178 | with: | |
@@ -227,25 +228,17 @@ jobs: | |||
| 227 | 228 | name: libv8 | |
| 228 | 229 | path: libv8 | |
| 229 | 230 | ||
| 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 | ||
| 245 | 233 | run: | | |
| 246 | 234 | { | |
| 247 | 235 | 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 | + " | ||
| 249 | 242 | echo 'EOF' | |
| 250 | 243 | } >> "$GITHUB_OUTPUT" | |
| 251 | 244 | ||
@@ -255,19 +248,16 @@ jobs: | |||
| 255 | 248 | # entry, while all other shared libs remain at their defaults. Only runs on | |
| 256 | 249 | # a single runner/system (aarch64-linux) to keep the matrix to a minimum. | |
| 257 | 250 | build-openssl: | |
| 258 | - needs: | ||
| 259 | - - build-aarch64-linux-v8 | ||
| 260 | - - collect-openssl-versions | ||
| 251 | + needs: build-aarch64-linux-v8 | ||
| 261 | 252 | strategy: | |
| 262 | 253 | fail-fast: false | |
| 263 | 254 | 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 }}' | ||
| 266 | 257 | runs-on: ubuntu-24.04-arm | |
| 267 | - continue-on-error: ${{ matrix.openssl['continue-on-error'] }} | ||
| 258 | + continue-on-error: false | ||
| 268 | 259 | env: | |
| 269 | 260 | OPENSSL_ATTR: ${{ matrix.openssl.attr }} | |
| 270 | - OPENSSL_VERSION: ${{ matrix.openssl.version }} | ||
| 271 | 261 | steps: | |
| 272 | 262 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| 273 | 263 | with: | |
@@ -293,5 +283,5 @@ jobs: | |||
| 293 | 283 | extra-nix-flags: | | |
| 294 | 284 | --arg useSeparateDerivationForV8 ${{ needs.build-aarch64-linux-v8.outputs.local-cache && '"$(nix-store --import < libv8)"' || 'true' }} \ | |
| 295 | 285 | --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; | ||
| 297 | 287 | }" \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ set -ex | |||
| 5 | 5 | ||
| 6 | 6 | BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd) | |
| 7 | 7 | NIXPKGS_PIN_FILE="$BASE_DIR/tools/nix/pkgs.nix" | |
| 8 | - OPENSSL_MATRIX_FILE="$BASE_DIR/tools/nix/openssl-matrix.json" | ||
| 8 | + OPENSSL_MATRIX_FILE="$BASE_DIR/tools/nix/openssl-matrix.nix" | ||
| 9 | 9 | ||
| 10 | 10 | NIXPKGS_REPO=$(grep 'repo =' "$NIXPKGS_PIN_FILE" | awk -F'"' '{ print $2 }') | |
| 11 | 11 | CURRENT_VERSION_SHA1=$(grep 'rev =' "$NIXPKGS_PIN_FILE" | awk -F'"' '{ print $2 }') | |
@@ -26,7 +26,37 @@ TMP_FILE=$(mktemp) | |||
| 26 | 26 | sed "s/$CURRENT_VERSION_SHA1/$NEW_UPSTREAM_SHA1/;s/$CURRENT_TARBALL_HASH/$NEW_TARBALL_HASH/" "$NIXPKGS_PIN_FILE" > "$TMP_FILE" | |
| 27 | 27 | mv "$TMP_FILE" "$NIXPKGS_PIN_FILE" | |
| 28 | 28 | ||
| 29 | - "$BASE_DIR/tools/nix/collect-openssl-matrix.sh" | jq . > "$OPENSSL_MATRIX_FILE" | ||
| 29 | + nix-instantiate -I "nixpkgs=$NIXPKGS_PIN_FILE" --eval --strict --json -E " | ||
| 30 | + let | ||
| 31 | + pkgs = import <nixpkgs> {}; | ||
| 32 | + attrs = builtins.filter | ||
| 33 | + (n: | ||
| 34 | + let t = builtins.tryEval pkgs.\${n}; in | ||
| 35 | + t.success && (builtins.tryEval t.value.version).success | ||
| 36 | + ) | ||
| 37 | + ( | ||
| 38 | + builtins.filter | ||
| 39 | + (n: builtins.match \"openssl_[0-9]+(_[0-9]+)?\" n != null) | ||
| 40 | + (builtins.attrNames pkgs) | ||
| 41 | + ); | ||
| 42 | + in | ||
| 43 | + { | ||
| 44 | + inherit attrs; | ||
| 45 | + permittedInsecurePackages = builtins.map (attr: pkgs.\${attr}.name) ( | ||
| 46 | + builtins.filter (attr: (pkgs.\${attr}.meta.insecure)) attrs | ||
| 47 | + ); | ||
| 48 | + } | ||
| 49 | + " | jq -r '"{ | ||
| 50 | + pkgs ? import ./pkgs.nix { | ||
| 51 | + config.permittedInsecurePackages = [ \(.permittedInsecurePackages | map(@json) | join(" ")) ]; | ||
| 52 | + }, | ||
| 53 | + }: | ||
| 54 | + | ||
| 55 | + { | ||
| 56 | + inherit (pkgs) | ||
| 57 | + \(.attrs | join("\n ")) | ||
| 58 | + ; | ||
| 59 | + }"' > "$OPENSSL_MATRIX_FILE" | ||
| 30 | 60 | ||
| 31 | 61 | cat -<<EOF | |
| 32 | 62 | All done! | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,15 @@ | |||
| 1 | + { | ||
| 2 | + pkgs ? import ./pkgs.nix { | ||
| 3 | + config.permittedInsecurePackages = [ "openssl-1.1.1w" ]; | ||
| 4 | + }, | ||
| 5 | + }: | ||
| 6 | + | ||
| 7 | + { | ||
| 8 | + inherit (pkgs) | ||
| 9 | + openssl_1_1 | ||
| 10 | + openssl_3 | ||
| 11 | + openssl_3_5 | ||
| 12 | + openssl_3_6 | ||
| 13 | + openssl_4_0 | ||
| 14 | + ; | ||
| 15 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,7 +48,7 @@ | |||
| 48 | 48 | ffi = pkgs.libffiReal; | |
| 49 | 49 | }) | |
| 50 | 50 | // (pkgs.lib.optionalAttrs withSSL ({ | |
| 51 | - openssl = pkgs.openssl_3_5; | ||
| 51 | + openssl = (import ./openssl-matrix.nix { inherit pkgs; }).openssl_3_5; | ||
| 52 | 52 | })) | |
| 53 | 53 | // (pkgs.lib.optionalAttrs withTemporal { | |
| 54 | 54 | inherit (pkgs) temporal_capi; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments