Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

ci(verify): warm caches per provider and run Linux and Windows on Blacksmith

Richie McIlroyb8a8b01d985a
diff --git a/.github/actions/engine-verify-setup/action.yml b/.github/actions/engine-verify-setup/action.yml
index b683989ea..24295974c 100644
--- a/.github/actions/engine-verify-setup/action.yml
+++ b/.github/actions/engine-verify-setup/action.yml
@@ -63,8 +63,15 @@ runs:
# runner.environment separates GitHub-hosted from self-hosted
# (Blacksmith) builds: their paths and toolchains differ, so one's
# target directory would only force a rebuild on the other.
- base="verify-build-v3-${{ inputs.target }}-${{ runner.environment }}-$(date -u +%G-W%V)"
+ # A new week starts a new chain, seeded from last week's newest cache
+ # of the same provider so the first build of the week stays warm.
+ py="$(command -v python3 || command -v python)"
+ week="$("$py" -c 'import datetime as d; y, w, _ = d.datetime.now(d.timezone.utc).isocalendar(); print(f"{y}-W{w:02d}")')"
+ last_week="$("$py" -c 'import datetime as d; y, w, _ = (d.datetime.now(d.timezone.utc) - d.timedelta(days=7)).isocalendar(); print(f"{y}-W{w:02d}")')"
+ provider="verify-build-v3-${{ inputs.target }}-${{ runner.environment }}"
+ base="$provider-$week"
echo "base=$base" >> "$GITHUB_OUTPUT"
+ echo "previous=$provider-$last_week" >> "$GITHUB_OUTPUT"
echo "key=$base-${{ hashFiles('Cargo.lock', 'Cargo.toml', 'rust-toolchain.toml') }}-$(date -u +%Y%m%d)" >> "$GITHUB_OUTPUT"
- name: Restore build cache
@@ -81,6 +88,7 @@ runs:
restore-keys: |
${{ steps.build-key.outputs.base }}-${{ hashFiles('Cargo.lock', 'Cargo.toml', 'rust-toolchain.toml') }}-
${{ steps.build-key.outputs.base }}-
+ ${{ steps.build-key.outputs.previous }}-
# Unchanged workspace crates are reused from the cache instead of being
# rebuilt because the checkout touched every file (scripts/verify/mtime.py).
diff --git a/.github/workflows/engine-verify.yml b/.github/workflows/engine-verify.yml
index 381544265..bbce3c29d 100644
--- a/.github/workflows/engine-verify.yml
+++ b/.github/workflows/engine-verify.yml
@@ -102,7 +102,9 @@ jobs:
tier=full
fi
save=false
- if [[ "$EVENT" == schedule || ( "$EVENT" == push && "$GITHUB_REF" =~ ^refs/heads/(main|ci/engine-verify|ci/verify-ci)$ ) ]]; then
+ # Pushes and manual runs on the suite branches save caches too, so a
+ # proof batch never runs cold twice (pull requests only restore).
+ if [[ "$EVENT" == schedule || ( ( "$EVENT" == push || "$EVENT" == workflow_dispatch ) && "$GITHUB_REF" =~ ^refs/heads/(main|ci/engine-verify|ci/verify-ci)$ ) ]]; then
save=true
fi
echo "tier=$tier" >> "$GITHUB_OUTPUT"
diff --git a/scripts/verify/suites.json b/scripts/verify/suites.json
index 561a786c9..b6854ea28 100644
--- a/scripts/verify/suites.json
+++ b/scripts/verify/suites.json
@@ -182,7 +182,7 @@
],
"runners": {
"linux": {
- "runner": "ubuntu-24.04",
+ "runner": "blacksmith-8vcpu-ubuntu-2404",
"target": "x86_64-unknown-linux-gnu",
"shards": {
"fast": 2,
@@ -200,7 +200,7 @@
"archive": false
},
"windows": {
- "runner": "windows-2022",
+ "runner": "blacksmith-8vcpu-windows-2025",
"target": "x86_64-pc-windows-msvc",
"shards": {
"fast": 3,