Skip to content

Onboard morph, warmed locally, and pin the compilers - #2

Merged
Yaraslaut merged 4 commits into
masterfrom
feat/morph-seed
Nov 28, 2026
Merged

Yaraslaut merged 4 commits into
masterfrom
feat/morph-seed

Conversation

@Yaraslaut

Copy link
Copy Markdown
Member

Onboards morph as a second project whose compile-cache seed is maintained nightly, and pins the image's compilers so that seeds stay valid.

Changes

  • The project is a dimension of the warm-up. Each project in warm-targets.json now declares:

    • repo and ci_workspace;
    • cpm_source_cache;
    • warm: ci | local.

    The warm jobs run per project and group, for warm: ci projects only. The assemble step bundles every project's seeds. A missing or unreadable locally warmed seed is warned about and skipped; a CI-warmed one still fails the publish. pace's seed image names, tags and in-image paths are unchanged. Its CPM prefetch moved to scripts/projects/pace/prepare.sh.

  • morph is warmed on a developer machine. A full morph build doesn't fit a hosted 16 GB, 4-vCPU runner within the warm job's limit, so morph is marked warm: local.

    • scripts/warm-local.sh <project> [group...] [--push] runs the same container invocation as CI, through the new shared scripts/run-warm-container.sh.
    • It pushes cpp-ci-seed-<project>-<group> only with --push.
    • local/systemd/ has a timer that runs it at 00:30 UTC, before the 02:23 publish.
  • morph's groups:

    • clang: clang-debug, clang-release, clang-shared-debug
    • gcc: gcc-release
    • sanitizers: clang-asan, clang-ubsan, clang-tsan

    Each preset's configure_args is copied from morph's ci.yml. gcc-release also selects gcc-15/g++-15, because the image's default gcc is 14.

  • The compilers are pinned. clang-22 (apt.llvm.org), gcc-14 (noble-updates) and gcc-15 (toolchain PPA) are pinned to the exact versions in the current image, with a dpkg-query check after install. A seed is keyed on the exact compiler binary, so an unpinned nightly rebuild could silently invalidate every locally warmed seed.

    • Trade-off: when upstream drops a pinned version, the image build fails until the pin is bumped, and latest stays on the last good image.
    • Seed images carry their toolchain fingerprint as a label, and the assemble step warns on a mismatch.

Verified

  • morph gcc group, real warm-up (gcc-release, 5 jobs):
    • first warm: 63m33s, 682 compiles, 0 hits, a 273 MB store;
    • second warm from that store: 55 s, 682 of 682 hits, and the store came out byte-identical.
  • Pins: the toolchain target builds with the pins and resolves to the same versions. A bogus pin fails the build.
  • Matrix: the pace warm matrix projects to the same groups as before (gcc, clang, clang-extra, sanitizers), and morph is excluded from it.
  • Assemble and smoke steps, extracted and run against a local registry:
    • a missing local seed is skipped with a warning;
    • a corrupt local seed is dropped with a warning;
    • a toolchain mismatch gives a warning;
    • a corrupt CI-warmed seed fails the step.
  • Linters: actionlint has 1 finding left, down from 3; it's a pre-existing SC2016. shellcheck reports only a pre-existing SC1007.

Not verified

  • The full Publish workflow end to end. This PR's own run builds and smoke-tests, but doesn't publish.
  • --push.
  • Warm-ups of the clang and sanitizers groups.

🤖 Generated with Claude Code

https://claude.ai/code/session_01No1NzndCGtpCccptcyk6Tb

Yaraslaut and others added 4 commits November 28, 2026 19:10
publish.yml named pace in its resolve, warm and publish stages. Each project
in warm-targets.json now declares its repo, the path its own CI checks it out
at, and how it is warmed, and the workflow loops over projects: one warm job
per group of each project warmed in CI, and an assemble step over the groups
of every project. Seed images are cpp-ci-seed-<project>-<group>, which for
pace is the name they already had, and the stores stay at <project>/<group>.cow
in the image.

The docker run of a warm job moves into scripts/run-warm-container.sh so that
a warm-up elsewhere can share it, pace's CPM bootstrap prefetch into a
per-project hook, and its fallback-version check into the manifest. Seed
images are built by scripts/build-seed-image.sh, which labels them with the
toolchain fingerprint of the image they were warmed under; the assemble step
warns when a seed's differs from the image's. A seed that is byte-identical to
the previous one is still the previous image's layer, relabelled.

warm-project.sh configures every preset from an empty build directory, since a
reused checkout would otherwise keep the cache variables of an earlier
configure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1NzndCGtpCccptcyk6Tb
A full morph build does not fit a hosted runner, so morph is declared
"warm": "local": publish.yml only assembles the seeds that
scripts/warm-local.sh pushes. The script checks the project out at the
manifest's CI path through a bind mount, starts from the previous seed, runs
the same container as the CI warm jobs, and pushes only with --push, after
every group has built. A user service and timer run it nightly at 00:30 UTC,
ahead of the 02:23 UTC publish.

morph's groups are the Linux presets of its linux-compilers and
linux-sanitizers jobs, with the flags of those jobs' configure lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1NzndCGtpCccptcyk6Tb
pace-cc keys a cache entry on the compiler it fronts, so a nightly rebuild
that picked up a newer clang or gcc point release would silently invalidate
every seed, including those warmed on a developer machine. clang-22,
clang-tidy-22, llvm-22, gcc-14 and gcc-15 are installed at exact versions,
and the build fails when the installed version differs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1NzndCGtpCccptcyk6Tb
@Yaraslaut
Yaraslaut merged commit eb3425f into master Nov 28, 2026
4 checks passed
@Yaraslaut
Yaraslaut deleted the feat/morph-seed branch November 28, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant