forked from kkrt-labs/kakarot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (54 loc) · 1.95 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
62
63
64
65
66
67
68
69
70
71
# Include .env file to get GITHUB_TOKEN
ifneq ("$(wildcard .env)","")
include .env
export $(shell sed 's/=.*//' .env)
endif
.PHONY: build test coverage
# Kakarot SSJ artifacts for precompiles
KKRT_SSJ_BUILD_ARTIFACT_URL = $(shell curl -L https://api.github.com/repos/kkrt-labs/kakarot-ssj/releases/latest | jq -r '.assets[0].browser_download_url')
KATANA_VERSION = v0.6.1-alpha.4
build: check
$(MAKE) clean
poetry run python ./kakarot_scripts/compile_kakarot.py
check:
poetry check --lock
fetch-ef-tests:
poetry run python ./kakarot_scripts/ef_tests/fetch.py
# This action fetches the latest Kakarot SSJ (Cairo compiler version >=2) artifacts
# from the main branch and unzips them into the build/ssj directory.
# This is required because Kakarot Zero (Cairo Zero, compiler version <1) uses some SSJ Cairo programs.
# Most notably for precompiles.
fetch-ssj-artifacts:
rm -rf build/ssj
mkdir -p build/ssj
@curl -sL -o dev-artifacts.zip "$(KKRT_SSJ_BUILD_ARTIFACT_URL)"
unzip -o dev-artifacts.zip -d build/ssj
rm -f dev-artifacts.zip
setup: fetch-ssj-artifacts
poetry install
test: build-sol deploy
poetry run pytest tests/src -m "not NoCI" --log-cli-level=INFO -n logical
poetry run pytest tests/end_to_end
test-unit: build-sol
poetry run pytest tests/src -m "not NoCI" -n logical
test-end-to-end: build-sol deploy
poetry run pytest tests/end_to_end
deploy: build
poetry run python ./kakarot_scripts/deploy_kakarot.py
format:
trunk check --fix
format-check:
trunk check --ci
clean:
rm -rf build/*.json
rm -rf build/fixtures/*.json
mkdir -p build
check-resources:
poetry run python kakarot_scripts/check_resources.py
build-sol:
git submodule update --init --recursive
forge build --names --force
install-katana:
cargo install --git https://github.com/dojoengine/dojo --locked --tag "${KATANA_VERSION}" katana
run-katana:
katana --chain-id test --validate-max-steps 4000000 --invoke-max-steps 6000000 --eth-gas-price 0 --strk-gas-price 0 --disable-fee