Skip to content

Commit f0a2761

Browse files
committed
ci: complete CI architecture — dev CI + release validation CI
Two-tier CI design: Tier 1 — PR/dev CI (ci.yml, ci-macos.yml, ci-windows.yml): Runs on every PR. Builds mcpp from source, runs tests + e2e, then verifies each platform's supported toolchains can build mcpp: Linux: gcc@16.1.0 (+test), musl-gcc@15.1.0, llvm@20.1.7 macOS: llvm@20.1.7 Windows: llvm@20.1.7 Tier 2 — Release validation CI (ci-fresh-install.yml): Manual trigger + daily schedule. Tests released mcpp via xlings on clean machines (no caches). For each platform, every supported toolchain: new → run (basic project) + build mcpp (self-host). Linux: gcc, musl-gcc, llvm — new+run + build mcpp macOS: llvm — new+run + build mcpp Windows: llvm — new+run + build mcpp ci-fresh-install no longer runs on PRs (it tests released mcpp, not PR code). Moved to workflow_dispatch + daily cron.
1 parent 9144db3 commit f0a2761

1 file changed

Lines changed: 74 additions & 28 deletions

File tree

Lines changed: 74 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
11
name: ci-fresh-install
22

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
3+
# Fresh install CI — validates the released mcpp binary via xlings.
4+
# Simulates a real first-time user on a clean machine (no caches).
5+
#
6+
# For each platform, tests every supported toolchain:
7+
# 1. mcpp new hello → mcpp run (basic project)
8+
# 2. mcpp build (build mcpp itself from source)
9+
#
10+
# This workflow does NOT run on PRs — it tests released mcpp, not PR code.
11+
# Triggered manually or on a schedule to catch regressions after releases.
512

613
on:
7-
push:
8-
branches: [ main ]
9-
pull_request:
10-
branches: [ main ]
1114
workflow_dispatch:
15+
schedule:
16+
# Run daily at 06:00 UTC to catch issues from xlings/runner updates
17+
- cron: '0 6 * * *'
1218

1319
concurrency:
14-
group: ci-fresh-install-${{ github.ref }}
20+
group: ci-fresh-install
1521
cancel-in-progress: true
1622

1723
jobs:
24+
# ──────────────────────────────────────────────────────────────────
25+
# Linux: gcc@16.1.0, musl-gcc@15.1.0, llvm@20.1.7
26+
# ──────────────────────────────────────────────────────────────────
1827
linux-fresh:
1928
name: Linux fresh install
2029
runs-on: ubuntu-24.04
21-
timeout-minutes: 45
30+
timeout-minutes: 60
2231
steps:
2332
- uses: actions/checkout@v4
2433

@@ -31,19 +40,38 @@ jobs:
3140
export PATH="$HOME/.xlings/subos/default/bin:$PATH"
3241
xlings install mcpp -y
3342
echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
43+
mcpp --version
3444
35-
- name: mcpp build (self-host)
36-
run: mcpp build
45+
- name: "GCC: mcpp new → run"
46+
run: |
47+
mcpp toolchain default gcc
48+
cd "$(mktemp -d)"
49+
mcpp new hello_gcc
50+
cd hello_gcc
51+
mcpp run
52+
53+
- name: "GCC: build mcpp"
54+
run: |
55+
mcpp toolchain default gcc
56+
mcpp clean
57+
mcpp build
3758
38-
- name: mcpp new hello → mcpp run
59+
- name: "musl-gcc: mcpp new run"
3960
run: |
61+
mcpp toolchain install gcc 15.1.0-musl
62+
mcpp toolchain default gcc@15.1.0-musl
4063
cd "$(mktemp -d)"
41-
mcpp new hello
42-
cd hello
64+
mcpp new hello_musl
65+
cd hello_musl
4366
mcpp run
4467
45-
- name: install LLVM → mcpp new → mcpp run
46-
continue-on-error: true
68+
- name: "musl-gcc: build mcpp"
69+
run: |
70+
mcpp toolchain default gcc@15.1.0-musl
71+
mcpp clean
72+
mcpp build
73+
74+
- name: "LLVM: mcpp new → run"
4775
run: |
4876
mcpp self config --mirror GLOBAL
4977
mcpp toolchain install llvm 20.1.7
@@ -53,6 +81,15 @@ jobs:
5381
cd hello_llvm
5482
mcpp run
5583
84+
- name: "LLVM: build mcpp"
85+
run: |
86+
mcpp toolchain default llvm@20.1.7
87+
mcpp clean
88+
mcpp build
89+
90+
# ──────────────────────────────────────────────────────────────────
91+
# macOS: llvm@20.1.7
92+
# ──────────────────────────────────────────────────────────────────
5693
macos-fresh:
5794
name: macOS fresh install
5895
runs-on: macos-15
@@ -69,17 +106,23 @@ jobs:
69106
export PATH="$HOME/.xlings/subos/default/bin:$PATH"
70107
xlings install mcpp -y
71108
echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
109+
mcpp --version
72110
73-
- name: mcpp build (self-host)
74-
run: mcpp build
75-
76-
- name: mcpp new hello → mcpp run
111+
- name: "LLVM: mcpp new → run"
77112
run: |
78113
cd "$(mktemp -d)"
79-
mcpp new hello
80-
cd hello
114+
mcpp new hello_mac
115+
cd hello_mac
81116
mcpp run
82117
118+
- name: "LLVM: build mcpp"
119+
run: |
120+
mcpp clean
121+
mcpp build
122+
123+
# ──────────────────────────────────────────────────────────────────
124+
# Windows: llvm@20.1.7 + MSVC STL
125+
# ──────────────────────────────────────────────────────────────────
83126
windows-fresh:
84127
name: Windows fresh install
85128
runs-on: windows-latest
@@ -99,16 +142,19 @@ jobs:
99142
$env:PATH = "$xlingsbin;$env:PATH"
100143
xlings install mcpp -y
101144
$xlingsbin | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
145+
mcpp --version
102146
103-
- name: mcpp build (self-host)
104-
shell: pwsh
105-
run: mcpp build
106-
107-
- name: mcpp new hello → mcpp run
147+
- name: "LLVM: mcpp new → run"
108148
shell: pwsh
109149
run: |
110150
$tmp = New-TemporaryFile | ForEach-Object { Remove-Item $_; New-Item -ItemType Directory -Path $_ }
111151
Set-Location $tmp
112-
mcpp new hello
113-
Set-Location hello
152+
mcpp new hello_win
153+
Set-Location hello_win
114154
mcpp run
155+
156+
- name: "LLVM: build mcpp"
157+
shell: pwsh
158+
run: |
159+
mcpp clean
160+
mcpp build

0 commit comments

Comments
 (0)