Skip to content

Commit

Permalink
Test changing key and sccache for cli tool cache issue
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmesamster committed Jan 9, 2025
1 parent 292a884 commit cabd32f
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/pullrequest_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cabd32f

Please sign in to comment.