Skip to content

Commit 138696a

Browse files
committed
fix: ci-fresh-install — test released mcpp, not freshly-built
Use xlings-installed mcpp directly to test: 1. mcpp build (self-host compile) 2. mcpp new hello → mcpp run (default toolchain) 3. Linux: install LLVM → mcpp new → mcpp run (continue-on-error since released mcpp may not have latest fixes yet) No extra env vars, no $MCPP variable — just mcpp on PATH via xlings.
1 parent 7573f3b commit 138696a

1 file changed

Lines changed: 16 additions & 25 deletions

File tree

‎.github/workflows/ci-fresh-install.yml‎

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: ci-fresh-install
22

3-
# Fresh install CI — simulates first-time user experience on all platforms.
4-
# Flow: xlings install mcpp → build this PR → mcpp new hello → mcpp run
3+
# Fresh install CI — tests the released mcpp via xlings on clean machines.
4+
# Validates: xlings install mcpp → mcpp build (self) → mcpp new → mcpp run
55

66
on:
77
push:
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424

25-
- name: Bootstrap xlings + mcpp
25+
- name: Install xlings + mcpp
2626
env:
2727
XLINGS_NON_INTERACTIVE: '1'
2828
run: |
@@ -32,21 +32,18 @@ jobs:
3232
xlings install mcpp -y
3333
echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
3434
35-
- name: Build this PR's mcpp
36-
run: |
37-
mcpp build
38-
# Put freshly-built mcpp first on PATH so subsequent steps use it
39-
MCPP_DIR=$(dirname "$(find target -type f -name mcpp -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2)")
40-
echo "$MCPP_DIR" >> "$GITHUB_PATH"
35+
- name: mcpp build (self-host)
36+
run: mcpp build
4137

42-
- name: "mcpp new hello → mcpp run (GCC)"
38+
- name: mcpp new hello → mcpp run
4339
run: |
4440
cd "$(mktemp -d)"
4541
mcpp new hello
4642
cd hello
4743
mcpp run
4844
49-
- name: "install LLVM → mcpp new → mcpp run"
45+
- name: install LLVM → mcpp new → mcpp run
46+
continue-on-error: true
5047
run: |
5148
mcpp self config --mirror GLOBAL
5249
mcpp toolchain install llvm 20.1.7
@@ -63,7 +60,7 @@ jobs:
6360
steps:
6461
- uses: actions/checkout@v4
6562

66-
- name: Bootstrap xlings + mcpp
63+
- name: Install xlings + mcpp
6764
env:
6865
XLINGS_NON_INTERACTIVE: '1'
6966
run: |
@@ -73,13 +70,10 @@ jobs:
7370
xlings install mcpp -y
7471
echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
7572
76-
- name: Build this PR's mcpp
77-
run: |
78-
mcpp build
79-
MCPP_DIR=$(dirname "$(find target -type f -name mcpp ! -name '*.o' | head -1)")
80-
echo "$(cd "$MCPP_DIR" && pwd)" >> "$GITHUB_PATH"
73+
- name: mcpp build (self-host)
74+
run: mcpp build
8175

82-
- name: "mcpp new hello → mcpp run"
76+
- name: mcpp new hello → mcpp run
8377
run: |
8478
cd "$(mktemp -d)"
8579
mcpp new hello
@@ -93,7 +87,7 @@ jobs:
9387
steps:
9488
- uses: actions/checkout@v4
9589

96-
- name: Bootstrap xlings + mcpp
90+
- name: Install xlings + mcpp
9791
shell: pwsh
9892
env:
9993
XLINGS_NON_INTERACTIVE: '1'
@@ -106,14 +100,11 @@ jobs:
106100
xlings install mcpp -y
107101
$xlingsbin | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
108102
109-
- name: Build this PR's mcpp
103+
- name: mcpp build (self-host)
110104
shell: pwsh
111-
run: |
112-
mcpp build
113-
$mcppExe = Get-ChildItem -Path target -Recurse -Filter "mcpp.exe" | Select-Object -First 1
114-
$mcppExe.DirectoryName | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
105+
run: mcpp build
115106

116-
- name: "mcpp new hello → mcpp run"
107+
- name: mcpp new hello → mcpp run
117108
shell: pwsh
118109
run: |
119110
$tmp = New-TemporaryFile | ForEach-Object { Remove-Item $_; New-Item -ItemType Directory -Path $_ }

0 commit comments

Comments
 (0)