forked from keep-starknet-strange/ziggy-starkdust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (43 loc) · 1.51 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.PHONY: deps deps-macos build build_cairo_vm_cli build-compare-benchmarks $(CAIRO_VM_CLI) \
CAIRO_VM_CLI:=cairo-vm/target/release/cairo-vm-cli
$(CAIRO_VM_CLI):
git clone --depth 1 https://github.com/lambdaclass/cairo-vm
cd cairo-vm; cargo b --release --bin cairo-vm-cli
build_cairo_vm_cli: | $(CAIRO_VM_CLI)
BENCH_DIR=cairo_programs/benchmarks
check:
# Creates a pyenv and installs cairo-lang
deps:
pyenv install -s 3.9.15
PYENV_VERSION=3.9.15 python -m venv cairo-vm-env
. cairo-vm-env/bin/activate ; \
pip install -r requirements.txt ; \
# Creates a pyenv and installs cairo-lang
deps-macos:
brew install gmp pyenv
brew install [email protected]
pyenv install -s 3.9.15
PYENV_VERSION=3.9.15 /opt/homebrew/bin/python3.9 -m venv cairo-vm-env
. cairo-vm-env/bin/activate ; \
CFLAGS=-I/opt/homebrew/opt/gmp/include LDFLAGS=-L/opt/homebrew/opt/gmp/lib pip install -r requirements.txt ; \
build:
@zig build
build-optimize:
@zig build -Doptimize=ReleaseFast
test:
@zig build test --summary all
test-filter:
@zig build test --summary all -Dtest-filter="$(FILTER)"
run-integration-test:
@zig build -Doptimize=ReleaseFast integration_test
run-integration-test-filter:
@zig build -Doptimize=ReleaseFast integration_test $(FILTER)
build-compare-benchmarks: build_cairo_vm_cli build-optimize
cd scripts; sh benchmarks.sh
compile-cairo-programs:
cd scripts; sh build_cairo_programs.sh
build-compare-output: build_cairo_vm_cli build-optimize
cd scripts; sh test_compare_output.sh
clean:
@rm -rf ./zig-cache
@rm -rf zig-out