Skip to content

Commit 047bbe2

Browse files
committed
test: final release verification — v0.0.50 + v0.4.50 on macos-15/14 incl. split-brain coverage
1 parent c8fe61c commit 047bbe2

1 file changed

Lines changed: 72 additions & 188 deletions

File tree

Lines changed: 72 additions & 188 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
# TEMPORARY workflow — macOS min-version support experiment (run B).
2-
#
3-
# Run A (previous commit) tested MACOSX_DEPLOYMENT_TARGET=14.0 with the
4-
# status-quo dynamic system-libc++ linkage. Run B tests the proposed end
5-
# state: deployment target 11.0 + statically linked LLVM libc++/libc++abi
6-
# (injected via `[build] ldflags`, which the released bootstrap mcpp
7-
# already honors — no mcpp code change needed for the experiment).
8-
#
9-
# job 1 (macos-15): bootstrap → warm toolchain → assert llvm payload
10-
# ships libc++.a/libc++abi.a → inject static ldflags
11-
# into both manifests → rebuild with target 11.0 →
12-
# assert minos=11.0 + no libc++ dylib dep → smoke.
13-
# job 2 (macos-14): control-check released minos15 binary is refused,
14-
# then run the minos11 artifacts end-to-end
15-
# (xlings self install + mcpp new/build/run).
16-
#
17-
# DO NOT MERGE. Delete branch after the investigation.
1+
# TEMPORARY — final verification of the shipped macOS min-version support
2+
# against the REAL release artifacts (mcpp v0.0.50 + xlings v0.4.50):
3+
# - control: released 0.0.49 (minos 15, dynamic libc++) refused on macOS 14
4+
# - new artifacts start on both macos-15 and macos-14
5+
# - full user flow on macOS 14: xlings self install -> mcpp new/build/run
6+
# - split-brain libc++ coverage: a `cout << int` program built with a
7+
# declared floor (static libc++ via -Wl,-load_hidden) runs clean
8+
# DO NOT MERGE. Close PR + delete branch after verification.
189
name: temp-macos14-support
1910

2011
on:
@@ -23,210 +14,103 @@ on:
2314
workflow_dispatch:
2415

2516
jobs:
26-
build-minos11:
27-
name: "build mcpp+xlings: target 11.0 + static LLVM libc++ (macos-15)"
28-
runs-on: macos-15
29-
timeout-minutes: 60
30-
steps:
31-
- uses: actions/checkout@v4
32-
33-
- uses: actions/checkout@v4
34-
with:
35-
repository: openxlings/xlings
36-
path: xlings-src
37-
38-
- name: Cache xlings (bootstrap)
39-
uses: actions/cache@v4
40-
with:
41-
path: ~/.xlings
42-
key: xlings-macos15-m14test-v2-${{ hashFiles('.xlings.json') }}
43-
restore-keys: |
44-
xlings-macos15-m14test-v2-
45-
46-
- name: Cache mcpp sandbox
47-
uses: actions/cache@v4
48-
with:
49-
path: ~/.mcpp
50-
key: mcpp-macos15-m14test-v2-${{ hashFiles('mcpp.toml') }}
51-
restore-keys: |
52-
mcpp-macos15-m14test-v2-
53-
54-
- name: Bootstrap mcpp via xlings
55-
env:
56-
XLINGS_NON_INTERACTIVE: '1'
57-
XLINGS_VERSION: '0.4.49'
58-
run: |
59-
if [ ! -x "$HOME/.xlings/subos/default/bin/xlings" ]; then
60-
WORK=$(mktemp -d)
61-
tarball="xlings-${XLINGS_VERSION}-macosx-arm64.tar.gz"
62-
curl -fsSL -o "${WORK}/${tarball}" \
63-
"https://github.com/openxlings/xlings/releases/download/v${XLINGS_VERSION}/${tarball}"
64-
tar -xzf "${WORK}/${tarball}" -C "${WORK}"
65-
"${WORK}/xlings-${XLINGS_VERSION}-macosx-arm64/subos/default/bin/xlings" self install
66-
fi
67-
export PATH="$HOME/.xlings/subos/default/bin:$PATH"
68-
xlings --version
69-
xlings install mcpp -y
70-
MCPP="$HOME/.xlings/subos/default/bin/mcpp"
71-
test -x "$MCPP"
72-
"$MCPP" --version
73-
echo "MCPP=$MCPP" >> "$GITHUB_ENV"
74-
echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
75-
76-
- name: Warm toolchain (installs llvm/ninja into the sandbox)
77-
env:
78-
MCPP_HOME: /Users/runner/.mcpp
79-
# Same target as the real build below: mcpp's BMI fingerprint
80-
# does not (yet) include the deployment target, so mixing
81-
# targets within one sandbox produces std.pcm config-mismatch
82-
# errors (observed in run B attempt 1; product fix tracked for
83-
# mcpp 0.0.50's toolchain fingerprint).
84-
MACOSX_DEPLOYMENT_TARGET: '11.0'
85-
run: |
86-
"$MCPP" build
87-
echo "warm build done (linkage/minos not asserted here)"
88-
89-
- name: "Assert llvm payload ships static libc++ archives"
90-
run: |
91-
LLVM_ROOT=$(find "$HOME/.mcpp/registry/data/xpkgs/xim-x-llvm" -maxdepth 1 -mindepth 1 -type d | head -1)
92-
test -n "$LLVM_ROOT"
93-
echo "LLVM_ROOT=$LLVM_ROOT" >> "$GITHUB_ENV"
94-
ls "$LLVM_ROOT/lib" | grep -E '^libc\+\+' || true
95-
test -f "$LLVM_ROOT/lib/libc++.a" || { echo "FAIL: libc++.a missing"; exit 1; }
96-
test -f "$LLVM_ROOT/lib/libc++abi.a" || { echo "FAIL: libc++abi.a missing"; exit 1; }
97-
98-
- name: "Build mcpp@HEAD (two-stage self-host: target 11.0, static libc++)"
99-
env:
100-
MACOSX_DEPLOYMENT_TARGET: '11.0'
101-
MCPP_HOME: /Users/runner/.mcpp
102-
run: |
103-
# Stage 1: bootstrap (0.0.49) builds mcpp@HEAD. Its macOS link
104-
# path hardcodes -lc++, so stage 1 is dynamically linked — fine,
105-
# it only needs to RUN on this runner.
106-
"$MCPP" build
107-
STAGE1=$(find target -type f -path '*/bin/mcpp' | head -1)
108-
STAGE1="$PWD/$STAGE1"
109-
"$STAGE1" --version
110-
# Stage 2: mcpp@HEAD rebuilds itself — its flags.cppm implements
111-
# staticStdlib for the macOS link path natively.
112-
"$STAGE1" build --no-cache
113-
ART=$(find target -type f -path '*/bin/mcpp' | head -1)
114-
test -n "$ART"
115-
echo "ART=$ART" >> "$GITHUB_ENV"
116-
echo "=== LC_BUILD_VERSION ==="
117-
otool -l "$ART" | grep -A4 LC_BUILD_VERSION | head -6
118-
otool -l "$ART" | grep -A4 LC_BUILD_VERSION | grep -q "minos 11.0" \
119-
|| { echo "FAIL: expected minos 11.0"; exit 1; }
120-
echo "=== dylib deps (must NOT contain libc++) ==="
121-
otool -L "$ART"
122-
if otool -L "$ART" | grep -q "libc++"; then
123-
echo "FAIL: still linked against system libc++"; exit 1
124-
fi
125-
echo "=== build.ninja ldflags (evidence) ==="
126-
grep -h "^ldflags" target/*/*/build.ninja | head -2 || true
127-
echo "=== smoke on macos-15 (checks static-dtor abort too) ==="
128-
"$ART" --version
129-
echo "exit: $?"
130-
131-
- name: Build xlings@main (target 11.0, static libc++, via minos11 mcpp)
132-
env:
133-
MACOSX_DEPLOYMENT_TARGET: '11.0'
134-
MCPP_HOME: /Users/runner/.mcpp
135-
run: |
136-
cd xlings-src
137-
"$GITHUB_WORKSPACE/$ART" build --no-cache
138-
XART=$(find target -type f -path '*/bin/xlings' | head -1)
139-
test -n "$XART"
140-
echo "XART=xlings-src/$XART" >> "$GITHUB_ENV"
141-
otool -l "$XART" | grep -A4 LC_BUILD_VERSION | head -6
142-
otool -l "$XART" | grep -A4 LC_BUILD_VERSION | grep -q "minos 11.0" \
143-
|| { echo "FAIL: expected minos 11.0"; exit 1; }
144-
if otool -L "$XART" | grep -q "libc++"; then
145-
echo "FAIL: still linked against system libc++"; exit 1
146-
fi
147-
"$XART" --version
148-
149-
- name: Upload minos11 binaries
150-
uses: actions/upload-artifact@v4
151-
with:
152-
name: minos11-binaries
153-
path: |
154-
${{ env.ART }}
155-
${{ env.XART }}
156-
157-
smoke-macos14:
158-
name: "run minos11 mcpp+xlings end-to-end on macos-14"
159-
needs: build-minos11
160-
runs-on: macos-14
17+
verify:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [macos-15, macos-14]
22+
name: "release verification (${{ matrix.os }})"
23+
runs-on: ${{ matrix.os }}
16124
timeout-minutes: 45
16225
steps:
163-
- name: "Runner info"
164-
run: sw_vers; uname -m
26+
- name: Runner info
27+
run: sw_vers
16528

166-
- name: "Control: released 0.0.49 (minos 15) must be refused by dyld"
29+
- name: "Control: released 0.0.49 (minos 15) behavior"
16730
run: |
16831
WORK=$(mktemp -d)
16932
curl -fsSL -o "$WORK/m.tar.gz" \
17033
"https://github.com/mcpp-community/mcpp/releases/download/v0.0.49/mcpp-0.0.49-macosx-arm64.tar.gz"
17134
tar -xzf "$WORK/m.tar.gz" -C "$WORK"
17235
if "$WORK/mcpp-0.0.49-macosx-arm64/bin/mcpp" --version 2>err.txt; then
173-
echo "UNEXPECTED: minos15 binary ran on macOS 14"
36+
echo "0.0.49 runs here (expected on macos-15)"
17437
else
175-
echo "confirmed refusal:"; head -3 err.txt
38+
echo "0.0.49 refused (expected on macos-14):"; head -3 err.txt
17639
fi
17740
178-
- name: Download minos11 binaries
179-
uses: actions/download-artifact@v4
180-
with:
181-
name: minos11-binaries
182-
path: art
183-
184-
- name: "minos11 binaries start on macOS 14"
185-
run: |
186-
chmod +x $(find art -type f)
187-
MCPP=$(find art -path '*bin/mcpp' -type f | head -1)
188-
XLINGS=$(find art -path '*bin/xlings' -type f | head -1)
189-
echo "MCPP=$PWD/$MCPP" >> "$GITHUB_ENV"
190-
echo "XLINGS=$PWD/$XLINGS" >> "$GITHUB_ENV"
191-
"$MCPP" --version
192-
"$XLINGS" --version
193-
194-
- name: "Assemble xlings home on macOS 14 (release layout + minos11 binary)"
41+
- name: "Install xlings v0.4.50 (release tarball self install)"
19542
env:
19643
XLINGS_NON_INTERACTIVE: '1'
19744
run: |
19845
WORK=$(mktemp -d)
199-
tarball="xlings-0.4.49-macosx-arm64.tar.gz"
46+
tarball="xlings-0.4.50-macosx-arm64.tar.gz"
20047
curl -fsSL -o "$WORK/$tarball" \
201-
"https://github.com/openxlings/xlings/releases/download/v0.4.49/$tarball"
48+
"https://github.com/openxlings/xlings/releases/download/v0.4.50/$tarball"
20249
tar -xzf "$WORK/$tarball" -C "$WORK"
203-
ROOT="$WORK/xlings-0.4.49-macosx-arm64"
204-
for p in "$ROOT/bin/xlings" "$ROOT/subos/default/bin/xlings"; do
205-
if [ -e "$p" ]; then cp "$XLINGS" "$p"; chmod +x "$p"; fi
206-
done
207-
"$ROOT/subos/default/bin/xlings" self install
50+
BIN="$WORK/xlings-0.4.50-macosx-arm64/bin/xlings"
51+
[ -x "$BIN" ] || BIN="$WORK/xlings-0.4.50-macosx-arm64/subos/default/bin/xlings"
52+
echo "=== shipped xlings LC_BUILD_VERSION ==="
53+
otool -l "$BIN" | grep -A4 LC_BUILD_VERSION | head -6
54+
otool -L "$BIN"
55+
"$BIN" self install
20856
echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
20957
export PATH="$HOME/.xlings/subos/default/bin:$PATH"
21058
xlings --version
21159
212-
- name: "mcpp end-to-end on macOS 14: new + build + run (installs llvm/ninja)"
60+
- name: "Install mcpp v0.0.50 (release tarball)"
61+
run: |
62+
WORK=$(mktemp -d)
63+
curl -fsSL -o "$WORK/m.tar.gz" \
64+
"https://github.com/mcpp-community/mcpp/releases/download/v0.0.50/mcpp-0.0.50-macosx-arm64.tar.gz"
65+
tar -xzf "$WORK/m.tar.gz" -C "$WORK"
66+
MCPP_ROOT="$WORK/mcpp-0.0.50-macosx-arm64"
67+
echo "=== shipped mcpp LC_BUILD_VERSION ==="
68+
otool -l "$MCPP_ROOT/bin/mcpp" | grep -A4 LC_BUILD_VERSION | head -6
69+
otool -L "$MCPP_ROOT/bin/mcpp"
70+
"$MCPP_ROOT/bin/mcpp" --version
71+
echo "MCPP=$MCPP_ROOT/bin/mcpp" >> "$GITHUB_ENV"
72+
73+
- name: "User flow: mcpp new hello + build + run"
21374
env:
21475
MCPP_HOME: /Users/runner/.mcpp
21576
run: |
216-
echo "=== DYLD/forensics: env ==="
217-
env | grep -i -E "dyld|library_path" || echo "(no dyld vars in env)"
21877
"$MCPP" new hello
21978
cd hello
22079
"$MCPP" build
22180
"$MCPP" run | head -3
22281
BIN=$(find target -type f -path '*/bin/hello' | head -1)
223-
echo "=== hello built natively on macOS 14 ==="
82+
echo "=== hello (host default floor) ==="
22483
otool -l "$BIN" | grep -A4 LC_BUILD_VERSION | head -6
22584
226-
- name: "Summary"
85+
- name: "Split-brain coverage: cout<<int with a declared floor"
86+
env:
87+
MCPP_HOME: /Users/runner/.mcpp
88+
MACOSX_DEPLOYMENT_TARGET: '14.0'
89+
run: |
90+
"$MCPP" new intprog
91+
cd intprog
92+
cat > src/main.cpp <<'CEOF'
93+
#include <iostream>
94+
int answer() { return 42; }
95+
int main() { std::cout << "int says " << answer() << std::endl; return 0; }
96+
CEOF
97+
"$MCPP" build
98+
BIN=$(ls -t $(find target -type f -path '*/bin/intprog') | head -1)
99+
echo "=== intprog (declared floor 14.0 -> static libc++) ==="
100+
otool -l "$BIN" | grep -A4 LC_BUILD_VERSION | head -6
101+
otool -L "$BIN"
102+
if otool -L "$BIN" | grep -q "libc++"; then
103+
echo "FAIL: declared-floor build still links system libc++"; exit 1
104+
fi
105+
OUT=$("$BIN")
106+
echo "output: $OUT exit=$?"
107+
[ "$OUT" = "int says 42" ] || { echo "FAIL: wrong output"; exit 1; }
108+
echo "SPLIT-BRAIN COVERAGE: OK"
109+
110+
- name: Summary
227111
if: always()
228112
run: |
229113
{
230-
echo "## macOS min-version experiment (run B: 11.0 + static libc++)"
231-
echo "- artifacts built on macos-15, executed end-to-end on macos-14"
114+
echo "## macOS min-version release verification (${{ matrix.os }})"
115+
echo "- mcpp v0.0.50 + xlings v0.4.50 release artifacts"
232116
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)