Skip to content

Commit fb610db

Browse files
committed
fix
1 parent c8bd55b commit fb610db

10 files changed

+54
-69
lines changed

.github/workflows/bench.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ jobs:
2323
uses: astral-sh/setup-uv@v5
2424
with:
2525
enable-cache: true
26-
- name: Set python env
27-
run: uv python install 3.9.15 && uv python pin 3.9.15
28-
- name: Install python dependencies
29-
run: uv pip install -r requirements.txt
26+
- name: Install python deps
27+
run: |
28+
uv python install 3.9.15
29+
uv venv --python 3.9.15 cairo-vm-env
30+
. cairo-vm-env/bin/activate
31+
uv pip install -r requirements.txt
32+
echo PATH=$PATH >> $GITHUB_ENV
3033
- name: Run benchmark
3134
run: make benchmark-action
3235
- name: Store benchmark result

.github/workflows/fresh_run.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151

5252
- name: Run make deps${{ matrix.deps_suffix }}
5353
id: deps
54-
run: make deps${{ matrix.deps_suffix }}
54+
run: make deps${{ matrix.deps_suffix }} && . cairo-vm-env/bin/activate && echo PATH=$PATH >> $GITHUB_ENV
5555

5656
- name: Run make build
5757
id: build

.github/workflows/hyper_threading_benchmarks.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ jobs:
1818
uses: astral-sh/setup-uv@v5
1919
with:
2020
enable-cache: true
21-
- name: Set python env
22-
run: uv python install 3.9.15 && uv python pin 3.9.15
23-
- name: Install python dependencies
24-
run: uv pip install -r requirements.txt
21+
- name: Install python deps
22+
run: |
23+
uv python install 3.9.15
24+
uv venv --python 3.9.15 cairo-vm-env
25+
. cairo-vm-env/bin/activate
26+
uv pip install -r requirements.txt
2527
2628
- name: Install Dependencies
2729
run: |
@@ -75,10 +77,11 @@ jobs:
7577
path: ${{ github.workspace }}/
7678

7779
- name: Compile programs
78-
run: make cairo_bench_programs
80+
run: . cairo-vm-env/bin/activate && make cairo_bench_programs
7981

8082
- name: Run Benchmarks
8183
run: |
84+
. cairo-vm-env/bin/activate
8285
cd ${{ github.workspace }}
8386
chmod +x ./hyper_threading_main
8487
chmod +x ./hyper_threading_pr

.github/workflows/hyperfine.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ jobs:
3838
- name: Install uv
3939
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
4040
uses: astral-sh/setup-uv@v5
41-
- name: Set python env
42-
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
43-
run: uv python install 3.9.15 && uv python pin 3.9.15
44-
- name: Install python dependencies
41+
with:
42+
enable-cache: true
43+
- name: Install python deps
4544
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
46-
run: uv pip install -r requirements.txt
45+
run: |
46+
uv python install 3.9.15
47+
uv venv --python 3.9.15 cairo-vm-env
48+
. cairo-vm-env/bin/activate
49+
uv pip install -r requirements.txt
50+
echo PATH=$PATH >> $GITHUB_ENV
4751
4852
- name: Build programs
4953
if: ${{ steps.cache.outputs.cache-hit != 'true' }}

.github/workflows/iai_main.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ jobs:
1818
uses: astral-sh/setup-uv@v5
1919
with:
2020
enable-cache: true
21-
- name: Set python env
22-
run: uv python install 3.9.15 && uv python pin 3.9.15
23-
- name: Install python dependencies
24-
run: uv pip install -r requirements.txt
21+
- name: Install python deps
22+
run: make ci-python-deps && . cairo-vm-env/bin/activate && echo PATH=$PATH >> $GITHUB_ENV
2523
- name: Install test dependencies
2624
run: |
2725
sudo apt update

.github/workflows/iai_pr.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: uv python install 3.9.15 && uv python pin 3.9.15
3838
- name: Install python dependencies
3939
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
40-
run: uv pip install -r requirements.txt
40+
run: uv pip install --system -r requirements.txt
4141
- name: Install test dependencies
4242
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
4343
run: |
@@ -63,10 +63,8 @@ jobs:
6363
uses: astral-sh/setup-uv@v5
6464
with:
6565
enable-cache: true
66-
- name: Set python env
67-
run: uv python install 3.9.15 && uv python pin 3.9.15
68-
- name: Install python dependencies
69-
run: uv pip install -r requirements.txt
66+
- name: Install python deps
67+
run: make ci-python-deps && . cairo-vm-env/bin/activate && echo PATH=$PATH >> $GITHUB_ENV
7068
- name: Install test dependencies
7169
run: |
7270
sudo apt update

.github/workflows/rust.yml

+12-28
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,11 @@ jobs:
8282
uses: astral-sh/setup-uv@v5
8383
with:
8484
enable-cache: true
85-
- name: Set python env
85+
- name: Install python deps
8686
if: steps.cache-programs.outputs.cache-hit != 'true'
8787
&& matrix.program-target != 'cairo_1_test_contracts'
8888
&& matrix.program-target != 'cairo_2_test_contracts'
89-
run: uv python install 3.9.15 && uv python pin 3.9.15
90-
- name: Install python dependencies
91-
if: steps.cache-programs.outputs.cache-hit != 'true'
92-
&& matrix.program-target != 'cairo_1_test_contracts'
93-
&& matrix.program-target != 'cairo_2_test_contracts'
94-
run: uv pip install -r requirements.txt
89+
run: make ci-python-deps && . cairo-vm-env/bin/activate && echo PATH=$PATH >> $GITHUB_ENV
9590

9691
- name: Install cairo 1 compiler
9792
if: steps.cache-programs.outputs.cache-hit != 'true' && matrix.program-target == 'cairo_1_test_contracts'
@@ -459,12 +454,9 @@ jobs:
459454
uses: astral-sh/setup-uv@v5
460455
with:
461456
enable-cache: true
462-
- name: Set python env
463-
if: steps.trace-cache.outputs.cache-hit != 'true'
464-
run: uv python install 3.9.15 && uv python pin 3.9.15
465-
- name: Install python dependencies
457+
- name: Install python deps
466458
if: steps.trace-cache.outputs.cache-hit != 'true'
467-
run: uv pip install -r requirements.txt
459+
run: make ci-python-deps && . cairo-vm-env/bin/activate && echo PATH=$PATH >> $GITHUB_ENV
468460

469461
- name: Fetch programs
470462
if: steps.trace-cache.outputs.cache-hit != 'true'
@@ -718,10 +710,8 @@ jobs:
718710
uses: astral-sh/setup-uv@v5
719711
with:
720712
enable-cache: true
721-
- name: Set python env
722-
run: uv python install 3.9.15 && uv python pin 3.9.15
723-
- name: Install python dependencies
724-
run: uv pip install -r requirements.txt
713+
- name: Install python deps
714+
run: make ci-python-deps && . cairo-vm-env/bin/activate && echo PATH=$PATH >> $GITHUB_ENV
725715

726716
- name: Install cairo-lang and deps
727717
run: |
@@ -745,10 +735,8 @@ jobs:
745735
uses: astral-sh/setup-uv@v5
746736
with:
747737
enable-cache: true
748-
- name: Set python env
749-
run: uv python install 3.9.15 && uv python pin 3.9.15
750-
- name: Install python dependencies
751-
run: uv pip install -r requirements.txt
738+
- name: Install python deps
739+
run: make ci-python-deps && . cairo-vm-env/bin/activate && echo PATH=$PATH >> $GITHUB_ENV
752740

753741
- name: Fetch release binary
754742
uses: actions/cache/restore@v3
@@ -784,10 +772,8 @@ jobs:
784772
uses: astral-sh/setup-uv@v5
785773
with:
786774
enable-cache: true
787-
- name: Set python env
788-
run: uv python install 3.9.15 && uv python pin 3.9.15
789-
- name: Install python dependencies
790-
run: uv pip install -r requirements.txt
775+
- name: Install python deps
776+
run: make ci-python-deps && . cairo-vm-env/bin/activate && echo PATH=$PATH >> $GITHUB_ENV
791777

792778
- name: Fetch release binary
793779
uses: actions/cache/restore@v3
@@ -835,10 +821,8 @@ jobs:
835821
uses: astral-sh/setup-uv@v5
836822
with:
837823
enable-cache: true
838-
- name: Set python env
839-
run: uv python install 3.9.15 && uv python pin 3.9.15
840-
- name: Install python dependencies
841-
run: uv pip install -r requirements.txt
824+
- name: Install python deps
825+
run: make ci-python-deps && . cairo-vm-env/bin/activate && echo PATH=$PATH >> $GITHUB_ENV
842826

843827
- name: Fetch release binary
844828
uses: actions/cache/restore@v3

.github/workflows/test_install.yml

+3-15
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,10 @@ jobs:
5959
key: ${{ runner.os }}-install-${{ github.sha }}
6060
restore-keys: ${{ runner.os }}-install-
6161

62-
- name: Enable pip cache
63-
run: |
64-
mkdir -p ~/.cache/pip
65-
chown -v -R $USER ~/.cache
66-
chmod -v -R 770 ~/.cache
67-
ls -al ~/
68-
ls -al ~/.cache
69-
70-
# NOTE: we don't use install-python because lsb_release isn't installed
71-
- name: Cache Python dependencies
72-
uses: actions/cache@v4
62+
- name: Install uv
63+
uses: astral-sh/setup-uv@v5
7364
with:
74-
path: |
75-
~/.cache/pip/wheels
76-
key: ${{ runner.os }}-python-install-${{ github.sha }}
77-
restore-keys: ${{ runner.os }}-python-install-
65+
enable-cache: true
7866

7967
# NOTE: we do it in one step because GitHub cleans the PATH between steps
8068
- name: Install dependencies and compile project

Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ endif
1919
compare_trace_memory_proof compare_all_proof compare_trace_proof compare_memory_proof compare_air_public_input compare_air_private_input\
2020
hyper-threading-benchmarks \
2121
cairo_bench_programs cairo_proof_programs cairo_test_programs cairo_1_test_contracts cairo_2_test_contracts \
22-
cairo_trace cairo-vm_trace cairo_proof_trace cairo-vm_proof_trace \
22+
cairo_trace cairo-vm_trace cairo_proof_trace cairo-vm_proof_trace ci-python-deps \
2323
fuzzer-deps fuzzer-run-cairo-compiled fuzzer-run-hint-diff build-cairo-lang hint-accountant \ create-proof-programs-symlinks \
2424
$(RELBIN) $(DBGBIN)
2525

@@ -235,6 +235,13 @@ deps-macos: create-proof-programs-symlinks cargo-deps build-cairo-1-compiler-mac
235235
. cairo-vm-env/bin/activate ; \
236236
CFLAGS=-I/opt/homebrew/opt/gmp/include LDFLAGS=-L/opt/homebrew/opt/gmp/lib uv pip install -r requirements.txt ; \
237237

238+
# Used in CI when only python deps are needed.
239+
ci-python-deps:
240+
uv python install 3.9.15 ; \
241+
uv venv --python 3.9.15 cairo-vm-env
242+
. cairo-vm-env/bin/activate ; \
243+
uv pip install -r requirements.txt ; \
244+
238245
$(RELBIN):
239246
cargo build --release
240247

vm/src/vm/vm_core.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3485,7 +3485,7 @@ mod tests {
34853485
vm.step(
34863486
&mut hint_processor,
34873487
exec_scopes_ref!(),
3488-
&Vec::new(),
3488+
&mut Vec::new(),
34893489
#[cfg(feature = "extensive_hints")]
34903490
&mut HashMap::new(),
34913491
&HashMap::new(),

0 commit comments

Comments
 (0)