Skip to content

Commit 969da60

Browse files
authored
Fix use of rust cache on CI (#2169)
* Do the checkout before setting up cache * Rename stwo program targets * Remove stwo programs comparison
1 parent 7d0cb7e commit 969da60

File tree

3 files changed

+19
-25
lines changed

3 files changed

+19
-25
lines changed

.github/workflows/cairo_1_programs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
steps:
1414
- name: Install Rust toolchain
1515
uses: dtolnay/[email protected]
16-
- name: Set up Cargo cache
17-
uses: Swatinem/rust-cache@v2
1816
- name: Checkout
1917
uses: actions/checkout@v4
18+
- name: Set up Cargo cache
19+
uses: Swatinem/rust-cache@v2
2020
- name: install corelib
2121
run: cd cairo1-run/ && make deps
2222
- name: Run tests

.github/workflows/hint_accountant.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
steps:
1414
- name: Install Rust toolchain
1515
uses: dtolnay/[email protected]
16-
- name: Set up Cargo cache
17-
uses: Swatinem/rust-cache@v2
1816
- name: Checkout
1917
uses: actions/checkout@v4
18+
- name: Set up Cargo cache
19+
uses: Swatinem/rust-cache@v2
2020
- name: Check Build
2121
run: cargo build -p hint_accountant
2222
- name: Clone cairo-lang repo

.github/workflows/rust.yml

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ jobs:
162162
uses: dtolnay/[email protected]
163163
with:
164164
components: rustfmt, clippy
165-
- name: Set up cargo cache
166-
uses: Swatinem/rust-cache@v2
167165
- name: Checkout
168166
uses: actions/checkout@v4
167+
- name: Set up cargo cache
168+
uses: Swatinem/rust-cache@v2
169169

170170
- uses: actions/download-artifact@master
171171
with:
@@ -203,6 +203,9 @@ jobs:
203203
with:
204204
targets: wasm32-unknown-unknown
205205

206+
- name: Checkout
207+
uses: actions/checkout@v4
208+
206209
- name: Set up cargo cache
207210
uses: Swatinem/rust-cache@v2
208211
with:
@@ -213,9 +216,6 @@ jobs:
213216
with:
214217
tool: cargo-all-features
215218

216-
- name: Checkout
217-
uses: actions/checkout@v4
218-
219219
- uses: actions/download-artifact@master
220220
with:
221221
name: proof_programs
@@ -249,6 +249,9 @@ jobs:
249249
with:
250250
targets: wasm32-unknown-unknown
251251

252+
- name: Checkout
253+
uses: actions/checkout@v4
254+
252255
- name: Set up cargo cache
253256
uses: Swatinem/rust-cache@v2
254257
with:
@@ -259,9 +262,6 @@ jobs:
259262
with:
260263
tool: cargo-all-features
261264

262-
- name: Checkout
263-
uses: actions/checkout@v4
264-
265265
- name: Download proof programs symlinks
266266
uses: actions/download-artifact@master
267267
with:
@@ -289,14 +289,14 @@ jobs:
289289
with:
290290
targets: wasm32-unknown-unknown
291291

292+
- name: Checkout
293+
uses: actions/checkout@v4
294+
292295
- name: Set up cargo cache
293296
uses: Swatinem/rust-cache@v2
294297
with:
295298
cache-on-failure: true
296299

297-
- name: Checkout
298-
uses: actions/checkout@v4
299-
300300
- name: Download proof programs symlinks
301301
uses: actions/download-artifact@master
302302
with:
@@ -330,10 +330,10 @@ jobs:
330330
uses: dtolnay/[email protected]
331331
with:
332332
components: llvm-tools-preview
333-
- name: Set up cargo cache
334-
uses: Swatinem/rust-cache@v2
335333
- name: Checkout
336334
uses: actions/checkout@v4
335+
- name: Set up cargo cache
336+
uses: Swatinem/rust-cache@v2
337337

338338
- uses: actions/download-artifact@master
339339
with:
@@ -394,10 +394,10 @@ jobs:
394394
steps:
395395
- name: Install Rust
396396
uses: dtolnay/[email protected]
397-
- name: Set up cargo cache
398-
uses: Swatinem/rust-cache@v2
399397
- name: Checkout
400398
uses: actions/checkout@v4
399+
- name: Set up cargo cache
400+
uses: Swatinem/rust-cache@v2
401401
- name: Build
402402
run: cargo b --release -p cairo-vm-cli
403403
# We don't read from cache because it should always miss
@@ -484,12 +484,6 @@ jobs:
484484
- program-target: cairo_test_programs
485485
programs-dir: cairo_programs
486486
extra-args: '--cairo_pie_output {program}.rs.pie.zip'
487-
- program-target: cairo_stwo_exclusive_programs
488-
programs-dir: cairo_programs/stwo_exclusive_programs
489-
extra-args: '--cairo_pie_output {program}.rs.pie.zip'
490-
- program-target: cairo_stwo_exclusive_programs_proof_mode
491-
programs-dir: cairo_programs/stwo_exclusive_programs
492-
extra-args: '--proof_mode --air_public_input {program}.rs.air_public_input --air_private_input {program}.rs.air_private_input '
493487
name: Compute memory and execution traces with cairo-vm
494488
needs: [ build-programs, build-release ]
495489
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)