Skip to content

Commit de092a4

Browse files
committed
try caching without sccache
1 parent cb49a43 commit de092a4

File tree

1 file changed

+1
-42
lines changed

1 file changed

+1
-42
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -24,47 +24,14 @@ jobs:
2424
include:
2525
- os: macos-latest
2626
MACOS: true
27-
sccache-path: /Users/runner/Library/Caches/Mozilla.sccache
28-
sccache-download-target: apple-darwin
2927
- os: windows-latest
30-
sccache-path: 'C:\Rust\.cargo\sccache'
31-
sccache-download-target: pc-windows-msvc
3228
- os: ubuntu-latest
33-
sccache-path: /home/runner/.cache/sccache
34-
sccache-download-target: unknown-linux-musl
3529
env:
3630
RUST_BACKTRACE: full
37-
RUSTC_WRAPPER: sccache
3831
RUSTV: ${{ matrix.toolchain }}
39-
SCCACHE_CACHE_SIZE: 2G
40-
SCCACHE_DIR: ${{ matrix.sccache-path }}
41-
SCCACHE_TARGET: ${{ matrix.sccache-download-target }}
42-
URL_BASE: https://github.com/mozilla/sccache/releases/download
43-
SCCACHE_VERSION: v0.2.15
44-
# SCCACHE_RECACHE: 1 # Uncomment this to clear cache, then comment it back out
4532
steps:
4633
- uses: actions/checkout@v2
4734

48-
- name: Install sccache
49-
run: |
50-
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-$SCCACHE_TARGET
51-
mkdir -p $HOME/.local/bin
52-
curl -L "$URL_BASE/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
53-
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
54-
chmod +x $HOME/.local/bin/sccache
55-
echo "$HOME/.local/bin" >> $GITHUB_PATH
56-
if: matrix.os != 'windows-latest'
57-
58-
- name: Install sccache (windows)
59-
run: |
60-
Set-Location "$Env:USERPROFILE"
61-
$Env:SCCACHE_FILE = "sccache-$Env:SCCACHE_VERSION-x86_64-$Env:SCCACHE_TARGET"
62-
$client = new-object System.Net.WebClient
63-
$client.DownloadFile("$Env:URL_BASE/$Env:SCCACHE_VERSION/$Env:SCCACHE_FILE.tar.gz", "$pwd\sccache.tar.gz")
64-
tar -xvzf .\sccache.tar.gz
65-
Move-Item -Path .\$Env:SCCACHE_FILE\sccache.exe -Destination .\.cargo\bin\sccache.exe
66-
if: matrix.os == 'windows-latest'
67-
6835
- name: Install Linux deps alsa and udev
6936
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
7037
if: runner.os == 'linux'
@@ -88,12 +55,11 @@ jobs:
8855
~/.cargo/registry/cache/
8956
~/.cargo/git/db/
9057
target/
91-
${{ matrix.sccache-path }}
9258
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
9359
if: runner.os != 'windows'
9460

9561
- name: Fetch cargo registry cache (windows)
96-
uses: actions/cache@v2
62+
uses: actions/cache@v3
9763
continue-on-error: false
9864
with:
9965
path: |
@@ -102,13 +68,9 @@ jobs:
10268
C:\Rust\.cargo\registry\cache
10369
C:\Rust\.cargo\git\db
10470
target
105-
${{ matrix.sccache-path }}
10671
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
10772
if: runner.os == 'windows'
10873

109-
- name: Start sccache server
110-
run: sccache --start-server
111-
11274
- name: rustfmt & clippy
11375
run: |
11476
rustup component add clippy rustfmt
@@ -119,6 +81,3 @@ jobs:
11981
- run: cargo test --workspace --all-targets --all-features
12082
env:
12183
MACOS: ${{ matrix.MACOS }} # Used by some tests
122-
123-
- name: Stop sccache server
124-
run: sccache --stop-server || true

0 commit comments

Comments
 (0)