@@ -417,15 +417,40 @@ jobs:
417417 build_btc/src/c2pool/c2pool-btc --help 2>&1 | head -3 || true
418418
419419 # ════════════════════════════════════════════════════════════════════════════
420- # macOS (Apple Silicon arm64 — GitHub only provides ARM runners now)
421- # Intel x86_64 macOS binary is built locally; see doc/build-macos.md
420+ # macOS (matrix: arm64 on GitHub-hosted macos-14, x86_64 on the self-hosted
421+ # Intel runner labeled c2pool-mac-intel). The self-hosted lane resolves the
422+ # macOS x86_64 CI starvation (#42) — macpro-intel-204 standup 2026-06-16.
422423 # ════════════════════════════════════════════════════════════════════════════
423424 macos :
424- name : macOS arm64
425- runs-on : macos-14
425+ name : macOS ${{ matrix.arch }}
426+ runs-on : ${{ matrix.runner }}
427+ strategy :
428+ fail-fast : false
429+ matrix :
430+ include :
431+ - arch : arm64
432+ runner : macos-14
433+ - arch : x86_64
434+ runner : [self-hosted, macOS, X64, c2pool-mac-intel]
426435 steps :
427436 - uses : actions/checkout@v6
428437
438+ - name : Set up Homebrew PATH
439+ # Self-hosted Intel runner (macpro-intel-204) launches the Actions
440+ # service from launchd, whose PATH omits Homebrew's /usr/local/bin
441+ # (#100: brew exit 127). GitHub-hosted arm64 keeps /opt/homebrew on PATH.
442+ # Append whichever prefix actually has brew so every later step
443+ # (cmake, brew --prefix) inherits it via $GITHUB_PATH.
444+ run : |
445+ if [ -x /opt/homebrew/bin/brew ]; then
446+ echo "/opt/homebrew/bin" >> "$GITHUB_PATH"
447+ elif [ -x /usr/local/bin/brew ]; then
448+ echo "/usr/local/bin" >> "$GITHUB_PATH"
449+ else
450+ echo "::error::Homebrew not found at /opt/homebrew or /usr/local on ${RUNNER_NAME:-runner}" >&2
451+ exit 1
452+ fi
453+
429454 - name : Install dependencies
430455 run : brew install cmake boost leveldb secp256k1 nlohmann-json yaml-cpp
431456
@@ -442,17 +467,18 @@ jobs:
442467 if : startsWith(github.ref, 'refs/tags/v')
443468 run : |
444469 VERSION="${GITHUB_REF_NAME#v}"
445- PKG="c2pool-${VERSION}-macos-arm64"
470+ PKG="c2pool-${VERSION}-macos-${{ matrix.arch }}"
471+ BREW="$(brew --prefix)"
446472 mkdir -p "${PKG}/lib" "${PKG}/config" "${PKG}/web-static" "${PKG}/explorer"
447473 cp build/src/c2pool/c2pool "${PKG}/"
448474 strip "${PKG}/c2pool"
449- for dylib in $(otool -L "${PKG}/c2pool" | grep "/opt/homebrew " | awk '{print $1}'); do
475+ for dylib in $(otool -L "${PKG}/c2pool" | grep "${BREW} " | awk '{print $1}'); do
450476 base=$(basename "$dylib")
451477 cp "$dylib" "${PKG}/lib/${base}"
452478 install_name_tool -change "$dylib" "@executable_path/lib/${base}" "${PKG}/c2pool"
453479 done
454480 for lib in "${PKG}"/lib/*.dylib; do
455- for ref in $(otool -L "$lib" | grep "/opt/homebrew " | awk '{print $1}'); do
481+ for ref in $(otool -L "$lib" | grep "${BREW} " | awk '{print $1}'); do
456482 base=$(basename "$ref")
457483 [ -f "${PKG}/lib/${base}" ] && install_name_tool -change "$ref" "@executable_path/lib/${base}" "$lib"
458484 done
@@ -469,8 +495,8 @@ jobs:
469495 if : startsWith(github.ref, 'refs/tags/v')
470496 uses : actions/upload-artifact@v7
471497 with :
472- name : macos-arm64
473- path : c2pool-*-macos-arm64 .zip*
498+ name : macos-${{ matrix.arch }}
499+ path : c2pool-*-macos-${{ matrix.arch }} .zip*
474500
475501 # ════════════════════════════════════════════════════════════════════════════
476502 # Windows (MSVC 2022, Conan)
0 commit comments