@@ -4,13 +4,7 @@ name: ci-fresh-install
44# No sandbox/target caches: simulates a user who just installed mcpp.
55#
66# Flow: bootstrap mcpp via xlings → build this PR's mcpp from source →
7- # use the freshly-built mcpp to: new → run (default toolchain)
8- # then: install llvm → new → run
9- #
10- # This catches issues that cached CI misses:
11- # - Incomplete sysroot (missing linux kernel headers)
12- # - Stale toolchain cfg/specs paths
13- # - Missing xpkg dependencies
7+ # use the freshly-built mcpp to: new → run
148
159on :
1610 push :
@@ -38,33 +32,25 @@ jobs:
3832 curl -fsSL https://github.com/d2learn/xlings/releases/download/v0.4.30/xlings-0.4.30-linux-x86_64.tar.gz -o /tmp/xlings.tar.gz
3933 tar -xzf /tmp/xlings.tar.gz -C /tmp
4034 /tmp/xlings-0.4.30-linux-x86_64/subos/default/bin/xlings self install
41- echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
42-
43- - name : Install bootstrap mcpp
44- run : |
4535 export PATH="$HOME/.xlings/subos/default/bin:$PATH"
4636 xlings install mcpp -y
37+ echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
4738
48- - name : Build this PR's mcpp from source
39+ - name : Build this PR's mcpp
4940 run : |
50- export PATH="$HOME/.xlings/subos/default/bin:$PATH"
51- export MCPP_VENDORED_XLINGS="$HOME/.xlings/subos/default/bin/xlings"
5241 mcpp build
53- MCPP_FRESH=$(realpath "$(find target -type f -name mcpp -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2)")
54- echo "MCPP=$MCPP_FRESH" >> "$GITHUB_ENV"
55- echo "XLINGS_BIN=$HOME/.xlings/subos/default/bin/xlings" >> "$GITHUB_ENV"
42+ MCPP=$(realpath "$(find target -type f -name mcpp -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2)")
43+ echo "MCPP=$MCPP" >> "$GITHUB_ENV"
5644
5745 - name : " Fresh: mcpp new hello → mcpp run (GCC)"
5846 run : |
59- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
6047 cd "$(mktemp -d)"
6148 "$MCPP" new hello
6249 cd hello
6350 "$MCPP" run
6451
65- - name : " Fresh: install LLVM → mcpp new hello → mcpp run"
52+ - name : " Fresh: install LLVM → mcpp new → mcpp run"
6653 run : |
67- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
6854 "$MCPP" toolchain install llvm 20.1.7
6955 "$MCPP" toolchain default llvm@20.1.7
7056 cd "$(mktemp -d)"
@@ -86,25 +72,18 @@ jobs:
8672 curl -fsSL https://github.com/d2learn/xlings/releases/download/v0.4.30/xlings-0.4.30-macosx-arm64.tar.gz -o /tmp/xlings.tar.gz
8773 tar -xzf /tmp/xlings.tar.gz -C /tmp
8874 /tmp/xlings-0.4.30-macosx-arm64/subos/default/bin/xlings self install
89- echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
90-
91- - name : Install bootstrap mcpp
92- run : |
9375 export PATH="$HOME/.xlings/subos/default/bin:$PATH"
9476 xlings install mcpp -y
77+ echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
9578
96- - name : Build this PR's mcpp from source
79+ - name : Build this PR's mcpp
9780 run : |
98- export PATH="$HOME/.xlings/subos/default/bin:$PATH"
99- export MCPP_VENDORED_XLINGS="$HOME/.xlings/subos/default/bin/xlings"
10081 mcpp build
101- MCPP_FRESH=$(find target -type f -name mcpp ! -name '*.o' | head -1)
102- echo "MCPP=$(cd "$(dirname "$MCPP_FRESH")" && pwd)/$(basename "$MCPP_FRESH")" >> "$GITHUB_ENV"
103- echo "XLINGS_BIN=$HOME/.xlings/subos/default/bin/xlings" >> "$GITHUB_ENV"
82+ MCPP=$(find target -type f -name mcpp ! -name '*.o' | head -1)
83+ echo "MCPP=$(cd "$(dirname "$MCPP")" && pwd)/$(basename "$MCPP")" >> "$GITHUB_ENV"
10484
10585 - name : " Fresh: mcpp new hello → mcpp run (LLVM)"
10686 run : |
107- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
10887 cd "$(mktemp -d)"
10988 "$MCPP" new hello
11089 cd hello
@@ -125,27 +104,20 @@ jobs:
125104 Invoke-WebRequest -Uri "https://github.com/d2learn/xlings/releases/download/v0.4.30/xlings-0.4.30-windows-x86_64.zip" -OutFile "$env:TEMP\xlings.zip"
126105 Expand-Archive -Path "$env:TEMP\xlings.zip" -DestinationPath "$env:TEMP\xlings-extract" -Force
127106 & "$env:TEMP\xlings-extract\xlings-0.4.30-windows-x86_64\subos\default\bin\xlings.exe" self install
107+ $env:PATH = "$env:USERPROFILE\.xlings\subos\default\bin;$env:PATH"
108+ xlings install mcpp -y
128109 "$env:USERPROFILE\.xlings\subos\default\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
129110
130- - name : Install bootstrap mcpp
131- shell : pwsh
132- run : xlings install mcpp -y
133-
134- - name : Build this PR's mcpp from source
111+ - name : Build this PR's mcpp
135112 shell : bash
136113 run : |
137- export PATH="$USERPROFILE/.xlings/subos/default/bin:$PATH"
138- export MCPP_VENDORED_XLINGS="$USERPROFILE/.xlings/subos/default/bin/xlings.exe"
139114 mcpp build
140- MCPP_FRESH=$(find target -type f -name 'mcpp.exe' | head -1)
141- echo "MCPP=$(realpath "$MCPP_FRESH")" >> "$GITHUB_ENV"
142- echo "XLINGS_BIN=$USERPROFILE/.xlings/subos/default/bin/xlings.exe" >> "$GITHUB_ENV"
115+ MCPP=$(find target -type f -name 'mcpp.exe' | head -1)
116+ echo "MCPP=$(realpath "$MCPP")" >> "$GITHUB_ENV"
143117
144118 - name : " Fresh: mcpp new hello → mcpp run"
145119 shell : bash
146120 run : |
147- export PATH="$USERPROFILE/.xlings/subos/default/bin:$PATH"
148- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
149121 cd "$(mktemp -d)"
150122 "$MCPP" new hello
151123 cd hello
0 commit comments