Skip to content

temp-macos14-support #7

temp-macos14-support

temp-macos14-support #7

# TEMPORARY — final verification of the shipped macOS min-version support
# against the REAL release artifacts (mcpp v0.0.50 + xlings v0.4.50):
# - control: released 0.0.49 (minos 15, dynamic libc++) refused on macOS 14
# - new artifacts start on both macos-15 and macos-14
# - full user flow on macOS 14: xlings self install -> mcpp new/build/run
# - split-brain libc++ coverage: a `cout << int` program built with a
# declared floor (static libc++ via -Wl,-load_hidden) runs clean
# DO NOT MERGE. Close PR + delete branch after verification.
name: temp-macos14-support
on:
pull_request:
branches: [main]
workflow_dispatch:
jobs:
verify:
strategy:
fail-fast: false
matrix:
os: [macos-15, macos-14]
name: "release verification (${{ matrix.os }})"
runs-on: ${{ matrix.os }}
timeout-minutes: 45
steps:
- name: Runner info
run: sw_vers
- name: "Control: released 0.0.49 (minos 15) behavior"
run: |
WORK=$(mktemp -d)
curl -fsSL -o "$WORK/m.tar.gz" \
"https://github.com/mcpp-community/mcpp/releases/download/v0.0.49/mcpp-0.0.49-macosx-arm64.tar.gz"
tar -xzf "$WORK/m.tar.gz" -C "$WORK"
if "$WORK/mcpp-0.0.49-macosx-arm64/bin/mcpp" --version 2>err.txt; then
echo "0.0.49 runs here (expected on macos-15)"
else
echo "0.0.49 refused (expected on macos-14):"; head -3 err.txt
fi
- name: "Install xlings v0.4.50 (release tarball self install)"
env:
XLINGS_NON_INTERACTIVE: '1'
run: |
WORK=$(mktemp -d)
tarball="xlings-0.4.50-macosx-arm64.tar.gz"
curl -fsSL -o "$WORK/$tarball" \
"https://github.com/openxlings/xlings/releases/download/v0.4.50/$tarball"
tar -xzf "$WORK/$tarball" -C "$WORK"
BIN="$WORK/xlings-0.4.50-macosx-arm64/bin/xlings"
[ -x "$BIN" ] || BIN="$WORK/xlings-0.4.50-macosx-arm64/subos/default/bin/xlings"
echo "=== shipped xlings LC_BUILD_VERSION ==="
otool -l "$BIN" | grep -A4 LC_BUILD_VERSION | head -6
otool -L "$BIN"
"$BIN" self install
echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
export PATH="$HOME/.xlings/subos/default/bin:$PATH"
xlings --version
- name: "Install mcpp v0.0.50 (release tarball)"
run: |
WORK=$(mktemp -d)
curl -fsSL -o "$WORK/m.tar.gz" \
"https://github.com/mcpp-community/mcpp/releases/download/v0.0.50/mcpp-0.0.50-macosx-arm64.tar.gz"
tar -xzf "$WORK/m.tar.gz" -C "$WORK"
MCPP_ROOT="$WORK/mcpp-0.0.50-macosx-arm64"
echo "=== shipped mcpp LC_BUILD_VERSION ==="
otool -l "$MCPP_ROOT/bin/mcpp" | grep -A4 LC_BUILD_VERSION | head -6
otool -L "$MCPP_ROOT/bin/mcpp"
"$MCPP_ROOT/bin/mcpp" --version
echo "MCPP=$MCPP_ROOT/bin/mcpp" >> "$GITHUB_ENV"
- name: "User flow: mcpp new hello + build + run"
env:
MCPP_HOME: /Users/runner/.mcpp
run: |
"$MCPP" new hello
cd hello
"$MCPP" build
"$MCPP" run | head -3
BIN=$(find target -type f -path '*/bin/hello' | head -1)
echo "=== hello (host default floor) ==="
otool -l "$BIN" | grep -A4 LC_BUILD_VERSION | head -6
- name: "Split-brain coverage: cout<<int with a declared floor"
env:
MCPP_HOME: /Users/runner/.mcpp
MACOSX_DEPLOYMENT_TARGET: '14.0'
run: |
"$MCPP" new intprog
cd intprog
cat > src/main.cpp <<'CEOF'
#include <iostream>
int answer() { return 42; }
int main() { std::cout << "int says " << answer() << std::endl; return 0; }
CEOF
"$MCPP" build
BIN=$(ls -t $(find target -type f -path '*/bin/intprog') | head -1)
echo "=== intprog (declared floor 14.0 -> static libc++) ==="
otool -l "$BIN" | grep -A4 LC_BUILD_VERSION | head -6
otool -L "$BIN"
if otool -L "$BIN" | grep -q "libc++"; then
echo "FAIL: declared-floor build still links system libc++"; exit 1
fi
OUT=$("$BIN")
echo "output: $OUT exit=$?"
[ "$OUT" = "int says 42" ] || { echo "FAIL: wrong output"; exit 1; }
echo "SPLIT-BRAIN COVERAGE: OK"
- name: Summary
if: always()
run: |
{
echo "## macOS min-version release verification (${{ matrix.os }})"
echo "- mcpp v0.0.50 + xlings v0.4.50 release artifacts"
} >> "$GITHUB_STEP_SUMMARY"