Skip to content

Commit

Permalink
Use cache to speed up (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
shunsukew authored Feb 26, 2023
1 parent de4bbd8 commit 9a1d333
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,30 @@ jobs:
- name: Checkout the source code
uses: actions/checkout@v3

- name: Install cargo contract
- name: Install & display rust toolchain
run: |
rustup show
rustup component add rust-src
sudo apt-get install binaryen
- name: Check targets are installed correctly
run: rustup target list --installed

- name: Cache Crates
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-rust-${{ hashFiles('rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-rust
- name: Check if cargo-contract exists
id: check-cargo-contract
continue-on-error: true
run: cargo contract --version

- name: Install cargo contract
if: ${{ steps.check-cargo-contract.outcome == 'failure' }}
run: |
cargo install cargo-dylint dylint-link
cargo install --force --locked cargo-contract
Expand Down

0 comments on commit 9a1d333

Please sign in to comment.