sccache (Rust / C / C++)
Avrea provides a WebDAV remote storage endpoint for sccache. Compilation outputs are cached so that unchanged source files skip recompilation across jobs and branches.
On Avrea runners
Section titled “On Avrea runners”The storage endpoint is pre-configured:
SCCACHE_WEBDAV_ENDPOINT="http://avrea-host:8290/sccache-build/webdav"SCCACHE_WEBDAV_KEY_PREFIX=""You need to install sccache, set RUSTC_WRAPPER, and start the daemon in your workflow:
jobs: build: runs-on: avrea-ubuntu-latest env: RUSTC_WRAPPER: sccache steps: - uses: actions/checkout@v6 - name: Install sccache run: | SCCACHE_VERSION="v0.10.0" curl -fsSL "https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" \ | tar xz --strip-components=1 -C /usr/local/bin/ "sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache" - run: sccache --start-server - run: cargo build --release - run: sccache --show-statsManual setup
Section titled “Manual setup”env: RUSTC_WRAPPER: sccache SCCACHE_WEBDAV_ENDPOINT: "http://avrea-host:8290/sccache-build/webdav" SCCACHE_WEBDAV_KEY_PREFIX: ""
steps: - uses: actions/checkout@v6 - name: Install sccache run: | SCCACHE_VERSION="v0.10.0" curl -fsSL "https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" \ | tar xz --strip-components=1 -C /usr/local/bin/ "sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache" - run: sccache --start-server - run: cargo build --release - run: sccache --show-statsC/C++ usage
Section titled “C/C++ usage”Set the compiler wrappers to route compilation through sccache:
env: CC: sccache gcc CXX: sccache g++Or with clang:
env: CC: sccache clang CXX: sccache clang++