|
13 | 13 | - ".github/workflows/build-and-test-rust.yml" |
14 | 14 |
|
15 | 15 | jobs: |
| 16 | + build: |
| 17 | + runs-on: aligned-runner |
| 18 | + |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + |
| 22 | + - name: Set up Rust |
| 23 | + uses: actions-rs/toolchain@v1 |
| 24 | + with: |
| 25 | + toolchain: 1.86.0 |
| 26 | + components: rustfmt, clippy |
| 27 | + override: true |
| 28 | + |
| 29 | + - name: Cache Rust dependencies |
| 30 | + uses: actions/cache@v3 |
| 31 | + with: |
| 32 | + path: | |
| 33 | + ~/.cargo/registry |
| 34 | + ~/.cargo/git |
| 35 | + crates/target |
| 36 | + key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }} |
| 37 | + restore-keys: | |
| 38 | + ${{ runner.os }}-rust- |
| 39 | +
|
| 40 | + - name: Build Batcher |
| 41 | + run: | |
| 42 | + cd crates |
| 43 | + cargo build --all |
| 44 | +
|
| 45 | + - name: Check formatting of AggregationMode |
| 46 | + run: | |
| 47 | + cd aggregation_mode |
| 48 | + cargo fmt --all -- --check |
| 49 | +
|
| 50 | + - name: Build AggregationMode # We build before clippy to generate the ELF |
| 51 | + run: | |
| 52 | + cd aggregation_mode |
| 53 | + cargo build --all |
| 54 | +
|
| 55 | + - name: Run Clippy on AggregationMode |
| 56 | + run: | |
| 57 | + cd aggregation_mode |
| 58 | + # We need to skip the build as clippy does not support the riscv32im-risc0-zkvm-elf target |
| 59 | + RISC0_SKIP_BUILD=1 cargo clippy --all -- -D warnings |
16 | 60 |
|
17 | 61 | test: |
18 | 62 | runs-on: aligned-runner |
|
24 | 68 | - name: foundry-toolchain |
25 | 69 | uses: foundry-rs/foundry-toolchain@v1.2.0 |
26 | 70 |
|
| 71 | + # Reference: https://github.com/succinctlabs/sp1/actions/runs/8886659400/workflow#L61-L65 |
| 72 | + - name: Install sp1 toolchain |
| 73 | + run: | |
| 74 | + curl -L https://sp1.succinct.xyz | bash |
| 75 | + source /home/runner/.bashrc |
| 76 | + ~/.sp1/bin/sp1up |
| 77 | +
|
| 78 | + - name: Install risc0 toolchain |
| 79 | + run: | |
| 80 | + curl -L https://risczero.com/install | bash |
| 81 | + source ~/.bashrc |
| 82 | + ~/.risc0/bin/rzup install |
| 83 | +
|
27 | 84 | - name: Cache Rust dependencies |
28 | 85 | uses: actions/cache@v3 |
29 | 86 | with: |
|
44 | 101 | echo "=== searching for try_build_batch in expanded.rs ===" |
45 | 102 | rg -n 'fn\s+try_build_batch' expanded.rs || true |
46 | 103 | rg -n '__exposed_try_build_batch_for_tests' expanded.rs || true |
47 | | -
|
| 104 | + |
48 | 105 | - name: Run Batcher tests |
49 | 106 | run: | |
50 | 107 | cd crates |
|
0 commit comments