mirror of
https://github.com/Xevion/byte-me.git
synced 2025-12-06 03:14:35 -06:00
ci: use official sccache github action
This commit is contained in:
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
@@ -7,9 +7,6 @@ on:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTC_WRAPPER: sccache
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
SCCACHE_CACHE_SIZE: "2G"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -46,15 +43,14 @@ jobs:
|
||||
components: rustfmt, clippy
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install sccache
|
||||
uses: taiki-e/install-action@sccache
|
||||
- name: Run sccache-cache only on non-release runs
|
||||
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
|
||||
- name: Configure sccache
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable("ACTIONS_RESULTS_URL", process.env.ACTIONS_RESULTS_URL || "");
|
||||
core.exportVariable("ACTIONS_RUNTIME_TOKEN", process.env.ACTIONS_RUNTIME_TOKEN || "");
|
||||
- name: Set Rust caching env vars only on non-release runs
|
||||
run: |
|
||||
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
|
||||
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
|
||||
|
||||
- name: Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
Reference in New Issue
Block a user