Skip to content

Commit f3dc340

Browse files
Maybe fix rust cache
1 parent d155e21 commit f3dc340

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

‎.github/workflows/builds.yml‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,19 @@ jobs:
161161
# step that runs AFTER the "Clean after build" cleanup wipes target/debug
162162
# and target/release, which is why the old cache was always ~empty. The
163163
# restore/save split lets us snapshot the populated target/ before cleanup.
164+
#
165+
# Key on matrix.os (runner image), not runner.os. runner.os is just
166+
# "Linux" for both ubuntu-22.04 and ubuntu-24.04, and restored
167+
# build-scripts / .so files from a newer glibc host fail with
168+
# GLIBC_2.39 not found on the older image.
164169
- name: Restore cargo target
165170
id: cache-cargo-target
166171
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
167172
with:
168173
path: client-sdk-rust/target/
169-
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
174+
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
170175
restore-keys: |
171-
${{ runner.os }}-${{ matrix.name }}-cargo-target-
176+
${{ matrix.os }}-${{ matrix.name }}-cargo-target-
172177
173178
# restore-keys can hydrate target/ from a prior submodule SHA. cxxbridge
174179
# artifacts in webrtc-sys are not compatible across those bumps.
@@ -208,7 +213,7 @@ jobs:
208213
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
209214
with:
210215
path: client-sdk-rust/target/
211-
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
216+
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
212217

213218
- name: Save vcpkg binary cache
214219
if: runner.os == 'Windows' && steps.cache-vcpkg-binary.outputs.cache-hit != 'true'

‎.github/workflows/make-release.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,17 @@ jobs:
157157
restore-keys: |
158158
${{ runner.os }}-${{ matrix.name }}-cargo-registry-
159159
160+
# Key on matrix.os (runner image), not runner.os — see builds.yml.
161+
# Compiled target/ artifacts are glibc-bound and must not restore across
162+
# Ubuntu major versions (e.g. 24.04 → 22.04 → GLIBC_2.39 not found).
160163
- name: Cache cargo target
161164
id: cache-cargo-target
162165
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
163166
with:
164167
path: client-sdk-rust/target/
165-
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
168+
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
166169
restore-keys: |
167-
${{ runner.os }}-${{ matrix.name }}-cargo-target-
170+
${{ matrix.os }}-${{ matrix.name }}-cargo-target-
168171
169172
# restore-keys can hydrate target/ from a prior submodule SHA. cxxbridge
170173
# artifacts in webrtc-sys are not compatible across those bumps.

‎.github/workflows/tests.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,17 @@ jobs:
261261
restore-keys: |
262262
${{ runner.os }}-${{ matrix.name }}-cargo-registry-
263263
264+
# Key on matrix.os (runner image), not runner.os — see builds.yml.
265+
# Compiled target/ artifacts are glibc-bound and must not restore across
266+
# Ubuntu major versions (e.g. 24.04 → 22.04 → GLIBC_2.39 not found).
264267
- name: Restore cargo target
265268
id: cache-cargo-target
266269
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
267270
with:
268271
path: client-sdk-rust/target/
269-
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
272+
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
270273
restore-keys: |
271-
${{ runner.os }}-${{ matrix.name }}-cargo-target-
274+
${{ matrix.os }}-${{ matrix.name }}-cargo-target-
272275
273276
# restore-keys can hydrate target/ from a prior submodule SHA. cxxbridge
274277
# artifacts in webrtc-sys are not compatible across those bumps.

0 commit comments

Comments
 (0)