CI: sccache-backed compiled-crate cache (persistent, replaces the dead cache service)
x86_64 uses /sccache (host dir bind-mounted into the job container by the runner config); aarch64 on the klokka host uses a runner-owned dir. Both persist across releases via RUSTC_WRAPPER=sccache. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GLUwWE2KmFPzhKaf67tWbx
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
46f6d6ae19
commit
4a33d1f488
@@ -16,9 +16,11 @@ jobs:
|
|||||||
- arch: x86_64
|
- arch: x86_64
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
sccache_dir: /sccache
|
||||||
- arch: aarch64
|
- arch: aarch64
|
||||||
target: aarch64-unknown-linux-gnu
|
target: aarch64-unknown-linux-gnu
|
||||||
runs-on: aarch64
|
runs-on: aarch64
|
||||||
|
sccache_dir: /var/lib/gitea-runner/sccache
|
||||||
|
|
||||||
runs-on: ${{ matrix.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
|
|
||||||
@@ -36,6 +38,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
targets: ${{ matrix.target }}
|
targets: ${{ matrix.target }}
|
||||||
|
|
||||||
|
# Compiled-crate cache via sccache. x86_64 uses /sccache (a persistent
|
||||||
|
# host dir bind-mounted into the job container by the runner config);
|
||||||
|
# aarch64 runs on the klokka host and uses a runner-owned dir. Both
|
||||||
|
# persist across releases, unlike the (unreachable) Gitea cache service.
|
||||||
|
- name: Set up sccache
|
||||||
|
run: |
|
||||||
|
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
|
||||||
|
echo "SCCACHE_DIR=${{ matrix.sccache_dir }}" >> "$GITHUB_ENV"
|
||||||
|
mkdir -p "${{ matrix.sccache_dir }}"
|
||||||
|
if ! command -v sccache >/dev/null 2>&1; then
|
||||||
|
V=0.8.2
|
||||||
|
curl -sSL "https://github.com/mozilla/sccache/releases/download/v${V}/sccache-v${V}-x86_64-unknown-linux-musl.tar.gz" | tar -xz
|
||||||
|
sudo install -m0755 "sccache-v${V}-x86_64-unknown-linux-musl/sccache" /usr/local/bin/sccache
|
||||||
|
fi
|
||||||
|
sccache --version
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cargo test --target ${{ matrix.target }}
|
run: cargo test --target ${{ matrix.target }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user