Skip to content

Commit 4431982

Browse files
committed
tools: add temporary shared openssl 4.0 workflow
1 parent aacf750 commit 4431982

File tree

4 files changed

+114
-3
lines changed

4 files changed

+114
-3
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Throwaway workflow used solely to gather test results for Node.js
2+
# linked against OpenSSL 4.0.
3+
name: TEMP - Test Shared libraries (OpenSSL 4.0)
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- tmp-openssl4
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
env:
16+
FLAKY_TESTS: keep_retrying
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
build-tarball:
23+
name: Build slim tarball
24+
runs-on: ubuntu-slim
25+
steps:
26+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
with:
28+
persist-credentials: false
29+
30+
- name: Make tarball
31+
run: |
32+
export DATESTRING=$(date "+%Y-%m-%d")
33+
export COMMIT=$(git rev-parse --short=10 "$GITHUB_SHA")
34+
./configure && make tar -j4 SKIP_XZ=1 SKIP_SHARED_DEPS=1
35+
env:
36+
DISTTYPE: nightly
37+
38+
- name: Upload tarball artifact
39+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
40+
with:
41+
name: tarballs
42+
path: '*.tar.gz'
43+
compression-level: 0
44+
45+
build:
46+
needs: build-tarball
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
include:
51+
- runner: ubuntu-24.04
52+
system: x86_64-linux
53+
- runner: ubuntu-24.04-arm
54+
system: aarch64-linux
55+
- runner: macos-15-intel
56+
system: x86_64-darwin
57+
- runner: macos-latest
58+
system: aarch64-darwin
59+
name: '${{ matrix.system }}: with shared libraries (OpenSSL 4.0)'
60+
runs-on: ${{ matrix.runner }}
61+
# We only care about the test results here, not about gating anything.
62+
continue-on-error: true
63+
steps:
64+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
65+
with:
66+
name: tarballs
67+
path: tarballs
68+
69+
- name: Extract tarball
70+
run: |
71+
tar xzf tarballs/*.tar.gz -C "$RUNNER_TEMP"
72+
echo "TAR_DIR=$RUNNER_TEMP/$(basename tarballs/*.tar.gz .tar.gz)" >> "$GITHUB_ENV"
73+
74+
- uses: cachix/install-nix-action@96951a368ba55167b55f1c916f7d416bac6505fe # v31.10.3
75+
with:
76+
extra_nix_config: sandbox = true
77+
78+
- uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17
79+
with:
80+
name: nodejs
81+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
82+
83+
- name: Configure sccache
84+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
85+
with:
86+
script: |
87+
core.exportVariable('SCCACHE_GHA_ENABLED', 'on');
88+
core.exportVariable('ACTIONS_CACHE_SERVICE_V2', 'on');
89+
core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || '');
90+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
91+
core.exportVariable('NIX_SCCACHE', '(import <nixpkgs> {}).sccache');
92+
93+
- name: Build Node.js and run tests
94+
run: |
95+
nix-shell \
96+
-I "nixpkgs=$TAR_DIR/tools/nix/pkgs.nix" \
97+
--pure --keep TAR_DIR --keep FLAKY_TESTS \
98+
--keep SCCACHE_GHA_ENABLED --keep ACTIONS_CACHE_SERVICE_V2 --keep ACTIONS_RESULTS_URL --keep ACTIONS_RUNTIME_TOKEN \
99+
--arg loadJSBuiltinsDynamically false \
100+
--arg useSeparateDerivationForV8 true \
101+
--arg ccache "${NIX_SCCACHE:-null}" \
102+
--arg devTools '[]' \
103+
--arg benchmarkTools '[]' \
104+
--arg opensslPkg '(import <nixpkgs> {}).openssl_4_0' \
105+
${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withLief false --arg withSQLite false --arg withFFI false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }}
106+
--run '
107+
make -C "$TAR_DIR" run-ci -j4 V=1 TEST_CI_ARGS="-p actions --measure-flakiness 9 --skip-tests=$CI_SKIP_TESTS"
108+
' "$TAR_DIR/shell.nix"

shell.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
withFFI ? true,
2020
withSSL ? true,
2121
withTemporal ? false,
22+
opensslPkg ? pkgs.openssl_3_5,
2223
sharedLibDeps ? (
2324
import ./tools/nix/sharedLibDeps.nix {
2425
inherit
@@ -29,6 +30,7 @@
2930
withFFI
3031
withSSL
3132
withTemporal
33+
opensslPkg
3234
;
3335
}
3436
),

tools/nix/pkgs.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
arg:
22
let
33
repo = "https://github.com/NixOS/nixpkgs";
4-
rev = "13043924aaa7375ce482ebe2494338e058282925";
4+
rev = "ec9a189b46ab91b00e19c8e4abe55d6af792e43d";
55
nixpkgs = import (builtins.fetchTarball {
66
url = "${repo}/archive/${rev}.tar.gz";
7-
sha256 = "1pbv1c3syp94rh147s2nhbzfcib01blz3s7g290m43s3nk71404z";
7+
sha256 = "1s42s1na2r6dhs25dcpfs8gl9xw31ajg4wj7h9jskn0ml7ksw6wc";
88
}) arg;
99
in
1010
nixpkgs

tools/nix/sharedLibDeps.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
withSSL ? true,
77
withFFI ? true,
88
withTemporal ? false,
9+
opensslPkg ? pkgs.openssl_3_5,
910
}:
1011
{
1112
inherit (pkgs)
@@ -51,7 +52,7 @@
5152
ffi = pkgs.libffiReal;
5253
})
5354
// (pkgs.lib.optionalAttrs withSSL ({
54-
openssl = pkgs.openssl_3_5;
55+
openssl = opensslPkg;
5556
}))
5657
// (pkgs.lib.optionalAttrs withTemporal {
5758
inherit (pkgs) temporal_capi;

0 commit comments

Comments
 (0)