Skip to content

Commit f7d23c9

Browse files
authored
Merge pull request #80 from mcpp-community/fix/macos-ci-reuse-llvm-sandbox
fix: reuse macos ci llvm toolchain
2 parents b047012 + 196b792 commit f7d23c9

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/ci-macos.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,42 @@ 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+
MCPP_LLVM_LINK="$HOME/.mcpp/registry/data/xpkgs/xim-x-llvm/20.1.7"
285+
test -d "$LLVM_PKG"
286+
printf '1\n' > "$LLVM_PKG/.mcpp_ok"
287+
288+
mkdir -p "$HOME/.mcpp/registry/data/xpkgs/xim-x-llvm"
289+
rm -rf "$MCPP_LLVM_LINK"
290+
ln -s "$LLVM_PKG" "$MCPP_LLVM_LINK"
291+
292+
mkdir -p "$HOME/.mcpp"
293+
cat > "$HOME/.mcpp/config.toml" <<EOF
294+
# mcpp global config for CI. Dev binaries under target/.../bin/mcpp
295+
# fall back to ~/.mcpp; keep its registry isolated while reusing
296+
# the LLVM package already installed by `xlings install llvm`.
297+
[xlings]
298+
binary = "$HOME/.xlings/subos/default/bin/xlings"
299+
300+
[index]
301+
default = "mcpplibs"
302+
303+
[index.repos."mcpplibs"]
304+
url = "https://github.com/mcpp-community/mcpp-index.git"
305+
306+
[cache]
307+
search_ttl_seconds = 3600
308+
309+
[build]
310+
default_jobs = 0
311+
default_backend = "ninja"
312+
EOF
313+
314+
cat "$HOME/.mcpp/config.toml"
315+
ls "$MCPP_LLVM_LINK/bin/clang++"
316+
281317
- name: Build mcpp from source (self-host)
282318
run: |
283319
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"

0 commit comments

Comments
 (0)