@@ -13,14 +13,10 @@ permissions:
1313
1414env :
1515 CARGO_TERM_COLOR : always
16- # sccache caches rustc invocations across runs. RUSTC_WRAPPER is exported
17- # only after the setup step verifies the GHA cache backend is reachable, so
18- # transient cache backend failures fall back to uncached rustc instead of
19- # failing the build.
20- SCCACHE_GHA_ENABLED : " true"
21- # sccache cannot cache Cargo incremental artifacts; without this, sccache
22- # reports ~0% utilization even on cache misses. Disabling incremental lets
23- # sccache cache per-crate compilations whenever the cargo target cache misses.
16+ # Disable Cargo incremental artifacts. The Rust FFI is built once per
17+ # submodule SHA and cached whole (see the cargo target cache below), so
18+ # incremental dirs add nothing but bloat the cached target/ directory and
19+ # slow the cache upload/download.
2420 CARGO_INCREMENTAL : " 0"
2521 # Pinned commit for cpp-example-collection smoke build (https://github.com/livekit-examples/cpp-example-collection)
2622 CPP_EXAMPLE_COLLECTION_REF : bbf0fdf72dac2239117213475449565686f8c58b
@@ -120,30 +116,6 @@ jobs:
120116 if : matrix.name == 'macos-x64'
121117 run : rustup target add x86_64-apple-darwin
122118
123- # ---------- Setup sccache ----------
124- - name : Setup sccache
125- uses : mozilla-actions/sccache-action@054db53350805f83040bf3e6e9b8cf5a139aa7c9 # v0.0.7
126-
127- - name : Enable sccache wrapping (probe first)
128- shell : bash
129- run : |
130- if sccache --start-server >/dev/null 2>&1; then
131- echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
132- # Wire sccache into the C++ build too (the dominant build cost),
133- # but only where the generator honors compiler launchers. The
134- # Windows preset uses the Visual Studio generator, which ignores
135- # CMAKE_<LANG>_COMPILER_LAUNCHER, so we skip it there.
136- if [[ "$RUNNER_OS" != "Windows" ]]; then
137- echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> "$GITHUB_ENV"
138- echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> "$GITHUB_ENV"
139- echo "::notice::sccache enabled for rustc + C/C++ (RUSTC_WRAPPER + CMAKE_*_COMPILER_LAUNCHER)"
140- else
141- echo "::notice::sccache enabled for rustc only (Windows VS generator ignores compiler launchers)"
142- fi
143- else
144- echo "::warning::sccache backend unreachable; building without compile cache this run"
145- fi
146-
147119 # ---------- Cache Cargo ----------
148120 # The Rust FFI is built from the pinned client-sdk-rust submodule. Its
149121 # compiled output only changes when the submodule commit changes, so we
@@ -202,11 +174,6 @@ jobs:
202174 shell : pwsh
203175 run : ${{ matrix.build_cmd }}
204176
205- - name : sccache stats
206- if : always()
207- shell : bash
208- run : sccache --show-stats || true
209-
210177 # Save the populated target/ now, while the build output still exists and
211178 # before the "Clean after build" step runs clean-all. Only on a miss --
212179 # an exact-key hit means the cache already holds this submodule's output.
@@ -508,6 +475,20 @@ jobs:
508475 if : github.event_name == 'pull_request'
509476
510477 steps :
478+ # Reclaim ~30GB before loading the multi-GB SDK image and building the
479+ # example collection inside it. Mirrors the docker-build jobs; without it
480+ # the x64 collection build has hit "no space left on device".
481+ - name : Free disk space
482+ uses : jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
483+ with :
484+ tool-cache : false
485+ android : true
486+ dotnet : true
487+ haskell : true
488+ large-packages : true
489+ docker-images : true
490+ swap-storage : true
491+
511492 - name : Download Docker image artifact
512493 uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
513494 with :
@@ -535,6 +516,20 @@ jobs:
535516 if : github.event_name == 'pull_request'
536517
537518 steps :
519+ # Reclaim ~30GB before loading the multi-GB SDK image and building the
520+ # example collection inside it. The standard ubuntu-latest runner has hit
521+ # "no space left on device" here without this step.
522+ - name : Free disk space
523+ uses : jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
524+ with :
525+ tool-cache : false
526+ android : true
527+ dotnet : true
528+ haskell : true
529+ large-packages : true
530+ docker-images : true
531+ swap-storage : true
532+
538533 - name : Download Docker image artifact
539534 uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
540535 with :
0 commit comments