Skip to content

Commit ce0af3d

Browse files
committed
fix: reuse macos ci llvm toolchain
1 parent b047012 commit ce0af3d

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/ci-macos.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,38 @@ jobs:
278278
echo "MCPP=$MCPP" >> "$GITHUB_ENV"
279279
echo "XLINGS_BIN=$HOME/.xlings/subos/default/bin/xlings" >> "$GITHUB_ENV"
280280
281+
- name: Configure dev mcpp sandbox to reuse xlings LLVM
282+
run: |
283+
LLVM_PKG="$HOME/.xlings/data/xpkgs/xim-x-llvm/20.1.7"
284+
test -d "$LLVM_PKG"
285+
printf '1\n' > "$LLVM_PKG/.mcpp_ok"
286+
287+
mkdir -p "$HOME/.mcpp"
288+
cat > "$HOME/.mcpp/config.toml" <<EOF
289+
# mcpp global config for CI. Dev binaries under target/.../bin/mcpp
290+
# fall back to ~/.mcpp; point that sandbox at the xlings home already
291+
# populated by the explicit `xlings install llvm` step above.
292+
[xlings]
293+
binary = "$HOME/.xlings/subos/default/bin/xlings"
294+
home = "$HOME/.xlings"
295+
296+
[index]
297+
default = "mcpplibs"
298+
299+
[index.repos."mcpplibs"]
300+
url = "https://github.com/mcpp-community/mcpp-index.git"
301+
302+
[cache]
303+
search_ttl_seconds = 3600
304+
305+
[build]
306+
default_jobs = 0
307+
default_backend = "ninja"
308+
EOF
309+
310+
cat "$HOME/.mcpp/config.toml"
311+
ls "$LLVM_PKG/bin/clang++"
312+
281313
- name: Build mcpp from source (self-host)
282314
run: |
283315
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"

0 commit comments

Comments
 (0)