This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
10 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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Setup Cache | ||
description: "Setup Rust artifact caching" | ||
inputs: | ||
name: | ||
description: "Name of the step from the Makefile" | ||
required: true | ||
os: | ||
description: "Name of the OS" | ||
required: true | ||
rust: | ||
description: "Name of the Rust version" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Setup sccache | ||
uses: hanabi1224/[email protected] # https://github.com/hanabi1224/sccache-action used by Forest. | ||
with: | ||
release-name: v0.3.1 | ||
# Caching everything separately, in case they don't ask for the same things to be compiled. | ||
cache-key: ${{ inputs.name }}-${{ inputs.os }}-${{ inputs.rust }}-${{ hashFiles('**/Cargo.lock', 'rust-toolchain', 'rust-toolchain.toml') }} | ||
# Not sure why we should ever update a cache that has the hash of the lock file in it. | ||
# In Forest it only contains the rust-toolchain, so it makes sense to update because dependencies could have changed. | ||
cache-update: false |
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 |
---|---|---|
|
@@ -70,17 +70,14 @@ jobs: | |
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup sccache | ||
uses: hanabi1224/[email protected] # https://github.com/hanabi1224/sccache-action used by Forest. | ||
- name: Setup Cache | ||
uses: ./.github/actions/setup-cache | ||
timeout-minutes: 5 | ||
continue-on-error: true | ||
with: | ||
release-name: v0.3.1 | ||
# Caching everything separately, in case they don't ask for the same things to be compiled. | ||
cache-key: ${{ matrix.make.name }}-${{ matrix.os }}-${{matrix.rust}}-${{ hashFiles('**/Cargo.lock', 'rust-toolchain', 'rust-toolchain.toml') }} | ||
# Not sure why we should ever update a cache that has the hash of the lock file in it. | ||
# In Forest it only contains the rust-toolchain, so it makes sense to update because dependencies could have changed. | ||
cache-update: false | ||
name: ${{ matrix.make.name }} | ||
os: ${{ matrix.os }} | ||
rust: ${{ matrix.rust }} | ||
|
||
- name: ${{ matrix.make.name }} | ||
run: make ${{ matrix.make.task }} |