-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test changing key and sccache for cli tool cache issue
- Loading branch information
1 parent
292a884
commit cabd32f
Showing
1 changed file
with
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,21 +30,29 @@ jobs: | |
with: | ||
toolchain: stable | ||
override: true | ||
- name: Cache Rust dependencies and CLI tool | ||
id: cache-cargo | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml', 'Cargo.lock') }} | ||
cache-targets: true | ||
cache-all-crates: "true" | ||
workspaces: cli | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
# - name: Cache Rust dependencies and CLI tool | ||
# id: cache-cargo | ||
# uses: Swatinem/rust-cache@v2 | ||
# with: | ||
# # Key is set as $os-cargo-$fork-$branch-$cargohash to ensure same | ||
# key: ${{ runner.os }}-cargo-${{ github.event.pull_request.head.repo.owner.login | ||
# }}-${{ github.event.pull_request.head.ref }}-${{ | ||
# hashFiles('Cargo.toml', 'Cargo.lock') }} | ||
# cache-targets: true | ||
# cache-all-crates: "true" | ||
# workspaces: cli | ||
- name: Install nj-cli | ||
run: cargo install nj-cli | ||
- name: enable corepack for yarnpkg upgrade | ||
run: corepack enable | ||
- name: Install Build CLI tool | ||
if: steps.cache-cargo.outputs.cache-hit != 'true' | ||
run: cargo install --path=cli | ||
run: cargo install --path=cli --locked | ||
env: | ||
SCCACHE_GHA_ENABLED: "true" | ||
RUSTC_WRAPPER: "sccache" | ||
- name: install wasm-pack | ||
run: cargo install wasm-pack | ||
- name: JS/TS linting | ||
|
@@ -83,7 +91,10 @@ jobs: | |
id: cache-cargo | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml', 'Cargo.lock') }} | ||
# Key is set as $os-cargo-$fork-$branch-$cargohash to ensure same | ||
key: ${{ runner.os }}-cargo-${{ github.event.pull_request.head.repo.owner.login | ||
}}-${{ github.event.pull_request.head.ref }}-${{ | ||
hashFiles('Cargo.toml', 'Cargo.lock') }} | ||
cache-targets: true | ||
cache-all-crates: "true" | ||
workspaces: cli | ||
|