Skip to content

Commit

Permalink
ci(cache): replace rust-cache with sccache-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
saying121 committed Nov 11, 2024
1 parent 425a5a8 commit b371237
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 28 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
with:
toolchain: stable

- name: Rust Cache
uses: Swatinem/rust-cache@v2

- name: Install cargo-machete
uses: taiki-e/install-action@v2
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ jobs:
toolchain: stable
components: clippy

- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.6
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

- name: Install Dbus
if: startsWith(matrix.os, 'ubuntu-')
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ jobs:
run: |
echo "rustc=$(rustc --version)" >> "$GITHUB_OUTPUT"
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.6
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

- name: Install cargo-binstall
uses: taiki-e/install-action@v2
Expand Down Expand Up @@ -72,8 +75,11 @@ jobs:
- name: Fetch Repository
uses: actions/checkout@v4

- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.6
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

- name: Install Stable Rust Toolchain
uses: dtolnay/rust-toolchain@master
Expand Down Expand Up @@ -161,8 +167,11 @@ jobs:
toolchain: stable
targets: ${{ matrix.target }}

- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.6
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

- name: Install Dbus
if: ${{ !matrix.cross && startsWith(matrix.os, 'ubuntu-') }}
Expand Down
22 changes: 5 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,11 @@ jobs:
with:
toolchain: stable

- name: Rust Cache
if: startsWith(matrix.os, 'ubuntu-')
uses: Swatinem/rust-cache@v2
with:
cache-directories: "~/.cache/lcode/"

- name: Rust Cache
if: startsWith(matrix.os, 'windows-')
uses: Swatinem/rust-cache@v2
with:
cache-directories: "~/AppData/Local/lcode/"

- name: Rust Cache
if: startsWith(matrix.os, 'macos-')
uses: Swatinem/rust-cache@v2
with:
cache-directories: "~/Library/Caches/lcode/"
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.6
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

- name: Install Dependencies
if: startsWith(matrix.os, 'ubuntu-')
Expand Down

0 comments on commit b371237

Please sign in to comment.