Skip to content

Commit

Permalink
note for caching in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwen01 committed Nov 5, 2024
1 parent 8067db6 commit 03d97dd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions book/developers/usage-in-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,23 @@ And then you can install the SP1 toolchain:
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version
```
To speed up your CI workflow, you can cache the Rust toolchain and SP1 toolchain. See this example
from SP1's CI workflow.
```yaml
- name: rust-cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
~/.rustup/
~/.sp1/circuits/plonk/ # Cache these if you're generating plonk proofs with docker in CI.
~/.sp1/circuits/groth16/ # Cache these if you're generating groth16 proofs with docker in CI.
key: rust-1.81.0-${{ hashFiles('**/Cargo.toml') }}
restore-keys: rust-1.81.0-
```

0 comments on commit 03d97dd

Please sign in to comment.