-
Notifications
You must be signed in to change notification settings - Fork 5
192 lines (164 loc) · 6.22 KB
/
ci-fresh-install.yml
File metadata and controls
192 lines (164 loc) · 6.22 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
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: |
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
- 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
runs-on: macos-15
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install xlings
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: |
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
- 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: |
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
- name: "LLVM: build mcpp"
shell: pwsh
run: |
mcpp clean
mcpp run