Skip to content

Commit 2aa541a

Browse files
authored
Cache ffi (#2187)
1 parent 606dd80 commit 2aa541a

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

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

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,81 @@ jobs:
3131
- name: foundry-toolchain
3232
uses: foundry-rs/[email protected]
3333

34+
- name: Cache SP1 bindings
35+
id: cache-sp1
36+
uses: actions/cache@v4
37+
with:
38+
path: operator/sp1/lib/libsp1_verifier_ffi.so
39+
key: sp1-bindings-${{ runner.os }}-${{ hashFiles('operator/sp1/lib/**/*.rs', 'operator/sp1/lib/Cargo.*') }}
40+
3441
- name: Build SP1 bindings
42+
if: steps.cache-sp1.outputs.cache-hit != 'true'
3543
run: make build_sp1_linux
3644

3745
- name: Clean SP1 build artifacts
46+
if: steps.cache-sp1.outputs.cache-hit != 'true'
3847
run: rm -rf operator/sp1/lib/target
3948

49+
- name: Cache Risc Zero bindings
50+
id: cache-risc-zero
51+
uses: actions/cache@v4
52+
with:
53+
path: operator/risc_zero/lib/librisc_zero_verifier_ffi.so
54+
key: risc-zero-bindings-${{ runner.os }}-${{ hashFiles('operator/risc_zero/lib/**/*.rs', 'operator/risc_zero/lib/Cargo.*') }}
55+
4056
- name: Build Risc Zero go bindings
57+
if: steps.cache-risc-zero.outputs.cache-hit != 'true'
4158
run: make build_risc_zero_linux
4259

4360
- name: Clean Risc Zero build artifacts
61+
if: steps.cache-risc-zero.outputs.cache-hit != 'true'
4462
run: rm -rf operator/risc_zero/lib/target
4563

64+
- name: Cache Merkle Tree bindings
65+
id: cache-merkle-tree
66+
uses: actions/cache@v4
67+
with:
68+
path: |
69+
operator/merkle_tree/lib/libmerkle_tree.so
70+
operator/merkle_tree/lib/libmerkle_tree.a
71+
key: merkle-tree-bindings-${{ runner.os }}-${{ hashFiles('operator/merkle_tree/lib/**/*.rs', 'operator/merkle_tree/lib/Cargo.*') }}
72+
4673
- name: Build Merkle Tree bindings
74+
if: steps.cache-merkle-tree.outputs.cache-hit != 'true'
4775
run: make build_merkle_tree_linux
4876

4977
- name: Clean Merkle Tree build artifacts
78+
if: steps.cache-merkle-tree.outputs.cache-hit != 'true'
5079
run: rm -rf operator/merkle_tree/lib/target
5180

81+
- name: Cache Mina bindings
82+
id: cache-mina
83+
uses: actions/cache@v4
84+
with:
85+
path: operator/mina/lib/libmina_state_verifier_ffi.so
86+
key: mina-bindings-${{ runner.os }}-${{ hashFiles('operator/mina/lib/**/*.rs', 'operator/mina/lib/Cargo.*') }}
87+
5288
- name: Build Mina bindings
89+
if: steps.cache-mina.outputs.cache-hit != 'true'
5390
run: make build_mina_linux
5491

5592
- name: Clean Mina build artifacts
93+
if: steps.cache-mina.outputs.cache-hit != 'true'
5694
run: rm -rf operator/mina/lib/target
5795

96+
- name: Cache Mina Account bindings
97+
id: cache-mina-account
98+
uses: actions/cache@v4
99+
with:
100+
path: operator/mina_account/lib/libmina_account_verifier_ffi.so
101+
key: mina-account-bindings-${{ runner.os }}-${{ hashFiles('operator/mina_account/lib/**/*.rs', 'operator/mina_account/lib/Cargo.*') }}
102+
58103
- name: Build Mina Account bindings
104+
if: steps.cache-mina-account.outputs.cache-hit != 'true'
59105
run: make build_mina_account_linux
60106

61107
- name: Clean Mina Account build artifacts
108+
if: steps.cache-mina-account.outputs.cache-hit != 'true'
62109
run: rm -rf operator/mina_account/lib/target
63110

64111
- name: Build operator

0 commit comments

Comments
 (0)