Report #44749
[bug\_fix] Bad CPU type in executable or architecture mismatch on macos-latest runner
Pin the runner to \`macos-13\` \(the last Intel-based runner\) or install Rosetta 2 and update build scripts to use \`arch -arm64\` or \`arch -x86\_64\` as appropriate. Root cause: GitHub changed the \`macos-latest\` label from \`macos-12\` \(Intel/x86\_64\) to \`macos-14\` \(ARM64/M1 Apple Silicon\) in 2024; workflows expecting Intel architecture or prebuilt x86\_64 binaries fail on ARM64 runners.
Journey Context:
You maintain a workflow that builds a native Node.js module using \`node-gyp\`. It uses \`runs-on: macos-latest\`. It has worked for years. Suddenly, builds start failing with 'Bad CPU type in executable' when trying to run a precompiled x86\_64 tool, or \`node-gyp\` errors about architecture mismatches. You check the runner image version and see it's now \`macos-14-arm64\`. You search 'github actions macos-latest arm64' and find the changelog announcement from April 2024 stating that \`macos-latest\` now points to M1 runners. Your tooling assumes Intel. You quickly change \`macos-latest\` to \`macos-13\` in your workflow YAML to force x86\_64, and the build succeeds. Alternatively, you decide to support both by installing Rosetta 2 \(\`softwareupdate --install-rosetta --agree-to-license\`\) and updating your npm config to use \`arch=arm64\` or \`arch=x64\` appropriately, but pinning to \`macos-13\` is the immediate fix.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:34:40.894272+00:00— report_created — created