From 24fcc08e0e40fa7f47bdbb2ff960b0c861d6d61f Mon Sep 17 00:00:00 2001 From: qqqys Date: Mon, 22 Jun 2026 20:50:37 +0800 Subject: [PATCH] ci(audio-capture): cross-compile darwin-x64 prebuild on arm64 runner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The macos-13 (Intel) prebuild job routinely sits in the GitHub-hosted runner queue for 20+ min while every other platform finishes in under a minute, stalling the audio prebuild collection and the Release run. macos-13 is the only Intel x64 macOS image and its runner pool is scarce and on GitHub's deprecation path. Drop it and cross-compile the x64 slice on the macos-14 arm64 runner via `prebuildify --arch x64`; binding.gyp links only universal frameworks so clang -arch handles it. Verified locally on Apple Silicon: the produced darwin-x64 .node is Mach-O x86_64. Downstream is unaffected — create-standalone-package.js gates on the prebuilds/darwin-x64/*.node file, and collect merges via the prebuilds-* glob. Closes #5642 Co-authored-by: Qwen-Coder --- .github/workflows/audio-capture-prebuilds.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/audio-capture-prebuilds.yml b/.github/workflows/audio-capture-prebuilds.yml index 16aa1502eed..3de6fc2cebb 100644 --- a/.github/workflows/audio-capture-prebuilds.yml +++ b/.github/workflows/audio-capture-prebuilds.yml @@ -34,12 +34,11 @@ jobs: fail-fast: false matrix: include: + # arm64 runner; also cross-compiles the x64 slice (see Build step) to + # avoid the scarce macos-13 Intel runner that queues 20+ min (#5642). - os: 'macos-14' runner: 'macos-14' arch: 'arm64' - - os: 'macos-13' - runner: 'macos-13' - arch: 'x64' - os: 'ubuntu-latest' runner: 'ubuntu-latest' arch: 'x64' @@ -59,7 +58,14 @@ jobs: - name: 'Install build deps' run: 'npm install --no-workspaces --ignore-scripts --no-audit --no-fund' - name: 'Build prebuild' - run: 'npm run prebuildify' + shell: 'bash' + run: | + npm run prebuildify + # Cross-compile the Intel (x64) slice on this arm64 runner instead of + # a separate macos-13 runner (frameworks are universal). See #5642. + if [ "$RUNNER_OS" = 'macOS' ]; then + npm run prebuildify -- --arch x64 + fi - name: 'Upload prebuild' uses: 'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a' # v7.0.1 with: