-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from nyurik/patch-1
Show conditional enabling of caching
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,19 @@ Just copy and paste the following in your GitHub action: | |
uses: mozilla-actions/[email protected] | ||
``` | ||
|
||
### Conditionally run cache and enable it | ||
|
||
``` | ||
- name: Run sccache-cache only on non-release runs | ||
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch' | ||
uses: mozilla-actions/[email protected] | ||
- name: Set Rust caching env vars only on non-release runs | ||
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch' | ||
run: | | ||
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | ||
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | ||
``` | ||
|
||
### Specify a given version of sccache | ||
|
||
``` | ||
|