Skip to content

Commit

Permalink
ci: Only install sccache action once per workflow (#2123)
Browse files Browse the repository at this point in the history
* ci: Disable sccache on Windows again

Because for some reason today, the action doesn't install:
```
Error: Error: File was unable to be removed Error: EBUSY: resource busy or locked, rmdir 'C:\hostedtoolcache\windows\sccache\0.8.1\x64'
Error: File was unable to be removed Error: EBUSY: resource busy or locked, rmdir 'C:\hostedtoolcache\windows\sccache\0.8.1\x64'
```

* Check if it's installed already

* Fix
  • Loading branch information
larseggert authored Sep 17, 2024
1 parent cca3db2 commit 0cb89a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/actions/nss/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ runs:
echo "BUILD_NSS=0" >> "$GITHUB_ENV"
- name: Use sccache
# Apparently the action can't be installed twice in the same workflow, so check if
# it's already installed by checking if the RUSTC_WRAPPER environment variable is set
# (which every "use" of this action needs to therefore set)
if: env.RUSTC_WRAPPER != 'sccache'
uses: mozilla-actions/sccache-action@2e7f9ec7921547d4b46598398ca573513895d0bd # v0.0.4

- name: Enable sscache
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ runs:
targets: ${{ inputs.targets }}

- name: Use sccache
# Apparently the action can't be installed twice in the same workflow, so check if
# it's already installed by checking if the RUSTC_WRAPPER environment variable is set
# (which every "use" of this action needs to therefore set)
if: env.RUSTC_WRAPPER != 'sccache'
uses: mozilla-actions/sccache-action@2e7f9ec7921547d4b46598398ca573513895d0bd # v0.0.4

- name: Enable sscache
Expand Down

0 comments on commit 0cb89a9

Please sign in to comment.