Skip to content

Commit 22a788a

Browse files
authored
ci-fresh-install: each toolchain of the Linux fresh install is a job of its own (#978)
The Linux fresh install built mcpp four times in one job (the default toolchain, musl-gcc, gcc 16, LLVM). After the 2026.11.19.1 release the builds took 17.9, 18.0, 15.8 and more than 6.6 min (run 44634649039), against 9.9 to 12.8 min each for 2026.11.18.1 (runs 44228343834, 44555477643), and the job reached its 60 min during the fourth build. Every other leg of that run passed, the arch and Termux app sandbox legs fixed in #966 among them. The time went to compilation, not to the engine or to downloads: the jobs downloaded from github.com (GLOBAL), the longest unit is now `src/build/prepare/graph.cpp` at 4 min 52 s (`platform.cpp` at 3 min 20 s for 2026.11.18.1), and locally the 19.1 tree plans 826 compile commands under both engines and builds in 158 s under 2026.11.18.1 and 155 s under 2026.11.19.1. Each toolchain is now a leg of a matrix that installs the release on a fresh machine, makes the toolchain the default, builds and runs a new project, and builds and runs mcpp, within 45 min; the template fetch runs on the default leg. The legs no longer share a home, so each sees what a user who installs that one toolchain sees. After the merge, `ci-fresh-install` is dispatched on main to verify 2026.11.19.1 on every leg.
1 parent d4f4447 commit 22a788a

1 file changed

Lines changed: 28 additions & 51 deletions

File tree

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

Lines changed: 28 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,27 @@ jobs:
147147
if: ${{ github.event_name != 'workflow_run' }}
148148
run: echo "not a post-release run; skipping index wait"
149149

150+
# One leg per toolchain, each from a fresh machine. The four self-builds of
151+
# mcpp ran in one job until 2026.11.19.1, whose builds took 17.9, 18.0, 15.8
152+
# and more than 6.6 min (run 44634649039; 9.9 to 12.8 min each for
153+
# 2026.11.18.1) and outlasted its 60 min.
150154
linux-fresh:
151155
needs: [wait-index]
152-
name: Linux fresh install
156+
name: Linux fresh install (${{ matrix.toolchain }})
153157
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
154158
runs-on: ubuntu-24.04
155-
timeout-minutes: 60
159+
timeout-minutes: 45
160+
strategy:
161+
fail-fast: false
162+
matrix:
163+
include:
164+
- toolchain: default
165+
- toolchain: gcc@16.1.0-musl
166+
install: gcc 16.1.0-musl
167+
- toolchain: gcc@16.1.0
168+
install: gcc 16.1.0
169+
- toolchain: llvm@23.1.3
170+
install: llvm 23.1.3
156171
env:
157172
# The one derived value (see the header comment): every install job names
158173
# the SAME version the index guard waited for, so the two cannot disagree.
@@ -184,17 +199,24 @@ jobs:
184199
which mcpp
185200
cat $HOME/.xlings/.xlings.json
186201
187-
- name: "Default: mcpp new → run"
202+
- name: "The leg's toolchain: ${{ matrix.toolchain }}"
203+
if: matrix.install
204+
run: |
205+
mcpp toolchain install ${{ matrix.install }}
206+
mcpp toolchain default ${{ matrix.toolchain }}
207+
208+
- name: "mcpp new → run"
188209
run: |
189210
cd "$(mktemp -d)"
190-
mcpp new hello_gcc
191-
cd hello_gcc
211+
mcpp new hello
212+
cd hello
192213
mcpp run
193214
194215
# Template packages exercise the sha256-pinned mcpp-index fetch
195216
# path (user report: `mcpp new ... --template imgui` failed with
196217
# fetch 'imgui@0.0.6' exit 1 on hosts without a sha256sum binary).
197218
- name: "Template: exact mcpplibs.imgui selector (fetch path)"
219+
if: matrix.toolchain == 'default'
198220
run: |
199221
# The template fetch's own status is the first assertion; without
200222
# pipefail `tee` would report success for it (WS7, #729).
@@ -204,53 +226,8 @@ jobs:
204226
test -f abc1/mcpp.toml
205227
grep -F 'namespace=mcpplibs name=imgui' template.log
206228
207-
- name: "Default: build mcpp"
208-
run: |
209-
mcpp clean
210-
mcpp run
211-
212-
- name: "musl-gcc: mcpp new → run"
213-
run: |
214-
mcpp toolchain install gcc 16.1.0-musl
215-
mcpp toolchain default gcc@16.1.0-musl
216-
cd "$(mktemp -d)"
217-
mcpp new hello_musl
218-
cd hello_musl
219-
mcpp run
220-
221-
- name: "musl-gcc: build mcpp"
222-
run: |
223-
mcpp toolchain default gcc@16.1.0-musl
224-
mcpp clean
225-
mcpp run
226-
227-
- name: "gcc 16: mcpp new → run"
228-
run: |
229-
mcpp toolchain install gcc 16.1.0
230-
mcpp toolchain default gcc@16.1.0
231-
cd "$(mktemp -d)"
232-
mcpp new hello_gcc16
233-
cd hello_gcc16
234-
mcpp run
235-
236-
- name: "gcc 16: build mcpp"
237-
run: |
238-
mcpp toolchain default gcc@16.1.0
239-
mcpp clean
240-
mcpp run
241-
242-
- name: "LLVM: mcpp new → run"
243-
run: |
244-
mcpp toolchain install llvm 23.1.3
245-
mcpp toolchain default llvm@23.1.3
246-
cd "$(mktemp -d)"
247-
mcpp new hello_llvm
248-
cd hello_llvm
249-
mcpp run
250-
251-
- name: "LLVM: build mcpp"
229+
- name: "Build mcpp"
252230
run: |
253-
mcpp toolchain default llvm@23.1.3
254231
mcpp clean
255232
mcpp run
256233

0 commit comments

Comments
 (0)