Skip to content

Commit

Permalink
ci: install sccache manually from releases build
Browse files Browse the repository at this point in the history
  • Loading branch information
sehnryr committed May 9, 2024
1 parent 217fed8 commit 53f1d71
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ concurrency:
jobs:
build:
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
SCCACHE_CACHE_SIZE: "2G"
SCCACHE_VERSION: "0.8.0"
SCCACHE_PATH: "/usr/local/bin/sccache"
RUSTC_WRAPPER: ${{ env.SCCACHE_PATH }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -42,6 +44,25 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-
- name: Install sccache
run: |
if [ "${{ runner.os }}" = "Linux" ]; then
sccache_platform="x86_64-unknown-linux-musl"
elif [ "${{ runner.os }}" = "macOS" ]; then
sccache_platform="x86_64-apple-darwin"
elif [ "${{ runner.os }}" = "Windows" ]; then
sccache_platform="x86_64-pc-windows-msvc"
else
echo "Unsupported platform: ${{ runner.os }}"
exit 1
fi
sccache_file="sccache-${SCCACHE_VERSION}-${sccache_platform}"
sccache_url="https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${sccache_file}.tar.gz"
echo "URL=${sccache_url}"
curl -L "$sccache_url" | tar xz
mv "$sccache_file/sccache" "$SCCACHE_PATH"
chmod +x "$SCCACHE_PATH"
- uses: mozilla-actions/[email protected]
with:
version: "v0.8.0"
Expand Down

0 comments on commit 53f1d71

Please sign in to comment.