Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

ci(release-gate): cache the cpu-smoke pdm venv, pin two rationale comments (#4525)

LearningCircuita97faf4c18e0
diff --git a/.github/workflows/release-gate.yml b/.github/workflows/release-gate.yml
index b3fb7f477a..c512b8e82c 100644
--- a/.github/workflows/release-gate.yml
+++ b/.github/workflows/release-gate.yml
@@ -29,12 +29,13 @@ on:
permissions: {} # Minimal top-level for OSSF Scorecard
# Serialize direct workflow_dispatch/schedule runs so two long gate runs
-# (notably the qemu TCG emulation job) don't execute side by side. Runs
-# triggered via workflow_call are unaffected: GitHub ignores top-level
-# concurrency in a called workflow, and release.yml already serializes
-# those through its own group. cancel-in-progress stays false — this gate
-# is the only path to publishing, so an in-flight run must never be
-# killed by a newer trigger.
+# (notably the qemu TCG emulation job) don't execute side by side. Those
+# are the only triggers that create standalone runs of this workflow: a
+# workflow_call invocation executes inside release.yml's own run, and
+# release.yml's concurrency group already serializes the release path.
+# cancel-in-progress stays false — this gate is the only path to
+# publishing, so an in-flight run must never be killed by a newer
+# trigger.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
@@ -503,6 +504,7 @@ jobs:
persist-credentials: false
- name: Set up Python
+ id: setup-python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
# Keep in sync with requires-python in pyproject.toml — smoke-test
@@ -523,6 +525,22 @@ jobs:
# Keep in sync with requires-python in pyproject.toml (see above).
python-version: '3.12'
+ - name: Cache pdm venv (keyed on pdm.lock)
+ # A cold pdm sync re-downloads the full production lock — the torch
+ # wheel alone is several hundred MB — adding minutes before the
+ # emulation even starts. The exact interpreter patch version is part
+ # of the key because the venv hard-links the toolcache interpreter:
+ # a runner-image Python bump would otherwise restore a venv with a
+ # dangling interpreter path. No restore-keys on purpose: pdm.lock IS
+ # the contract this job tests, so a venv from any other lock must
+ # never be restored — on a lock change a cold, exact install is the
+ # correct behavior. pdm sync still runs below either way and
+ # verifies the restored venv against the lock.
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
+ with:
+ path: .venv
+ key: cpu-smoke-venv-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pdm.lock') }}
+
- name: Install locked production dependencies
# lock --check first: the whole point is to test the exact wheels
# the Docker image ships, so fail loudly if pdm.lock has drifted
@@ -583,6 +601,11 @@ jobs:
echo "OK $mod (native)"
done
+ # CPU-outer / module-inner with fail-fast (exit 1 on the first
+ # failing pair) is deliberate: Haswell is a strict superset of
+ # SandyBridge, so once a module fails on the older CPU the newer
+ # CPU's result adds no signal — don't "fix" this into a
+ # full-matrix report.
for cpu in "${CPUS[@]}"; do
echo ""
echo "=== Emulated CPU: $cpu ==="