Skip to content

Commit a853378

Browse files
committed
temp workflow
1 parent aacf750 commit a853378

File tree

4 files changed

+116
-3
lines changed

4 files changed

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