Skip to content

Commit

Permalink
Remove old cairo1 build
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Aug 28, 2024
1 parent 5d3728d commit 6dcf858
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 40 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install asdf & tools #
uses: asdf-vm/actions/install@v3
- name: Load cached katana
id: cached-katana
uses: actions/cache@v4
Expand Down
40 changes: 2 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ fetch-ssj-artifacts:
setup: fetch-ssj-artifacts
poetry install

test: build-sol build-cairo1 deploy
test: build-sol deploy
poetry run pytest tests/src -m "not NoCI" --log-cli-level=INFO -n logical --seed 42
poetry run pytest tests/end_to_end --seed 42

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: build-sol build-cairo1 deploy
test-end-to-end: build-sol deploy
poetry run pytest tests/end_to_end --seed 42

deploy: build build-sol
Expand All @@ -70,42 +70,6 @@ build-sol:
git submodule update --init --recursive
forge build --names --force

# Builds Cairo 1.0 contracts by iterating over subdirectories,
# compiling contracts, and copying the resulting .sierra.json (old versions) or .contract_class.json
# files to the ROOT_DIR/build/fixtures directory with appropriate file extensions.
build-cairo1:
@mkdir -p build/ssj
@for d in cairo1_contracts/*/ ; do \
if [ "$$d" != "cairo1_contracts/build/" ]; then \
echo "Building $$d"; \
cd $$d; \
scarb build; \
for f in target/dev/*.sierra.json target/dev/*.contract_class.json target/dev/*.casm.json target/dev/*.compiled_contract_class.json; do \
if [ -e "$$f" ]; then \
case "$$f" in \
*.sierra.json) \
CONTRACT_NAME="$$(basename $$f | sed -E 's/^.*_([^_.]*)\.sierra\.json$$/\1/')"; \
cp "$$f" "$(ROOT_DIR)/build/ssj/contracts_$$CONTRACT_NAME.contract_class.json"; \
;; \
*.contract_class.json) \
CONTRACT_NAME="$$(basename $$f | sed -E 's/^.*_([^_.]*)\.contract_class\.json$$/\1/')"; \
cp "$$f" "$(ROOT_DIR)/build/ssj/contracts_$$CONTRACT_NAME.contract_class.json"; \
;; \
*.casm.json) \
CONTRACT_NAME="$$(basename $$f | sed -E 's/^.*_([^_.]*)\.casm\.json$$/\1/')"; \
cp "$$f" "$(ROOT_DIR)/build/ssj/contracts_$$CONTRACT_NAME.compiled_contract_class.json"; \
;; \
*.compiled_contract_class.json) \
CONTRACT_NAME="$$(basename $$f | sed -E 's/^.*_([^_.]*)\.compiled_contract_class\.json$$/\1/')"; \
cp "$$f" "$(ROOT_DIR)/build/ssj/contracts_$$CONTRACT_NAME.compiled_contract_class.json"; \
;; \
esac; \
fi; \
done; \
cd -; \
fi; \
done

install-katana:
cargo install --git https://github.com/dojoengine/dojo --locked --tag "${KATANA_VERSION}" katana

Expand Down

0 comments on commit 6dcf858

Please sign in to comment.