Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

ci(offchain): reduce cache size by using cargo sweep #119

Merged
merged 2 commits into from
Jun 26, 2023
Merged
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
29 changes: 24 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ jobs:
with:
submodules: recursive
token: ${{ secrets.CI_TOKEN }}

- name: 📦 Install protoc
run: sudo apt update && sudo apt install -y protobuf-compiler libprotobuf-dev

- uses: actions/cache@v3
with:
path: |
Expand All @@ -39,11 +41,28 @@ jobs:
offchain/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- run: cargo install diesel_cli --no-default-features --features "postgres" --force
- run: cargo fmt --all -- --check
- run: cargo check --workspace
- run: cargo test --no-run
- run: cargo test

- name: Install cargo sweep
run: cargo install cargo-sweep
continue-on-error: true

- name: Check format
run: cargo fmt --all -- --check

- name: Set sweep timestamp
run: cargo sweep -s

- name: Check code
run: cargo check --workspace

- name: Build binaries and tests
run: cargo test --no-run

- name: Clean old build files
run: cargo sweep -f

- name: Run tests
run: cargo test

test_onchain:
runs-on: ubuntu-22.04
Expand Down
Loading