Skip to content

Commit

Permalink
ci: Retry sccache with a GCS backend
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Mar 17, 2024
1 parent ef5caeb commit 283d424
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions .github/actions/rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,28 @@ runs:

# sccache slows CI down, so we leave it disabled.
# Leaving the steps below commented out, so we can re-evaluate enabling it later.
# - name: Use sccache
# uses: mozilla-actions/[email protected]

# - name: Enable sscache
# shell: bash
# run: |
# if [ "${{ runner.os }}" = "Windows" ]; then
# echo "CC=sccache cl" >> "$GITHUB_ENV"
# echo "CXX=sccache cl" >> "$GITHUB_ENV"
# else
# echo "CC=sccache cc" >> "$GITHUB_ENV"
# echo "CXX=sccache c++" >> "$GITHUB_ENV"
# fi
# echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
# echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
# echo "CARGO_INCREMENTAL=0" >> "$GITHUB_ENV"
- name: Use sccache
uses: mozilla-actions/[email protected]

- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'

- name: Enable sscache
shell: bash
run: |
if [ "${{ runner.os }}" = "Windows" ]; then
echo "CC=sccache cl" >> "$GITHUB_ENV"
echo "CXX=sccache cl" >> "$GITHUB_ENV"
else
echo "CC=sccache cc" >> "$GITHUB_ENV"
echo "CXX=sccache c++" >> "$GITHUB_ENV"
fi
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
echo "CARGO_INCREMENTAL=0" >> "$GITHUB_ENV"
echo "SCCACHE_GCS_BUCKET=neqo-cache" >> "$GITHUB_ENV"
echo "SCCACHE_GCS_RW_MODE=READ_WRITE" >> "$GITHUB_ENV"
# Ditto for rust-cache.
# - name: Use Rust cache
Expand Down

0 comments on commit 283d424

Please sign in to comment.