From 7b03f0ad21d9d8d701ecd5867cb8f1ac52d406f7 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sat, 31 Oct 2026 10:05:16 +0700 Subject: [PATCH] fix(ci): migrate to the latest macOS runners (#8335) * fix(ci): replace retiring macOS 14 runners Use the supported macOS 15 ARM64 image before the November 2 retirement. Keep the Intel release runner and existing test/build/release commands unchanged. * fix(ci): use the latest macOS runner images --- .github/workflows/ci.yml | 4 ++-- .github/workflows/desktop-release.yml | 4 ++-- .github/workflows/nix.yml | 2 +- scripts/ci-workflow.test.mjs | 32 ++++++++++++++++++++++++++- 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cb267c2dd..285ff8e072 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -281,10 +281,10 @@ jobs: # otherwise has no server-test coverage. Scoped to the observer/watcher suites to # bound runtime. server-tests-macos: - name: server-tests (macos-14, file observation) + name: server-tests (macos-latest, file observation) needs: changes if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.server != 'false') }} - runs-on: macos-14 + runs-on: macos-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.yml index d81c036e62..26be12291b 100644 --- a/.github/workflows/desktop-release.yml +++ b/.github/workflows/desktop-release.yml @@ -100,10 +100,10 @@ jobs: fail-fast: false matrix: include: - - runner: macos-14 + - runner: macos-latest electron_arch: arm64 node_heap_mb: 4096 - - runner: macos-15-intel + - runner: macos-26-intel electron_arch: x64 node_heap_mb: 8192 permissions: diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index f37a8b0cdf..b653564793 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -101,7 +101,7 @@ jobs: run: nix build .#desktop -o result-desktop build-desktop-darwin: - runs-on: macos-14 + runs-on: macos-latest steps: - uses: actions/checkout@v4 diff --git a/scripts/ci-workflow.test.mjs b/scripts/ci-workflow.test.mjs index 37508cad7d..73a9003312 100644 --- a/scripts/ci-workflow.test.mjs +++ b/scripts/ci-workflow.test.mjs @@ -24,7 +24,10 @@ const gatedCiJobs = new Map([ "server-integration-windows", { name: "server-integration (windows-latest)", contract: "server" }, ], - ["server-tests-macos", { name: "server-tests (macos-14, file observation)", contract: "server" }], + [ + "server-tests-macos", + { name: "server-tests (macos-latest, file observation)", contract: "server" }, + ], ["desktop-tests-ubuntu", { name: "desktop-tests (ubuntu-latest)", contract: "desktop" }], ["desktop-tests-windows", { name: "desktop-tests (windows-latest)", contract: "desktop" }], ["app-tests", { name: "app-tests", contract: "app" }], @@ -649,3 +652,30 @@ process.exit(code); }); } }); + +// GitHub retires macOS 14 on 2026-11-02; brownouts already reject these jobs. +test("workflows avoid retired macOS 14 runners", () => { + for (const path of filesUnder(".github/workflows", (candidate) => /\.ya?ml$/.test(candidate))) { + assert.doesNotMatch( + readFileSync(new URL(path, repoRoot), "utf8"), + /macos-14(?:-large|-xlarge)?\b/, + path, + ); + } +}); + +test("macOS jobs use latest runners while preserving release architectures", () => { + for (const [workflow, jobId] of [ + [ciWorkflowPath, "server-tests-macos"], + [nixWorkflowPath, "build-desktop-darwin"], + ]) { + assert.match( + jobBlocks(readFileSync(workflow, "utf8")).get(jobId).join("\n"), + /^ runs-on: macos-latest$/m, + ); + } + const release = readFileSync(new URL(".github/workflows/desktop-release.yml", repoRoot), "utf8"); + assert.match(release, /runner: macos-latest\n\s+electron_arch: arm64/); + // GitHub has no standard macos-latest-intel alias; use the newest Intel image. + assert.match(release, /runner: macos-26-intel\n\s+electron_arch: x64/); +});