Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 328da0e

Browse files
committedMay 31, 2024
ci: cache Cargo stuff
1 parent 9d7e8de commit 328da0e

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed
 

‎.github/workflows/ci.yml

+15-9
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,27 @@ env:
1111
RUSTFLAGS: -Dwarnings
1212

1313
jobs:
14-
lint:
14+
ci:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v4
18-
- run: cargo clippy --all-targets --all-features
1918

20-
test:
21-
runs-on: ubuntu-latest
22-
steps:
23-
- uses: actions/checkout@v4
24-
- name: Run tests
19+
# TODO: Tighter cache control.
20+
- uses: actions/cache@v4
21+
with:
22+
path: |
23+
~/.cargo
24+
./target
25+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
26+
27+
- name: Lint
28+
run: cargo clippy --all-targets --all-features
29+
30+
- name: Test
2531
env:
2632
RPC_URL: ${{ secrets.RPC_URL }}
27-
# Our tests are heavy, avoid running them in parallel to not risk nuking RAM.
28-
# Each parallel test still executes parallelly up to the number of CPUs anyway.
33+
# Running our heavy tests simultaneously would congest resources.
34+
# Each parallel test still executes parallelly anyway.
2935
run: |
3036
git submodule update --init
3137
cargo test --release -- --test-threads=1

0 commit comments

Comments
 (0)
Please sign in to comment.