From c0a5a352d870e40d6dfa997a10a3f08d2e9fbac8 Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 18 Oct 2026 23:51:54 -0600 Subject: [PATCH 1/2] Use bounded Rust cache in Toolkit main and next CI --- .gitea/workflows/next.yml | 12 ++++++++++++ .gitea/workflows/release.yml | 10 ++++++++++ ci/configure-rust-cache.sh | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/next.yml b/.gitea/workflows/next.yml index e248c869..395456ea 100644 --- a/.gitea/workflows/next.yml +++ b/.gitea/workflows/next.yml @@ -28,10 +28,16 @@ jobs: run: python3 ci/check-runner-image.py - name: Install build dependencies run: bash ci/ensure-build-deps.sh base + - name: Configure bounded Rust compiler cache + run: bash ci/configure-rust-cache.sh - name: Compute wxWidgets cache key id: wx-key run: bash ci/wx-cache-key.sh + - name: Check prebuilt wxWidgets + id: wx-image + run: bash ci/check-wx-image-prefix.sh - id: wx-cache + if: steps.wx-image.outputs.available != 'true' uses: actions/cache/restore@v4 continue-on-error: true with: @@ -63,6 +69,12 @@ jobs: env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} run: python3 ci/release-rc.py "${{ steps.version.outputs.tag }}" true "dist/alkane-toolkit-${{ steps.version.outputs.version }}-linux-x86_64.tar.gz" + - name: Rust compiler cache statistics + if: always() + run: | + if [ -n "${SCCACHE_DIR:-}" ]; then + sccache --show-stats + fi - name: Clean generated Toolkit build if: always() run: python3 ci/cleanup-generated.py diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index c6a9a451..d4c224d0 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -53,6 +53,9 @@ jobs: - name: Install build dependencies run: bash ci/ensure-build-deps.sh all + - name: Configure bounded Rust compiler cache + run: bash ci/configure-rust-cache.sh + - name: Compute wxWidgets cache key id: wx-key run: bash ci/wx-cache-key.sh @@ -133,6 +136,13 @@ jobs: echo "cargo-audit not installed on this runner; skipping" fi + - name: Rust compiler cache statistics + if: always() + run: | + if [ -n "${SCCACHE_DIR:-}" ]; then + sccache --show-stats + fi + # Merge coverage from unit tests and the headless UI self-test. A failed # measurement must not publish a stale badge or create a release. - name: Coverage diff --git a/ci/configure-rust-cache.sh b/ci/configure-rust-cache.sh index 67747872..a4298168 100644 --- a/ci/configure-rust-cache.sh +++ b/ci/configure-rust-cache.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: MIT -# Reuse Rust compiler results on the dedicated verification runner. +# Reuse Rust compiler results on persistent CI runners. set -euo pipefail [ "$(sccache --version)" = 'sccache 0.18.0' ] || { -- 2.54.0 From 3f4a2352c6825d1958bb7ed056154ced814eb179 Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 18 Oct 2026 23:53:33 -0600 Subject: [PATCH 2/2] Bound Toolkit release compiler parallelism to measured memory --- .gitea/workflows/next.yml | 1 + .gitea/workflows/release.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitea/workflows/next.yml b/.gitea/workflows/next.yml index 395456ea..4232be21 100644 --- a/.gitea/workflows/next.yml +++ b/.gitea/workflows/next.yml @@ -18,6 +18,7 @@ jobs: image: gitea.bluefla.re/blueflare/alkane-ci@sha256:9d2a992bbcb91014af3c85d2e1ec8c5990701cecf83fd06c8d46f9ef13dbd948 env: CARGO_TARGET_DIR: target + CARGO_BUILD_JOBS: 2 WX_PREFIX: /root/.cache/wx-3.3.3-linux WX_RS_WXCONFIG: /root/.cache/wx-3.3.3-linux/bin/wx-config steps: diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index d4c224d0..78fe1984 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -21,6 +21,7 @@ jobs: image: gitea.bluefla.re/blueflare/alkane-ci@sha256:9d2a992bbcb91014af3c85d2e1ec8c5990701cecf83fd06c8d46f9ef13dbd948 env: CARGO_TARGET_DIR: target + CARGO_BUILD_JOBS: 2 WX_PREFIX: /root/.cache/wx-3.3.3-linux # Set once for the whole job so build/clippy/test/bench steps don't each # re-export it (round 18 #12). -- 2.54.0