crow-plugins/sccache
Crow plugin for sccache
Table of Contents
Sccache
status-badge Latest release License: Apache-2.0
Crow CI plugin to load and store compiler artifacts via sccache.
Originally forked from seed.rhizoma.dev/plugin-sccache.
Documentation
Features
- Stores compiler cache (after initial creation) in local or remote storages
- Effective way to reduce compile times for Rust, Clang and CUDA builds
The plugin bundles its own sccache binary and copies it to the current working directory at .sccache-cache/sccache.
If existing files are found within a remote cache storage (e.g. S3), it will download these and use them during future compilations.
The existing cache will be uploaded to the remote storage after the build is finished.
Tip
sccachescales with the number of cores due to parallelism. The more cores are available, the faster the speedup will be.
Settings
| Settings Name | Default | Description |
|---|---|---|
log_level |
info |
Logging verbosity level |
s3_access_key |
none | S3 access key ID |
s3_bucket |
none | S3 bucket name for remote cache storage |
s3_enable_virtual_host |
false |
Enable virtual-hosted-style S3 URLs |
s3_endpoint |
none | S3 endpoint URL |
s3_prefix |
sccache |
S3 key prefix for cache objects |
s3_region |
auto |
S3 region |
s3_save_if |
true |
Save cache after build |
s3_secret_key |
none | S3 secret access key |
s3_server_side_encryption |
false |
Enable S3 server-side encryption |
s3_use_ssl |
true |
Use SSL for S3 connections |
Examples
steps:- name:sccacheimage:codeberg.org/crow-plugins/sccachesettings:bucket:my-build-cacheendpoint:https://my-s3-endpoint.comregion:<region>s3_access_key:from_secret:s3_access_keys3_secret_key:from_secret:s3_secret_key- name:Build Rust projectdepends_on:sccachecommands:# add sccache binary to path- export PATH=".sccache-cache:$PATH"- . ./.sccache# buildcargo build --release# show stats- sccache --show-stats