|
| 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" |
0 commit comments