Skip to content

Commit 8dec02a

Browse files
committed
fix(ci): run build and test in the same step to avoid recompilation
1 parent fa3cbe9 commit 8dec02a

1 file changed

Lines changed: 4 additions & 35 deletions

File tree

.github/workflows/build-and-test-rust.yml

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- ".github/workflows/build-and-test-rust.yml"
1414

1515
jobs:
16-
build:
16+
build-and-test:
1717
runs-on: aligned-runner
1818

1919
steps:
@@ -26,6 +26,9 @@ jobs:
2626
components: rustfmt, clippy
2727
override: true
2828

29+
- name: foundry-toolchain
30+
uses: foundry-rs/foundry-toolchain@v1.2.0
31+
2932
# Reference: https://github.com/succinctlabs/sp1/actions/runs/8886659400/workflow#L61-L65
3033
- name: Install sp1 toolchain
3134
run: |
@@ -82,40 +85,6 @@ jobs:
8285
# We need to skip the build as clippy does not support the riscv32im-risc0-zkvm-elf target
8386
RISC0_SKIP_BUILD=1 cargo clippy --all -- -D warnings
8487
85-
test:
86-
runs-on: aligned-runner
87-
needs: build
88-
steps:
89-
- name: Checkout code
90-
uses: actions/checkout@v4
91-
92-
- name: foundry-toolchain
93-
uses: foundry-rs/foundry-toolchain@v1.2.0
94-
95-
# Reference: https://github.com/succinctlabs/sp1/actions/runs/8886659400/workflow#L61-L65
96-
- name: Install sp1 toolchain
97-
run: |
98-
curl -L https://sp1.succinct.xyz | bash
99-
source /home/runner/.bashrc
100-
~/.sp1/bin/sp1up
101-
102-
- name: Install risc0 toolchain
103-
run: |
104-
curl -L https://risczero.com/install | bash
105-
source ~/.bashrc
106-
~/.risc0/bin/rzup install
107-
108-
- name: Cache Rust dependencies
109-
uses: actions/cache@v3
110-
with:
111-
path: |
112-
~/.cargo/registry
113-
~/.cargo/git
114-
crates/target
115-
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
116-
restore-keys: |
117-
${{ runner.os }}-rust-
118-
11988
- name: Run Batcher tests
12089
run: |
12190
cd crates

0 commit comments

Comments
 (0)