Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions scripts/release/release-plan.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Loading