From a839e11cf050f6df06ae273c55ac539beb903874 Mon Sep 17 00:00:00 2001 From: Dennis Paler Date: Fri, 27 Nov 2026 15:22:49 +0800 Subject: [PATCH] ci(release): build macOS binaries on macos-26; macos-14 is retired The v0.4.0-rc.1 release run never started its macOS builds: GitHub rejects macos-14 ("The configuration 'macos-14-arm64-us-default' is not supported"), so both darwin jobs sat queued and publish never ran. Use macos-26, what macos-latest resolves to today. Pin MACOSX_DEPLOYMENT_TARGET to v0.3.3's minimums (11.0 arm64, 10.12 x64) so the newer image cannot raise them, and fail the build if any binary reports a different minimum. A test rejects retired macOS labels. --- .github/workflows/release.yml | 29 ++++++++++++++++++++++++++-- scripts/release/release-plan.test.js | 12 ++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a5fb947..63580e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -140,15 +140,21 @@ jobs: fail-fast: false matrix: include: + # macos-14 is retired: GitHub rejects it ("The configuration + # 'macos-14-arm64-us-default' is not supported") and the job never + # starts. macos-26 is what macos-latest resolved to on 2026-11-27 + # (CI run 45954941719, image macos-26-arm64). - platform: darwin-arm64 - os: macos-14 # GitHub's ARM macOS runner + os: macos-26 # ARM runner target: aarch64-apple-darwin + macos_min: "11.0" # v0.3.3's minimum; Rust's default cross: false runnable: true - platform: darwin-x64 - os: macos-14 # Cross-compile x64 from ARM runner (macos-13 deprecated) + os: macos-26 # Cross-compile x64 from the ARM runner target: x86_64-apple-darwin + macos_min: "10.12" # v0.3.3's minimum; Rust's default cross: false runnable: false # Rosetta is not guaranteed on the runner @@ -202,8 +208,11 @@ jobs: if: matrix.cross run: cargo install cross --locked --git https://github.com/cross-rs/cross --rev a9301e91f72bba3850460512685f6b16062015ff + # Pinned so a newer runner image cannot raise the minimum macOS version. - name: Build (native) if: "!matrix.cross" + env: + MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_min }} run: > cargo build --release --locked --target ${{ matrix.target }} @@ -222,6 +231,22 @@ jobs: -p tailflow-daemon -p tailflow-agent + - name: Binaries keep the minimum macOS version + if: runner.os == 'macOS' + shell: bash + env: + EXPECTED: ${{ matrix.macos_min }} + BIN_DIR: target/${{ matrix.target }}/release + run: | + for b in tailflow tailflow-daemon tailflow-mcp tailflow-logs; do + min=$(otool -l "$BIN_DIR/$b" | awk '/LC_BUILD_VERSION/{bv=1} /LC_VERSION_MIN_MACOSX/{vm=1} bv&&$1=="minos"{print $2; exit} vm&&$1=="version"{print $2; exit}') + echo "$b: minimum macOS ${min:-unknown}" + if [ "$min" != "$EXPECTED" ]; then + echo "::error::$b requires macOS ${min:-unknown}, expected $EXPECTED" + exit 1 + fi + done + # The binaries must report the tag's version (they read it from # Cargo.toml at compile time). Checked where the runner can execute them. - name: Binaries report the release version diff --git a/scripts/release/release-plan.test.js b/scripts/release/release-plan.test.js index ac6852e..ccfe63d 100644 --- a/scripts/release/release-plan.test.js +++ b/scripts/release/release-plan.test.js @@ -413,6 +413,18 @@ test('release.yml pins actions, scopes permissions and routes npm publish throug assert.match(yml, /make_latest:\s*\$\{\{\s*needs\.plan\.outputs\.make_latest\s*\}\}/) }) +test('release.yml macOS builds use a supported runner and keep the minimum macOS version', () => { + const yml = fs.readFileSync(path.join(ROOT, '.github/workflows/release.yml'), 'utf8') + // Retired labels are not errors at parse time: the job just never starts. + const os = [...yml.matchAll(/^\s+os:\s*(\S+)/gm)].map((m) => m[1]) + for (const label of os) assert.doesNotMatch(label, /^macos-1[0-4]\b/, `${label} is a retired runner`) + for (const target of ['aarch64-apple-darwin', 'x86_64-apple-darwin']) { + assert.match(yml, new RegExp(`target: ${target}\\n\\s+macos_min: "\\d+\\.\\d+"`), `${target} needs macos_min`) + } + assert.match(yml, /MACOSX_DEPLOYMENT_TARGET: \$\{\{ matrix\.macos_min \}\}/) + assert.match(yml, /name: Binaries keep the minimum macOS version\n\s+if: runner\.os == 'macOS'/) +}) + // ── CLI ──────────────────────────────────────────────────────────────────── test('plan CLI writes the GitHub outputs the workflow reads', () => {