From 487834e53d2a36bfa224714dc1c3aa02a6ed33f0 Mon Sep 17 00:00:00 2001 From: David Grelaud <1288509+dgrelaud@users.noreply.github.com> Date: Thu, 26 Mar 2026 11:37:56 +0100 Subject: [PATCH 01/10] Update build-macos.yml Trying to speed up mac build using --ninja https://github.com/nodejs/node/blob/main/doc/contributing/building-node-with-ninja.md --- .github/workflows/build-macos.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index cc6bef20..aacf746d 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -41,9 +41,13 @@ jobs: df -h echo "::endgroup::" + - name: Install build tools + run: brew install ninja + - run: yarn start --node-range node${{ matrix.target-node }} --arch x64 --output dist env: MAKE_JOB_COUNT: 4 # prevent to run out of memory + NODE_CONFIGURE_ARGS: --ninja # speed up compilation - name: Check if binary is compiled, skip if download only id: check_file @@ -88,8 +92,8 @@ jobs: # add missing distutils package to python 3.12 - name: Install distutils - run: brew install python-setuptools - + run: brew install python-setuptools ninja + # Remove unneeded stuff to free up build space (from Node https://github.com/nodejs/build/issues/3878) - name: Cleanup before build run: | @@ -102,6 +106,7 @@ jobs: - run: yarn start --node-range node${{ matrix.target-node }} --arch arm64 --output dist env: MAKE_JOB_COUNT: 2 # prevent to run out of memory + NODE_CONFIGURE_ARGS: --ninja # speed up compilation - name: Check if binary is compiled id: check_file From 73efde229a242e32cbb04d1319f61ecd1682f0f8 Mon Sep 17 00:00:00 2001 From: David Grelaud <1288509+dgrelaud@users.noreply.github.com> Date: Thu, 26 Mar 2026 11:46:55 +0100 Subject: [PATCH 02/10] Update build.ts accept NODE_CONFIGURE_ARGS env --- lib/build.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/build.ts b/lib/build.ts index 4bc5110f..feb23c2a 100644 --- a/lib/build.ts +++ b/lib/build.ts @@ -288,6 +288,10 @@ async function compileOnUnix( args.push(...getConfigureArgs(getMajor(nodeVersion), targetPlatform, targetArch)); + // Accept extra configuration coming from github action like "--ninja" to speed up macos build + const extraConfigureArgs = (process.env.NODE_CONFIGURE_ARGS || '').split(/\s+/).filter(Boolean); + args.push(...extraConfigureArgs); + log.info("Running configure with: ", args.join(" ")); // TODO same for windows? await spawn('/bin/sh', ['./configure', ...args], { From 181a1afa4fe62bf046d6351b5a300a9350eed4fd Mon Sep 17 00:00:00 2001 From: David Grelaud <1288509+dgrelaud@users.noreply.github.com> Date: Thu, 26 Mar 2026 11:47:55 +0100 Subject: [PATCH 03/10] Update build-macos.yml remove useless changes --- .github/workflows/build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index aacf746d..f18ac856 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -93,7 +93,7 @@ jobs: # add missing distutils package to python 3.12 - name: Install distutils run: brew install python-setuptools ninja - + # Remove unneeded stuff to free up build space (from Node https://github.com/nodejs/build/issues/3878) - name: Cleanup before build run: | From cdba6189c6ed2be94a069e6f53b33cb206f7f1bf Mon Sep 17 00:00:00 2001 From: David Grelaud Date: Mon, 30 Mar 2026 23:55:05 +0200 Subject: [PATCH 04/10] switch to macos-26 machines --- .github/workflows/build-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index f18ac856..628a3185 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -6,7 +6,7 @@ on: jobs: macos-x64: - runs-on: macos-15-intel + runs-on: macos-26-intel strategy: fail-fast: false @@ -62,7 +62,7 @@ jobs: path: dist/* macos-arm64: - runs-on: macos-14 # macos-14 is arm64: https://github.com/actions/runner-images#available-images + runs-on: macos-26 # is arm64: https://github.com/actions/runner-images#available-images strategy: fail-fast: false From 406ae66c24073036660a284932630719cd43b58e Mon Sep 17 00:00:00 2001 From: David Grelaud Date: Tue, 31 Mar 2026 00:24:29 +0200 Subject: [PATCH 05/10] install GNU make v4 to fix make -j N option https://github.com/nodejs/node/issues/53176#issuecomment-2134740862 --- .github/workflows/build-macos.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 628a3185..0142a860 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -41,8 +41,9 @@ jobs: df -h echo "::endgroup::" + # install GNU make v4 to fix make -j N option https://github.com/nodejs/node/issues/53176#issuecomment-2134740862 - name: Install build tools - run: brew install ninja + run: brew install ninja make - run: yarn start --node-range node${{ matrix.target-node }} --arch x64 --output dist env: @@ -91,8 +92,9 @@ jobs: - run: yarn install --ignore-engines # add missing distutils package to python 3.12 + # install GNU make v4 to fix make -j N option https://github.com/nodejs/node/issues/53176#issuecomment-2134740862 - name: Install distutils - run: brew install python-setuptools ninja + run: brew install python-setuptools ninja make # Remove unneeded stuff to free up build space (from Node https://github.com/nodejs/build/issues/3878) - name: Cleanup before build From b262d87a8c26417d6941a8d967d114d1fee0094d Mon Sep 17 00:00:00 2001 From: David Grelaud Date: Tue, 31 Mar 2026 00:32:13 +0200 Subject: [PATCH 06/10] replace existing make by new one --- .github/workflows/build-macos.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 0142a860..86b34b56 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -45,6 +45,14 @@ jobs: - name: Install build tools run: brew install ninja make + - name: Put new GNU Make binary first in PATH + run: echo "$(brew --prefix)/opt/make/libexec/gnubin" >> "$GITHUB_PATH" + + - name: Check make + run: | + which make + make --version + - run: yarn start --node-range node${{ matrix.target-node }} --arch x64 --output dist env: MAKE_JOB_COUNT: 4 # prevent to run out of memory @@ -96,6 +104,14 @@ jobs: - name: Install distutils run: brew install python-setuptools ninja make + - name: Put new GNU Make binary first in PATH + run: echo "$(brew --prefix)/opt/make/libexec/gnubin" >> "$GITHUB_PATH" + + - name: Check make + run: | + which make + make --version + # Remove unneeded stuff to free up build space (from Node https://github.com/nodejs/build/issues/3878) - name: Cleanup before build run: | From ae147402e396ffe9fed3c3097811f4b331274a78 Mon Sep 17 00:00:00 2001 From: David Grelaud Date: Tue, 31 Mar 2026 09:47:04 +0200 Subject: [PATCH 07/10] use more powerful machine --- .github/workflows/build-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 86b34b56..805c9cd4 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -6,7 +6,7 @@ on: jobs: macos-x64: - runs-on: macos-26-intel + runs-on: macos-26-large strategy: fail-fast: false @@ -71,7 +71,7 @@ jobs: path: dist/* macos-arm64: - runs-on: macos-26 # is arm64: https://github.com/actions/runner-images#available-images + runs-on: macos-26-xlarge # is arm64: https://github.com/actions/runner-images#available-images strategy: fail-fast: false From 3b4b07f1885c39c57ee5b167c15eee283161ea7c Mon Sep 17 00:00:00 2001 From: David Grelaud Date: Tue, 31 Mar 2026 09:54:15 +0200 Subject: [PATCH 08/10] restore macos version --- .github/workflows/build-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 805c9cd4..86b34b56 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -6,7 +6,7 @@ on: jobs: macos-x64: - runs-on: macos-26-large + runs-on: macos-26-intel strategy: fail-fast: false @@ -71,7 +71,7 @@ jobs: path: dist/* macos-arm64: - runs-on: macos-26-xlarge # is arm64: https://github.com/actions/runner-images#available-images + runs-on: macos-26 # is arm64: https://github.com/actions/runner-images#available-images strategy: fail-fast: false From 63e8e970e6063ba383ffa0aa5249a658300dd1de Mon Sep 17 00:00:00 2001 From: David Grelaud Date: Tue, 31 Mar 2026 16:24:43 +0200 Subject: [PATCH 09/10] with community macos-15-large + increased job count --- .github/workflows/build-macos.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 86b34b56..cfb87cd1 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -6,7 +6,7 @@ on: jobs: macos-x64: - runs-on: macos-26-intel + runs-on: macos-15-large strategy: fail-fast: false @@ -55,7 +55,7 @@ jobs: - run: yarn start --node-range node${{ matrix.target-node }} --arch x64 --output dist env: - MAKE_JOB_COUNT: 4 # prevent to run out of memory + MAKE_JOB_COUNT: 8 # prevent to run out of memory NODE_CONFIGURE_ARGS: --ninja # speed up compilation - name: Check if binary is compiled, skip if download only @@ -71,7 +71,7 @@ jobs: path: dist/* macos-arm64: - runs-on: macos-26 # is arm64: https://github.com/actions/runner-images#available-images + runs-on: macos-15-xlarge # is arm64: https://github.com/actions/runner-images#available-images strategy: fail-fast: false @@ -123,7 +123,7 @@ jobs: - run: yarn start --node-range node${{ matrix.target-node }} --arch arm64 --output dist env: - MAKE_JOB_COUNT: 2 # prevent to run out of memory + MAKE_JOB_COUNT: 4 # prevent to run out of memory NODE_CONFIGURE_ARGS: --ninja # speed up compilation - name: Check if binary is compiled From 604d3b4bf3dde5a65ee2c48be554863f10ea71ff Mon Sep 17 00:00:00 2001 From: David Grelaud Date: Tue, 31 Mar 2026 16:37:19 +0200 Subject: [PATCH 10/10] restore to free runner --- .github/workflows/build-macos.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index cfb87cd1..86b34b56 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -6,7 +6,7 @@ on: jobs: macos-x64: - runs-on: macos-15-large + runs-on: macos-26-intel strategy: fail-fast: false @@ -55,7 +55,7 @@ jobs: - run: yarn start --node-range node${{ matrix.target-node }} --arch x64 --output dist env: - MAKE_JOB_COUNT: 8 # prevent to run out of memory + MAKE_JOB_COUNT: 4 # prevent to run out of memory NODE_CONFIGURE_ARGS: --ninja # speed up compilation - name: Check if binary is compiled, skip if download only @@ -71,7 +71,7 @@ jobs: path: dist/* macos-arm64: - runs-on: macos-15-xlarge # is arm64: https://github.com/actions/runner-images#available-images + runs-on: macos-26 # is arm64: https://github.com/actions/runner-images#available-images strategy: fail-fast: false @@ -123,7 +123,7 @@ jobs: - run: yarn start --node-range node${{ matrix.target-node }} --arch arm64 --output dist env: - MAKE_JOB_COUNT: 4 # prevent to run out of memory + MAKE_JOB_COUNT: 2 # prevent to run out of memory NODE_CONFIGURE_ARGS: --ninja # speed up compilation - name: Check if binary is compiled