ci: try using sccache
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
03296412ab
commit
60927c1c72
2 changed files with 24 additions and 0 deletions
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
|
@ -27,6 +27,16 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
# sccache
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
SCCACHE_BUCKET: "sccache"
|
||||
SCCACHE_S3_USE_SSL: ${{ vars.SCCACHE_S3_USE_SSL }}
|
||||
SCCACHE_REGION: ${{ vars.SCCACHE_REGION }}
|
||||
SCCACHE_ENDPOINT: ${{ vars.SCCACHE_ENDPOINT }}
|
||||
SCCACHE_CACHE_MULTIARCH: ${{ vars.SCCACHE_CACHE_MULTIARCH }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
# Required to make some things output color
|
||||
TERM: ansi
|
||||
# Publishing to my nix binary cache
|
||||
|
@ -126,6 +136,11 @@ jobs:
|
|||
run: |
|
||||
bin/nix-build-and-cache ci
|
||||
|
||||
# use sccache for Rust
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@main
|
||||
|
||||
# use rust-cache
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Run CI tests
|
||||
|
@ -244,6 +259,13 @@ jobs:
|
|||
direnv allow
|
||||
nix develop .#all-features --command true
|
||||
|
||||
# use sccache for Rust
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@main
|
||||
|
||||
# use rust-cache
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Build static ${{ matrix.target }}
|
||||
run: |
|
||||
CARGO_DEB_TARGET_TUPLE=$(echo ${{ matrix.target }} | grep -o -E '^([^-]*-){3}[^-]*')
|
||||
|
|
|
@ -136,6 +136,8 @@
|
|||
|
||||
# Useful for editing the book locally
|
||||
mdbook
|
||||
|
||||
sccache
|
||||
])
|
||||
++ scope.main.buildInputs
|
||||
++ scope.main.propagatedBuildInputs
|
||||
|
|
Loading…
Add table
Reference in a new issue