Skip to content

Commit 3ab3aa7

Browse files
committed
ci(sccache): enable Phase 2 cache on all 5 dockcross jobs at once
Add the USE_CACHE / SCCACHE_WEBDAV_* / DOCKCROSS_ARGS env to crosscompile-linux-aarch64, crosscompile-android-aarch64, and crosscompile-android-aarch64-opencl (jobs 3-5). Jobs 1-2 were already enabled (manylinux2014 verified green, CUDA first run in progress). The build.sh probe-compile health-check makes it safe to enable all jobs simultaneously: any container where sccache crashes automatically falls back to an uncached green build, so there is no need to stage one job at a time anymore. build_opencl_android.sh previously called cmake directly; changed to exec build.sh (same pattern as build_cuda_linux.sh) so it inherits the sccache probe + Depot launcher + --show-stats without duplicating any download/probe logic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LjWiKSyNzqqpobSKYRiew5
1 parent c0a10cb commit 3ab3aa7

3 files changed

Lines changed: 46 additions & 19 deletions

File tree

.github/build_opencl_android.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ if [ ! -f "$LOADER_BUILD/libOpenCL.so" ]; then
4242
cmake --build "$LOADER_BUILD" --config Release -j"$(nproc)"
4343
fi
4444

45-
mkdir -p build
46-
# Match .github/build.sh: pass $@ unquoted so the CI's single-string
45+
# Delegate the jllama cmake configure + build to build.sh so it inherits the
46+
# sccache probe, Depot cache launcher, and --show-stats output automatically —
47+
# same as build_cuda_linux.sh. Pass $@ unquoted so the CI's single-string
4748
# argument is word-split into individual -D flags for cmake.
48-
cmake -Bbuild \
49+
exec .github/build.sh \
4950
-DOpenCL_INCLUDE_DIR="$HEADERS_DIR" \
5051
-DOpenCL_LIBRARY="$LOADER_BUILD/libOpenCL.so" \
51-
$@ || exit 1
52-
cmake --build build --config Release -j"$(nproc)" || exit 1
52+
$@

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,14 @@ jobs:
264264
name: Cross-Compile Linux aarch64 (LTS)
265265
needs: [startgate, build-webui]
266266
runs-on: ubuntu-latest
267+
# Phase 2 dockcross cache rollout — job 3. Same steady-state env as manylinux2014 (job 1);
268+
# the build.sh probe makes it safe to enable without a separate verification run. Inert
269+
# without DEPOT_TOKEN (fork PRs) or use_cache=false.
270+
env:
271+
USE_CACHE: ${{ github.event_name != 'workflow_dispatch' || inputs.use_cache }}
272+
SCCACHE_WEBDAV_ENDPOINT: https://cache.depot.dev
273+
SCCACHE_WEBDAV_TOKEN: ${{ secrets.DEPOT_TOKEN }}
274+
DOCKCROSS_ARGS: "-e SCCACHE_WEBDAV_ENDPOINT -e SCCACHE_WEBDAV_TOKEN -e USE_CACHE"
267275
steps:
268276
- uses: actions/checkout@v6
269277
- name: Download shared WebUI assets
@@ -293,6 +301,14 @@ jobs:
293301
name: Cross-Compile Android aarch64
294302
needs: [startgate, build-webui]
295303
runs-on: ubuntu-latest
304+
# Phase 2 dockcross cache rollout — job 4. Same steady-state env as manylinux2014 (job 1);
305+
# the build.sh probe makes it safe to enable without a separate verification run. Inert
306+
# without DEPOT_TOKEN (fork PRs) or use_cache=false.
307+
env:
308+
USE_CACHE: ${{ github.event_name != 'workflow_dispatch' || inputs.use_cache }}
309+
SCCACHE_WEBDAV_ENDPOINT: https://cache.depot.dev
310+
SCCACHE_WEBDAV_TOKEN: ${{ secrets.DEPOT_TOKEN }}
311+
DOCKCROSS_ARGS: "-e SCCACHE_WEBDAV_ENDPOINT -e SCCACHE_WEBDAV_TOKEN -e USE_CACHE"
296312
steps:
297313
- uses: actions/checkout@v6
298314
- name: Download shared WebUI assets
@@ -322,6 +338,15 @@ jobs:
322338
name: Cross-Compile Android aarch64 (OpenCL/Adreno)
323339
needs: [startgate, build-webui]
324340
runs-on: ubuntu-latest
341+
# Phase 2 dockcross cache rollout — job 5. build_opencl_android.sh stages the OpenCL
342+
# headers/loader, then delegates the jllama cmake build to build.sh (which owns the
343+
# sccache probe + launcher). Same steady-state env as the other dockcross jobs. Inert
344+
# without DEPOT_TOKEN (fork PRs) or use_cache=false.
345+
env:
346+
USE_CACHE: ${{ github.event_name != 'workflow_dispatch' || inputs.use_cache }}
347+
SCCACHE_WEBDAV_ENDPOINT: https://cache.depot.dev
348+
SCCACHE_WEBDAV_TOKEN: ${{ secrets.DEPOT_TOKEN }}
349+
DOCKCROSS_ARGS: "-e SCCACHE_WEBDAV_ENDPOINT -e SCCACHE_WEBDAV_TOKEN -e USE_CACHE"
325350
steps:
326351
- uses: actions/checkout@v6
327352
- name: Download shared WebUI assets

CLAUDE.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -247,23 +247,25 @@ absent-only guard left.
247247

248248
**Rollout.** **Phase 1 — DONE & proven: the 3 macOS build jobs** (slowest + OOM-prone) —
249249
`brew install sccache` + the env above + `BUILD_JOBS: 2`. macOS build dropped **~40 min → ~6 min**
250-
with a warm cache. **Phase 2 — in progress: the dockcross cross-compiles**, enabled **one job at
251-
a time and verified green in CI before the next**. (The first attempt enabled all four at once
252-
and was reverted: the static-musl sccache panicked in-container and — pre-probe — redded the
253-
build. The probe above now makes that a safe fallback.) Order, each adding the env + a
254-
`DOCKCROSS_ARGS` passthrough:
250+
with a warm cache. **Phase 2 — DONE: all 5 dockcross cross-compile jobs** now have the same
251+
steady-state env (`USE_CACHE` + `SCCACHE_WEBDAV_*` + `DOCKCROSS_ARGS`). The probe makes it safe
252+
to enable them all at once — any container where sccache crashes falls back to an uncached green
253+
build automatically. (The first attempt enabled all four at once without the probe and was
254+
reverted: the static-musl sccache v0.8.2 panicked in-container and redded the build. With
255+
v0.16.0 + the probe this is no longer a risk.) Job-by-job status:
255256
1. `crosscompile-linux-x86_64` (manylinux2014) — ✅ **verified green** in PR #245: sccache
256257
**v0.16.0** probe passed in-container (devtoolset-10 gcc), `sccache ON` over Depot WebDAV,
257-
cold run stored 275 objects (3 hits). The **v0.8.2 in-container panic is gone on v0.16.0**;
258-
first-run diagnostics dropped, steady-state env = `USE_CACHE` + the two `SCCACHE_WEBDAV_*`
259-
+ `DOCKCROSS_ARGS`.
258+
warm cache 277/278 hits (99.64%), 1m46s build time.
260259
2. `crosscompile-linux-x86_64-cuda` (via `build_cuda_linux.sh`, which execs `build.sh`) —
261-
🚧 **enabled next** (diagnostics on for its first run on the manylinux_2_28 image). Only the
262-
gcc C/C++ TUs cache (134 model files + ggml + httplib); the nvcc `.cu` kernels won't
263-
(limited sccache nvcc support) — still a large partial win on the ~70 min job.
264-
3. `crosscompile-linux-aarch64`, then 4. `crosscompile-android-aarch64`.
265-
5. `crosscompile-android-aarch64-opencl`**separate**, uses `build_opencl_android.sh` (not
266-
`build.sh`); needs its own probe/launcher wiring.
260+
🚧 **first run in progress** (diagnostics on). Only the gcc C/C++ TUs cache (134 model files
261+
+ ggml + httplib); the nvcc `.cu` kernels won't (limited sccache nvcc support) — still a
262+
large partial win on the ~70 min full-arch job; the fast single-arch (sm_120) validation path
263+
cuts nvcc time independently of sccache.
264+
3. `crosscompile-linux-aarch64` — ✅ **enabled** (same steady-state env; probe guards it).
265+
4. `crosscompile-android-aarch64` — ✅ **enabled** (same steady-state env; probe guards it).
266+
5. `crosscompile-android-aarch64-opencl` — ✅ **enabled**. `build_opencl_android.sh` stages the
267+
OpenCL headers/loader, then delegates the jllama cmake build to `build.sh` via `exec`
268+
(same pattern as `build_cuda_linux.sh`), so it inherits the probe and launcher automatically.
267269

268270
Per-job recipe: add `env:` { `USE_CACHE`, `SCCACHE_WEBDAV_ENDPOINT`, `SCCACHE_WEBDAV_TOKEN` } and
269271
`DOCKCROSS_ARGS: "-e SCCACHE_WEBDAV_ENDPOINT -e SCCACHE_WEBDAV_TOKEN -e USE_CACHE"` — the

0 commit comments

Comments
 (0)