File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33on :
44 pull_request :
5- workflow_dispatch :
65
76concurrency :
87 group : ${{ github.workflow }}-${{ github.ref }}
1615jobs :
1716 ci :
1817 name : Format, lint, build, and test
18+ # Self-hosted macOS runner required for CommonCrypto FFI and NAS access
1919 runs-on : spiceai-macos
2020 permissions :
2121 contents : read
@@ -51,13 +51,15 @@ jobs:
5151 run : cargo test --locked
5252
5353 - name : Run sccache integration test
54+ # Skipped on fork PRs where the secret is unavailable
55+ if : ${{ secrets.UNAS_SMB_PASS != '' }}
5456 env :
55- SPICEIO_SMB_SERVER : 192.168.3.148
56- SPICEIO_SMB_USER : runner
57+ SPICEIO_SMB_SERVER : ${{ vars.SPICEIO_SMB_SERVER || ' 192.168.3.148' }}
58+ SPICEIO_SMB_USER : ${{ vars.SPICEIO_SMB_USER || ' runner' }}
5759 SPICEIO_SMB_PASS : ${{ secrets.UNAS_SMB_PASS }}
58- SPICEIO_SMB_SHARE : ai_platform_dev
59- SPICEIO_BUCKET : spiceio
60- SPICEIO_REGION : us-west-1
60+ SPICEIO_SMB_SHARE : ${{ vars.SPICEIO_SMB_SHARE || ' ai_platform_dev' }}
61+ SPICEIO_BUCKET : ${{ vars.SPICEIO_BUCKET || ' spiceio' }}
62+ SPICEIO_REGION : ${{ vars.SPICEIO_REGION || ' us-west-1' }}
6163 run : ./scripts/test-sccache.sh
6264
6365 - name : Build release artifact
Original file line number Diff line number Diff line change @@ -267,3 +267,17 @@ echo "[test] sccache stats:"
267267echo " ======================================="
268268sccache --show-stats
269269echo " ======================================="
270+
271+ # ── Verify cache hits ───────────────────────────────────────────────────────
272+
273+ STATS=$( sccache --show-stats 2>&1 )
274+ CACHE_HITS=$( echo " $STATS " | grep -m1 " ^Cache hits" | awk ' {print $NF}' )
275+ WRITE_ERRORS=$( echo " $STATS " | grep -m1 " Cache write errors" | awk ' {print $NF}' )
276+
277+ echo " "
278+ if [[ " ${CACHE_HITS:- 0} " -gt 0 && " ${WRITE_ERRORS:- 0} " -eq 0 ]]; then
279+ echo " [test] PASS: warm build got $CACHE_HITS cache hits, 0 write errors"
280+ else
281+ echo " [test] FAIL: expected cache hits > 0 (got ${CACHE_HITS:- 0} ) and write errors == 0 (got ${WRITE_ERRORS:- 0} )"
282+ exit 1
283+ fi
You can’t perform that action at this time.
0 commit comments