From 3ed009393233c887ad1273a0a5d225e10bc70d75 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 10 May 2026 05:17:56 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20cache=20mcpp's=20self-bootstrapped=20sand?= =?UTF-8?q?box=20(~800=20MB=20=E2=86=92=20near-instant)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mcpp 0.0.3's binary lives at ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.3/bin/mcpp; on first run it self-detects the home as that grandparent directory and bootstraps musl-gcc 15.1 + binutils + glibc + ninja + patchelf into /registry/data/xpkgs/. That set is version-pinned (= mcpp's embedded toolchain manifest), so a fixed cache key is safe — no restore-keys needed. After this change a cache-hit run skips the ~800 MB download and mcpp build starts immediately. --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ab74d8..9e2be1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,16 @@ jobs: - name: Install workspace tools (.xlings.json) run: xlings install -y + # Cache mcpp's self-bootstrapped sandbox: musl-gcc + binutils + + # glibc + ninja + patchelf, plus the cloned mcpp-index. ~800 MB + # one-time download — reused across runs since mcpp 0.0.3's + # toolchain set is version-pinned. + - name: Cache mcpp sandbox + uses: actions/cache@v4 + with: + path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.3/registry + key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.3 + - name: Build with mcpp run: mcpp build