-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: better rust build caching (#16)
- Loading branch information
1 parent
826bfc8
commit e8e9c26
Showing
2 changed files
with
25 additions
and
9 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 |
---|---|---|
|
@@ -10,24 +10,40 @@ on: | |
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
SCCACHE_GHA_ENABLED: "true" | ||
RUSTC_WRAPPER: "sccache" | ||
|
||
jobs: | ||
build: | ||
|
||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
# Cache rust/cargo build steps | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
# The prefix cache key, this can be changed to start a new cache manually. | ||
# default: "v0-rust" | ||
prefix-key: "v2" | ||
- name: Build | ||
run: make build | ||
prefix-key: v0 | ||
# Cache only the cargo registry | ||
cache-targets: false | ||
- uses: mozilla-actions/[email protected] | ||
- name: Check fmt | ||
run: make check-fmt | ||
- name: Check clippy | ||
run: make check-clippy | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
# The prefix cache key, this can be changed to start a new cache manually. | ||
# default: "v0-rust" | ||
prefix-key: v0 | ||
# Cache only the cargo registry | ||
cache-targets: false | ||
- uses: mozilla-actions/[email protected] | ||
- name: Build | ||
run: make build |
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