@@ -295,7 +295,7 @@ jobs:
295295 xlings-macos15-release-
296296 xlings-macos15-arm64-
297297
298- - name : Bootstrap xlings + LLVM
298+ - name : Bootstrap mcpp via xlings
299299 env :
300300 XLINGS_NON_INTERACTIVE : ' 1'
301301 XLINGS_VERSION : ' 0.4.30'
@@ -310,42 +310,37 @@ jobs:
310310 fi
311311 export PATH="$HOME/.xlings/subos/default/bin:$PATH"
312312 xlings --version
313- # Install LLVM
314- xlings install llvm -y || xlings install llvm@20.1.7 -y
315- LLVM_ROOT=$(find "$HOME/.xlings" -path "*/xpkgs/xim-x-llvm/*/bin/clang++" | head -1 | xargs dirname | xargs dirname)
316- echo "LLVM_ROOT=$LLVM_ROOT" >> "$GITHUB_ENV"
317-
318- - name : Install xmake (for bootstrap)
319- run : brew install xmake
320-
321- - name : Bootstrap-compile mcpp (xmake + LLVM)
322- run : |
323- export LLVM_ROOT="$LLVM_ROOT"
324- bash scripts/bootstrap-macos.sh "$LLVM_ROOT"
325- ./target/bootstrap/bin/mcpp --version
313+ xlings install mcpp -y
314+ MCPP="$HOME/.xlings/subos/default/bin/mcpp"
315+ test -x "$MCPP"
316+ "$MCPP" --version
317+ echo "MCPP=$MCPP" >> "$GITHUB_ENV"
318+ echo "XLINGS_BIN=$HOME/.xlings/subos/default/bin/xlings" >> "$GITHUB_ENV"
326319
327- - name : Self-host rebuild ( mcpp builds mcpp )
320+ - name : Build mcpp from source (self-host )
328321 run : |
329- # Put bootstrapped mcpp on PATH so build.ninja can find it for dyndep
330- export PATH="$PWD/target/bootstrap/bin:$PATH"
331- mcpp build
332- # Find the self-hosted binary
333- SELFHOST=$(find target -path "*/bin/mcpp" -not -path "*/bootstrap/*" -not -path "*/build/*" | head -1)
334- test -x "$SELFHOST"
335- "$SELFHOST" --version
336- echo "SELFHOST=$SELFHOST" >> "$GITHUB_ENV"
322+ export PATH="$HOME/.xlings/subos/default/bin:$PATH"
323+ export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
324+ "$MCPP" build
325+ MCPP_BIN=$(find target -path "*/bin/mcpp" | head -1)
326+ MCPP_BIN=$(cd "$(dirname "$MCPP_BIN")" && pwd)/$(basename "$MCPP_BIN")
327+ test -x "$MCPP_BIN"
328+ file "$MCPP_BIN"
329+ otool -L "$MCPP_BIN"
330+ "$MCPP_BIN" --version
331+ echo "MCPP_BIN=$MCPP_BIN" >> "$GITHUB_ENV"
337332
338333 - name : Package macOS release
339334 id : stage
340335 run : |
341336 VERSION="${{ steps.resolve.outputs.version }}"
342- TARBALL_NAME="mcpp-${VERSION}-darwin -arm64.tar.gz"
343- WRAPPER="mcpp-${VERSION}-darwin -arm64"
337+ TARBALL_NAME="mcpp-${VERSION}-macosx -arm64.tar.gz"
338+ WRAPPER="mcpp-${VERSION}-macosx -arm64"
344339
345340 # Create release layout
346341 STAGING=$(mktemp -d)
347342 mkdir -p "$STAGING/$WRAPPER/bin"
348- cp "$SELFHOST " "$STAGING/$WRAPPER/bin/mcpp"
343+ cp "$MCPP_BIN " "$STAGING/$WRAPPER/bin/mcpp"
349344 # Strip (Mach-O)
350345 strip "$STAGING/$WRAPPER/bin/mcpp" 2>/dev/null || true
351346 # Copy metadata
@@ -371,10 +366,10 @@ jobs:
371366 mkdir -p dist
372367 (cd "$STAGING" && tar -czf "$GITHUB_WORKSPACE/dist/${TARBALL_NAME}" "$WRAPPER")
373368 # Versionless alias
374- cp "dist/${TARBALL_NAME}" "dist/mcpp-darwin -arm64.tar.gz"
369+ cp "dist/${TARBALL_NAME}" "dist/mcpp-macosx -arm64.tar.gz"
375370 # SHA256
376371 (cd dist && shasum -a 256 "${TARBALL_NAME}" > "${TARBALL_NAME}.sha256")
377- (cd dist && shasum -a 256 "mcpp-darwin -arm64.tar.gz" > "mcpp-darwin -arm64.tar.gz.sha256")
372+ (cd dist && shasum -a 256 "mcpp-macosx -arm64.tar.gz" > "mcpp-macosx -arm64.tar.gz.sha256")
378373
379374 echo "tarball=${TARBALL_NAME}" >> "$GITHUB_OUTPUT"
380375 ls -la dist/
@@ -394,7 +389,7 @@ jobs:
394389 with :
395390 tag_name : ${{ steps.resolve.outputs.tag }}
396391 files : |
397- dist/mcpp-${{ steps.resolve.outputs.version }}-darwin -arm64.tar.gz
398- dist/mcpp-${{ steps.resolve.outputs.version }}-darwin -arm64.tar.gz.sha256
399- dist/mcpp-darwin -arm64.tar.gz
400- dist/mcpp-darwin -arm64.tar.gz.sha256
392+ dist/mcpp-${{ steps.resolve.outputs.version }}-macosx -arm64.tar.gz
393+ dist/mcpp-${{ steps.resolve.outputs.version }}-macosx -arm64.tar.gz.sha256
394+ dist/mcpp-macosx -arm64.tar.gz
395+ dist/mcpp-macosx -arm64.tar.gz.sha256
0 commit comments