-
Notifications
You must be signed in to change notification settings - Fork 5
241 lines (210 loc) · 8.65 KB
/
ci-fresh-install.yml
File metadata and controls
241 lines (210 loc) · 8.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
name: ci-fresh-install
# Fresh install CI — validates the released mcpp binary via xlings.
# Simulates a real first-time user on a clean machine (no caches).
#
# For each platform, tests every supported toolchain:
# 1. mcpp new hello → mcpp run (basic project)
# 2. mcpp build (build mcpp itself from source)
#
# This workflow tests released mcpp, not PR code.
# It runs on release publish, manual trigger, and daily schedule.
on:
release:
types: [ published ]
workflow_dispatch:
schedule:
# Run daily at 06:00 UTC to catch issues from xlings/runner updates
- cron: '0 6 * * *'
concurrency:
group: ci-fresh-install
cancel-in-progress: false # use false to test in PRs, true to only test released mcpp
jobs:
# ──────────────────────────────────────────────────────────────────
# Linux: gcc@16.1.0, musl-gcc@15.1.0, llvm@20.1.7
# ──────────────────────────────────────────────────────────────────
linux-fresh:
name: Linux fresh install
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install xlings + mcpp
env:
XLINGS_NON_INTERACTIVE: '1'
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v0.4.38
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
- name: Install mcpp and config mirror
run: |
# The release tarball bundles a pkgindex snapshot frozen at
# build time; refresh it so the workspace pin in .xlings.json
# (latest mcpp) resolves.
xlings update
xlings install mcpp -y -g # install to global
mcpp --version
mcpp self config --mirror GLOBAL
echo "mcpp debug info:"
which mcpp
cat $HOME/.xlings/.xlings.json
- name: "Default: mcpp new → run"
run: |
cd "$(mktemp -d)"
mcpp new hello_gcc
cd hello_gcc
mcpp run
# Template packages exercise the sha256-pinned mcpp-index fetch
# path (user report: `mcpp new ... --template imgui` failed with
# fetch 'imgui@0.0.6' exit 1 on hosts without a sha256sum binary).
- name: "Template: mcpp new --template imgui (fetch path)"
run: |
cd "$(mktemp -d)"
mcpp new abc1 --template imgui
test -f abc1/mcpp.toml
- name: "Default: build mcpp"
run: |
mcpp clean
mcpp run
- name: "musl-gcc: mcpp new → run"
run: |
mcpp toolchain install gcc 15.1.0-musl
mcpp toolchain default gcc@15.1.0-musl
cd "$(mktemp -d)"
mcpp new hello_musl
cd hello_musl
mcpp run
- name: "musl-gcc: build mcpp"
run: |
mcpp toolchain default gcc@15.1.0-musl
mcpp clean
mcpp run
- name: "gcc 16: mcpp new → run"
run: |
mcpp toolchain install gcc 16.1.0
mcpp toolchain default gcc@16.1.0
cd "$(mktemp -d)"
mcpp new hello_gcc16
cd hello_gcc16
mcpp run
- name: "gcc 16: build mcpp"
run: |
mcpp toolchain default gcc@16.1.0
mcpp clean
mcpp run
- name: "LLVM: mcpp new → run"
run: |
mcpp toolchain install llvm 20.1.7
mcpp toolchain default llvm@20.1.7
cd "$(mktemp -d)"
mcpp new hello_llvm
cd hello_llvm
mcpp run
- name: "LLVM: build mcpp"
run: |
mcpp toolchain default llvm@20.1.7
mcpp clean
mcpp run
# ──────────────────────────────────────────────────────────────────
# macOS: llvm@20.1.7
# ──────────────────────────────────────────────────────────────────
macos-fresh:
name: macOS fresh install
# macos-14: the support floor (mcpp ≥0.0.50 / xlings ≥0.4.50 ship
# minos=14.0 static-libc++ binaries). A fresh install passing here
# is the continuous proof of the macOS 14 floor — and of host-tool
# independence (this image has no sha256sum; macos-15 does).
runs-on: macos-14
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install xlings
env:
XLINGS_NON_INTERACTIVE: '1'
run: |
# v0.4.50+: first xlings release whose macosx binary runs on
# macOS 14 (older ones carry minos=15 and refuse to start).
# v0.4.51: in-process sha256 — required on this image, which
# has no sha256sum binary (pinned fetches failed before).
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v0.4.51
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
- name: Install mcpp and config mirror
run: |
# Refresh the bundled pkgindex snapshot so the workspace pin
# in .xlings.json (latest mcpp) resolves.
xlings update
xlings install mcpp -y -g # install to global
mcpp --version
mcpp self config --mirror GLOBAL
echo "mcpp debug info:"
which mcpp
cat $HOME/.xlings/.xlings.json
- name: "LLVM: mcpp new → run"
run: |
cd "$(mktemp -d)"
mcpp new hello_mac
cd hello_mac
mcpp run
# Template packages exercise the sha256-pinned mcpp-index fetch
# path — this is what broke on hosts without a sha256sum binary
# (stock macOS / bare Windows) before xlings 0.4.51 hashed
# in-process.
- name: "Template: mcpp new --template imgui (fetch path)"
run: |
cd "$(mktemp -d)"
mcpp new abc1 --template imgui
test -f abc1/mcpp.toml
- name: "LLVM: build mcpp"
run: |
mcpp clean
mcpp run
# ──────────────────────────────────────────────────────────────────
# Windows: llvm@20.1.7 + MSVC STL
# ──────────────────────────────────────────────────────────────────
windows-fresh:
name: Windows fresh install
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install xlings
shell: pwsh
env:
XLINGS_NON_INTERACTIVE: '1'
run: |
irm https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.ps1 | iex
$xlingsbin = "$env:USERPROFILE\.xlings\subos\current\bin"
$env:PATH = "$xlingsbin;$env:PATH"
$xlingsbin | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Install mcpp and config mirror
shell: pwsh
run: |
# Refresh the bundled pkgindex snapshot so the workspace pin
# in .xlings.json (latest mcpp) resolves.
xlings update
xlings install mcpp -y -g --verbose
cat "$env:USERPROFILE\.xlings\.xlings.json"
mcpp --version
mcpp self config --mirror GLOBAL
- name: "LLVM: mcpp new → run"
shell: pwsh
run: |
$tmp = New-TemporaryFile | ForEach-Object { Remove-Item $_; New-Item -ItemType Directory -Path $_ }
Set-Location $tmp
mcpp new hello_win
Set-Location hello_win
mcpp run
# Template packages exercise the sha256-pinned mcpp-index fetch
# path (user report: `mcpp new abc1 --template imgui` failed with
# fetch 'imgui@0.0.6' exit 1 on bare Windows — no sha256sum binary
# outside git-bash; fixed by xlings 0.4.51 in-process hashing).
- name: "Template: mcpp new --template imgui (fetch path)"
shell: pwsh
run: |
$tmp = New-TemporaryFile | ForEach-Object { Remove-Item $_; New-Item -ItemType Directory -Path $_ }
Set-Location $tmp
mcpp new abc1 --template imgui
if (!(Test-Path abc1/mcpp.toml)) { exit 1 }
- name: "LLVM: build mcpp"
shell: pwsh
run: |
mcpp clean
mcpp run