diff --git a/Makefile b/Makefile index 567eb7f5d..5b93dbdb9 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,14 @@ build-evm-prod: clean-evm gen-evm-bindings: build-evm-prod cd sdk && npm ci && cd evm && npm run generate +.PHONY: build-solana +build-solana: + cd solana; BPF_OUT_DIR="$(pwd)/target/deploy" cargo build-sbf + +.PHONY: build-anchor +build-anchor: + cd solana; make _anchor-build + ####################### ## TESTS @@ -30,11 +38,32 @@ check-format: fix-format: cd evm && forge fmt -.PHONY: test +.PHONY: test-evm test-evm: cd evm && forge test -vvv + # Verify that the contracts do not include PUSH0 opcodes test-push0: cd evm && forge build --extra-output evm.bytecode.opcodes @if grep -qr --include \*.json PUSH0 ./evm/out; then echo "Contract uses PUSH0 instruction" 1>&2; exit 1; else echo "PUSH0 Verification Succeeded"; fi + +.PHONY: test-solana-unit +test-solana-unit: + cd solana; cargo build-sbf --features "mainnet" + cd solana; cargo test-sbf --features "mainnet" + cd solana; cargo test + +.PHONY: test-anchor +test-anchor: + cd solana; make anchor-test + +.PHONY: test-solana +test-solana: build-solana test-solana-unit build-anchor test-anchor + + +.PHONY: lint +lint-solana: + cargo fmt --check --all --manifest-path solana/Cargo.toml + cargo check --workspace --tests --manifest-path solana/Cargo.toml + cargo clippy --workspace --tests --manifest-path solana/Cargo.toml