Skip to content

Commit 6238f8b

Browse files
committed
ci: four Linux shards from the measured durations; e2e 741 compiles a library and links nothing
1 parent 118aa91 commit 6238f8b

7 files changed

Lines changed: 909 additions & 784 deletions

File tree

‎.agents/docs/2026-10-02-pr-ci-acceleration-and-the-toolchain-specification-design.md‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,74 @@ measurement uses the same scripts as §2.1.
564564
- Cache usage below 8 GB.
565565
- A documentation-only pull request finishing under 5 minutes.
566566

567+
### 2.7 What was built, and where it departs from §2.4
568+
569+
Implemented in mcpp#759. Each departure below was decided by a measurement or a
570+
reading taken while building it.
571+
572+
- **The artifact is the binary itself, not a packed copy (§2.4.1).** The Linux
573+
self-host binary has the interpreter
574+
`~/.mcpp/registry/data/xpkgs/xim-x-glibc/2.44/lib64/ld-linux-x86-64.so.2`, needs
575+
`libgcc_s.so.1` from the `xim-x-gcc/16.1.0` payload, and links libstdc++
576+
statically (measured locally, `readelf`). A consumer that restores the
577+
sandbox runs it as it is. Packing it would test a different binary from the
578+
one every self-host build produces. `use-built-mcpp` runs the binary first,
579+
and only when it does not run does the bootstrap install the toolchain
580+
`mcpp.toml` names for the host; a binary that still does not run fails the
581+
step. The binary is 25 MB.
582+
- **The Wine packages keep their cache (§2.4.4).** Their eviction was a
583+
consequence of F3, not a property of the cache. With one writer per key, the
584+
`wine-debs` cache is saved only by `mingw-cross-wine` on main and is no longer
585+
displaced. A release asset would have added a second thing to publish and
586+
keep current.
587+
- **The timing tables are in the repository (§2.4.5).** They live under
588+
`tests/e2e/timings/<host>.tsv`, seeded from the per-test lines of the
589+
2026-10-01 logs. A shard's membership is then a function of the commit,
590+
which makes it reproducible (`E2E_LIST=1` prints it). The `e2e-coverage` job
591+
uploads the merged durations of each run as the artifact `e2e-timings`, and
592+
refreshing a table is copying a file. The tables were seeded from the
593+
2026-10-01 logs, then replaced by the durations of the first run of this
594+
change, in which 515 Linux tests ran instead of 466. Linux therefore has four
595+
shards rather than three, each budgeted at 9.9 minutes. Windows has three at
596+
14.4 to 14.5, and macOS two at 9.1 and 9.3. The step limits are about twice
597+
the budgets: 22, 30 and 20 minutes.
598+
- **The classifier searches exact paths (§2.4.3).** It searches for the
599+
changed path and for its translation (`docs/X` and `docs/zh/X`), and not for
600+
a bare file name. A search on the name made `.agents/docs/README.md`, which
601+
every new record regenerates, a code change, because release packaging names
602+
`README.md`. The checks of the `docs` job do not count as readers, because
603+
they run on every change. A document that any other script or source names
604+
starts the whole CI rather than a subset of it, which is simpler and errs
605+
towards running more.
606+
- **The macOS legs of the target matrix and of openkal still build (§2.4.1).**
607+
They run on `macos-14`, and the artifact is built on `macos-15`. release.yml
608+
records that a bootstrap build linking the system libc++ with a minimum
609+
version of 14 failed at launch on `macos-14`. Until the artifact is measured
610+
there, those two legs build their own, and the gate carries
611+
`ci-lint: allow-r1` with that reason. Their Linux and Windows legs consume the
612+
artifact.
613+
- **`invariants` and `scan` remain two jobs (§2.4.1).** Merging them is a
614+
rewrite of the target-matrix workflow beside a change that already rewrites
615+
twelve; it is left for a change of its own.
616+
- **A test that never ran was broken.** 741, one of the seven `llvm` tests,
617+
failed on its first run in CI. The root package of its fixture was a binary,
618+
so the build linked `cabi-probe.exe` for `x86_64-windows-gnu`, and with
619+
`allow_host_libs` the link found the host's mingw-w64 libraries. It passed on a
620+
machine that has them and failed on every runner, and nothing noticed, because
621+
no runner ran it. The fixture's root is now a library, which is what the test
622+
says it is: "this test compiles only".
623+
- **Coverage found more than F9.** Classifying the tests of the 2026-10-01
624+
logs found 24 that ran on no runner and were named by no workflow. The
625+
seven `llvm` tests are among them, and so are three `musl` tests: the probe
626+
named 15.1.0 while the runners installed 16.1.0. Seven `mingw-cross` tests
627+
are in the list too, a toolchain no shard installed. The rest were 105 (nasm),
628+
65 (scan-deps), 239 (named by its `E2E_ONLY` pattern, which the check now
629+
reads), 257 (needs wine and a Linux-hosted MinGW), 658 (an attached Android
630+
device), and 873-877 (added after the logs). The capability probes now ask for
631+
a family. The Linux shards install musl, llvm, mingw-cross and nasm. 257 runs
632+
in `mingw-cross-wine`. 658 is the one entry of
633+
`tests/e2e/coverage-exceptions.tsv`.
634+
567635
## Part III. Defects repaired by the next release
568636

569637
### 3.1 #757: the engine's identity is part of a build record

‎.github/workflows/ci-linux-e2e.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: ci-linux-e2e
22

33
# The e2e suite (tests/e2e/run_all.sh) on Linux, called by ci.yml beside
4-
# ci-linux.yml after the Linux build. Three shards, assigned by measured
4+
# ci-linux.yml after the Linux build. Four shards, assigned by measured
55
# duration (tests/e2e/timings/linux.tsv, rule R4 of the 2026-10-02 CI record),
66
# each running the one binary build.yml produced (use-built-mcpp, rule R1).
77
# Each shard writes a per-test report that the e2e-coverage job of ci.yml reads
@@ -15,15 +15,15 @@ on:
1515

1616
jobs:
1717
e2e:
18-
name: e2e ${{ matrix.shard }}/3 (linux x86_64, self-host)
18+
name: e2e ${{ matrix.shard }}/4 (linux x86_64, self-host)
1919
runs-on: ubuntu-24.04
2020
timeout-minutes: 45
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
shard: [1, 2, 3]
24+
shard: [1, 2, 3, 4]
2525
env:
26-
E2E_SHARD: ${{ matrix.shard }}/3
26+
E2E_SHARD: ${{ matrix.shard }}/4
2727
E2E_TIMINGS: tests/e2e/timings/linux.tsv
2828
E2E_REPORT: ${{ github.workspace }}/e2e-report-linux-${{ matrix.shard }}.tsv
2929
MCPP_HOME: /home/runner/.mcpp
@@ -49,9 +49,9 @@ jobs:
4949
host: linux-x86_64
5050

5151
- name: E2E suite
52-
# Twice the shard's budget of about ten minutes (R4): reached only by a
52+
# About twice the shard's budget of ten minutes (R4): reached only by a
5353
# hang. The per-test 600 s limit in run_all.sh names the test that hung.
54-
timeout-minutes: 25
54+
timeout-minutes: 22
5555
run: |
5656
set -euo pipefail
5757
# MCPP is this commit's binary and MCPP_BOOT the released bootstrap

‎.github/workflows/ci-windows-e2e.yml‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,13 @@ jobs:
8181
8282
- name: E2E suite
8383
shell: bash
84-
# Fail-fast on hung tests instead of burning the whole job budget.
85-
# Per-test 600s timeout lives in run_all.sh.
86-
timeout-minutes: 25
84+
# About twice the shard's budget of fifteen minutes (R4): reached only by
85+
# a hang. The per-test 600 s limit in run_all.sh names the test that hung.
86+
timeout-minutes: 30
8787
run: |
88-
# The RELEASED mcpp this job bootstrapped from, kept for e2e 252: the
89-
# claim that an older client can still build against a package the PR
90-
# produces is only worth making if something checks it against a real
91-
# old binary. Captured before $MCPP is repointed at the fresh build.
92-
# MCPP_BOOT is the released bootstrap (use-built-mcpp), for e2e 252.
88+
# MCPP_BOOT is the released bootstrap (use-built-mcpp). e2e 252 checks
89+
# an older client against a package this commit produces, so it needs
90+
# a real old binary.
9391
export MCPP_BOOT
9492
export MCPP="$MCPP_SELF"
9593
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"

‎tests/e2e/741_c_abi_environment_declared_by_the_c_library.sh‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ cabi_probe_asm_marker:
6363
ret
6464
EOF
6565

66+
# THE ROOT IS A LIBRARY, SO NOTHING LINKS. With the inferred binary target the
67+
# build linked `cabi-probe.exe` for x86_64-windows-gnu, which needs a MinGW
68+
# runtime: it passed on a machine with the host's mingw-w64 installed and failed
69+
# on every CI runner, and nothing noticed because no runner ever ran this test
70+
# (it declared `llvm`, which no runner granted, until 2026-10-02). Its subject
71+
# is the compile lines, which a library has as well.
6672
cat > mcpp.toml <<'EOF'
6773
[package]
6874
name = "cabi-probe"
@@ -72,6 +78,10 @@ version = "0.1.0"
7278
fakemusl = { path = "fakemusl" }
7379
openkalwin = { path = "openkalwin" }
7480
81+
[targets.cabi-probe]
82+
kind = "lib"
83+
sources = ["src/*.cpp", "src/*.S"]
84+
7585
[build]
7686
allow_host_libs = true
7787
EOF

0 commit comments

Comments
 (0)