Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(makefile): avoid relinking on makefile #1412

Merged
merged 4 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ jobs:
run: make install-katana
- name: Run tests
run: |
make fetch-ssj-artifacts
cp .env.example .env
make run-nodes & make test-end-to-end

Expand Down
36 changes: 18 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ifneq ("$(wildcard .env)","")
export $(shell sed 's/=.*//' .env)
endif

.PHONY: build test coverage
.PHONY: build test coverage clean

# 154615699 corresponds to release v0.1.7 of Kakarot SSJ.
KKRT_SSJ_RELEASE_ID = 154615699
Expand All @@ -13,28 +13,28 @@ KKRT_SSJ_BUILD_ARTIFACT_URL = $(shell curl -L https://api.github.com/repos/kkrt-
KATANA_VERSION = v1.0.0-alpha.11
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

BUILD_DIR = build
SSJ_DIR = $(BUILD_DIR)/ssj
SSJ_ZIP = dev-artifacts.zip

build: check
$(MAKE) clean
build: $(SSJ_DIR) check
poetry run python ./kakarot_scripts/compile_kakarot.py

check:
poetry check --lock

$(SSJ_DIR): $(SSJ_ZIP)
rm -rf $(SSJ_DIR)
mkdir -p $(SSJ_DIR)
unzip -o $(SSJ_ZIP) -d $(SSJ_DIR)
rm -f $(SSJ_ZIP)

$(SSJ_ZIP):
curl -sL -o $(SSJ_ZIP) "$(KKRT_SSJ_BUILD_ARTIFACT_URL)"

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

Expand All @@ -45,7 +45,6 @@ test: deploy
test-unit: build-sol
poetry run pytest tests/src -m "not NoCI" -n logical --seed 42

# run make run-nodes in other terminal
test-end-to-end: deploy
poetry run pytest tests/end_to_end --seed 42

Expand All @@ -59,9 +58,10 @@ format-check:
trunk check --ci

clean:
rm -rf build/*.json
rm -rf build/fixtures/*.json
mkdir -p build
rm -rf $(BUILD_DIR)/*.json
rm -rf $(BUILD_DIR)/fixtures/*.json
rm -rf $(SSJ_DIR)
mkdir -p $(BUILD_DIR)

check-resources:
poetry run python kakarot_scripts/check_resources.py
Expand Down
Loading