Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cargo dependency cache to the CI process #420

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ jobs:
toolchain: nightly-2024-03-12
override: true
components: rustfmt
- name: "Cache cargo"
id: cache-cargo
uses: "actions/cache@v4"
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
save-always: true
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Check TOML
uses: dprint/[email protected]
- name: Check Format
Expand All @@ -49,6 +62,19 @@ jobs:
target: wasm32-unknown-unknown
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: "Cache cargo"
id: cache-cargo
uses: "actions/cache@v4"
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
save-always: true
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Install try-runtime
run: cargo install --git https://github.com/paritytech/try-runtime-cli --locked
- name: Check Build
Expand Down Expand Up @@ -86,6 +112,19 @@ jobs:
components: clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: "Cache cargo"
id: cache-cargo
uses: "actions/cache@v4"
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
save-always: true
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Check with Clippy
run: |
cargo clippy --no-deps --all-targets --features runtime-benchmarks,try-runtime --workspace -- --deny warnings
Expand All @@ -108,6 +147,19 @@ jobs:
target: wasm32-unknown-unknown
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: "Cache cargo"
id: cache-cargo
uses: "actions/cache@v4"
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
save-always: true
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
Expand Down
Loading