| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,8 +35,35 @@ permissions: | |||
| 35 | 35 | contents: read | |
| 36 | 36 | ||
| 37 | 37 | jobs: | |
| 38 | - build: | ||
| 38 | + build-tarball: | ||
| 39 | 39 | if: github.event.pull_request.draft == false | |
| 40 | + name: ${{ github.event_name == 'workflow_dispatch' && 'Skipped job' || 'Build slim tarball' }} | ||
| 41 | + runs-on: ubuntu-24.04-arm | ||
| 42 | + steps: | ||
| 43 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| 44 | + if: ${{ github.event_name != 'workflow_dispatch' }} | ||
| 45 | + with: | ||
| 46 | + persist-credentials: false | ||
| 47 | + | ||
| 48 | + - name: Make tarball | ||
| 49 | + if: ${{ github.event_name != 'workflow_dispatch' }} | ||
| 50 | + run: | | ||
| 51 | + export DATESTRING=$(date "+%Y-%m-%d") | ||
| 52 | + export COMMIT=$(git rev-parse --short=10 "$GITHUB_SHA") | ||
| 53 | + ./configure && make tar -j4 SKIP_XZ=1 SKIP_SHARED_DEPS=1 | ||
| 54 | + env: | ||
| 55 | + DISTTYPE: nightly | ||
| 56 | + | ||
| 57 | + - name: Upload tarball artifact | ||
| 58 | + if: ${{ github.event_name != 'workflow_dispatch' }} | ||
| 59 | + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
| 60 | + with: | ||
| 61 | + name: tarballs | ||
| 62 | + path: '*.tar.gz' | ||
| 63 | + compression-level: 0 | ||
| 64 | + | ||
| 65 | + build: | ||
| 66 | + needs: build-tarball | ||
| 40 | 67 | strategy: | |
| 41 | 68 | fail-fast: false | |
| 42 | 69 | matrix: | |
@@ -52,9 +79,17 @@ jobs: | |||
| 52 | 79 | name: '${{ matrix.system }}: with shared libraries' | |
| 53 | 80 | runs-on: ${{ matrix.runner }} | |
| 54 | 81 | steps: | |
| 55 | - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| 82 | + - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 | ||
| 83 | + if: ${{ github.event_name != 'workflow_dispatch' }} | ||
| 56 | 84 | with: | |
| 57 | - persist-credentials: false | ||
| 85 | + name: tarballs | ||
| 86 | + path: tarballs | ||
| 87 | + | ||
| 88 | + - name: Extract tarball | ||
| 89 | + if: ${{ github.event_name != 'workflow_dispatch' }} | ||
| 90 | + run: | | ||
| 91 | + tar xzf tarballs/*.tar.gz -C "$RUNNER_TEMP" | ||
| 92 | + echo "TAR_DIR=$RUNNER_TEMP/$(basename tarballs/*.tar.gz .tar.gz)" >> "$GITHUB_ENV" | ||
| 58 | 93 | ||
| 59 | 94 | - uses: cachix/install-nix-action@7be5dee1421f63d07e71ce6e0a9f8a4b07c2a487 # v31.6.1 | |
| 60 | 95 | with: | |
@@ -69,17 +104,24 @@ jobs: | |||
| 69 | 104 | core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || ''); | |
| 70 | 105 | core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
| 71 | 106 | ||
| 107 | + - name: Load shell.nix | ||
| 108 | + if: github.event_name != 'workflow_dispatch' | ||
| 109 | + run: | | ||
| 110 | + mv "$TAR_DIR"/*.nix . | ||
| 111 | + mkdir tools | ||
| 112 | + mv "$TAR_DIR"/tools/nix tools/. | ||
| 113 | + | ||
| 72 | 114 | - name: Build Node.js and run tests | |
| 73 | 115 | run: | | |
| 74 | 116 | nix-shell \ | |
| 75 | 117 | -I nixpkgs=./tools/nix/pkgs.nix \ | |
| 76 | - --pure --keep FLAKY_TESTS \ | ||
| 118 | + --pure --keep TAR_DIR --keep FLAKY_TESTS \ | ||
| 77 | 119 | --keep SCCACHE_GHA_VERSION --keep ACTIONS_CACHE_SERVICE_V2 --keep ACTIONS_RESULTS_URL --keep ACTIONS_RUNTIME_TOKEN \ | |
| 78 | 120 | --arg loadJSBuiltinsDynamically false \ | |
| 79 | 121 | --arg ccache '(import <nixpkgs> {}).sccache' \ | |
| 80 | 122 | --arg devTools '[]' \ | |
| 81 | 123 | --arg benchmarkTools '[]' \ | |
| 82 | 124 | ${{ endsWith(matrix.system, '-darwin') && '--arg extraConfigFlags ''["--without-inspector"]'' \' || '\' }} | |
| 83 | 125 | --run ' | |
| 84 | - make run-ci -j4 V=1 TEST_CI_ARGS="-p actions --measure-flakiness 9 --skip-tests=$CI_SKIP_TESTS" | ||
| 126 | + make -C "$TAR_DIR" run-ci -j4 V=1 TEST_CI_ARGS="-p actions --measure-flakiness 9 --skip-tests=$CI_SKIP_TESTS" | ||
| 85 | 127 | ' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -399,7 +399,7 @@ ADDONS_HEADERS_PREREQS := tools/install.py \ | |||
| 399 | 399 | $(wildcard deps/uv/include/*/*.h) \ | |
| 400 | 400 | $(wildcard deps/v8/include/*.h) \ | |
| 401 | 401 | $(wildcard deps/v8/include/*/*.h) \ | |
| 402 | - deps/zlib/zconf.h deps/zlib/zlib.h \ | ||
| 402 | + $(wildcard deps/zlib/z*.h) \ | ||
| 403 | 403 | src/node.h src/node_api.h src/js_native_api.h src/js_native_api_types.h \ | |
| 404 | 404 | src/node_api_types.h src/node_buffer.h src/node_object_wrap.h \ | |
| 405 | 405 | src/node_version.h | |
@@ -1032,6 +1032,11 @@ override DESTCPU=x86 | |||
| 1032 | 1032 | endif | |
| 1033 | 1033 | ||
| 1034 | 1034 | TARNAME=node-$(FULLVERSION) | |
| 1035 | + # Supply SKIP_SHARED_DEPS=1 to explicitly skip all dependencies that can be included as shared deps | ||
| 1036 | + SKIP_SHARED_DEPS ?= 0 | ||
| 1037 | + ifeq ($(SKIP_SHARED_DEPS), 1) | ||
| 1038 | + TARNAME:=$(TARNAME)-slim | ||
| 1039 | + endif | ||
| 1035 | 1040 | TARBALL=$(TARNAME).tar | |
| 1036 | 1041 | # Custom user-specified variation, use it directly | |
| 1037 | 1042 | ifdef VARIATION | |
@@ -1215,12 +1220,31 @@ $(TARBALL): release-only doc-only | |||
| 1215 | 1220 | $(RM) -r $(TARNAME)/.mailmap | |
| 1216 | 1221 | $(RM) -r $(TARNAME)/deps/corepack | |
| 1217 | 1222 | $(RM) $(TARNAME)/test/parallel/test-corepack-version.js | |
| 1223 | + ifeq ($(SKIP_SHARED_DEPS), 1) | ||
| 1224 | + $(RM) -r $(TARNAME)/deps/ada | ||
| 1225 | + $(RM) -r $(TARNAME)/deps/brotli | ||
| 1226 | + $(RM) -r $(TARNAME)/deps/cares | ||
| 1227 | + $(RM) -r $(TARNAME)/deps/icu-small | ||
| 1228 | + $(RM) -r $(TARNAME)/deps/icu-tmp | ||
| 1229 | + $(RM) -r $(TARNAME)/deps/llhttp | ||
| 1230 | + $(RM) -r $(TARNAME)/deps/nghttp2 | ||
| 1231 | + $(RM) -r $(TARNAME)/deps/ngtcp2 | ||
| 1232 | + find $(TARNAME)/deps/openssl -maxdepth 1 -type f ! -name 'nodejs-openssl.cnf' -exec $(RM) {} + | ||
| 1233 | + find $(TARNAME)/deps/openssl -mindepth 1 -maxdepth 1 -type d -exec $(RM) -r {} + | ||
| 1234 | + $(RM) -r $(TARNAME)/deps/simdjson | ||
| 1235 | + $(RM) -r $(TARNAME)/deps/sqlite | ||
| 1236 | + $(RM) -r $(TARNAME)/deps/uv | ||
| 1237 | + $(RM) -r $(TARNAME)/deps/uvwasi | ||
| 1238 | + $(RM) -r $(TARNAME)/deps/zlib | ||
| 1239 | + $(RM) -r $(TARNAME)/deps/zstd | ||
| 1240 | + else | ||
| 1218 | 1241 | $(RM) -r $(TARNAME)/deps/openssl/openssl/demos | |
| 1219 | 1242 | $(RM) -r $(TARNAME)/deps/openssl/openssl/doc | |
| 1220 | 1243 | $(RM) -r $(TARNAME)/deps/openssl/openssl/test | |
| 1221 | 1244 | $(RM) -r $(TARNAME)/deps/uv/docs | |
| 1222 | 1245 | $(RM) -r $(TARNAME)/deps/uv/samples | |
| 1223 | 1246 | $(RM) -r $(TARNAME)/deps/uv/test | |
| 1247 | + endif | ||
| 1224 | 1248 | $(RM) -r $(TARNAME)/deps/v8/samples | |
| 1225 | 1249 | $(RM) -r $(TARNAME)/deps/v8/tools/profviz | |
| 1226 | 1250 | $(RM) -r $(TARNAME)/deps/v8/tools/run-tests.py | |
| Back | FazBrowse Home | New Git URL |
0 commit comments