From 9c85f9d110ba10737d258094085e70bb9f0ad54d Mon Sep 17 00:00:00 2001 From: Akosh Farkash Date: Mon, 6 Nov 2023 13:24:21 +0000 Subject: [PATCH] Check foundry is installed (#277) CHECK: Warn the user they need foundry installed --- Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5e46e7e7b..4bd41c664 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ OUTPUT ?= ./out deploy-ipc: ./ops/deploy.sh $(NETWORK) -compile-abi: +compile-abi: | forge ./ops/compile-abi.sh $(OUTPUT) rust-binding: @@ -34,7 +34,7 @@ lint: fmt: npx prettier --check -w 'src/**/*.sol' 'test/*.sol' -build: +build: | forge forge build test: @@ -70,12 +70,20 @@ clean: rm -rf ./cache_hardhat rm -rf ./typechain -coverage: +coverage: | forge forge coverage --ffi --report lcov -C ./src genhtml -o coverage_report lcov.info --branch-coverage ./tools/check_coverage.sh prepare: fmt lint test slither +# Forge is used by the ipc-solidity-actors compilation steps. +.PHONY: forge +forge: + @if [ -z "$(shell which forge)" ]; then \ + echo "Please install Foundry. See https://book.getfoundry.sh/getting-started/installation"; \ + exit 1; \ + fi + # ============================================================================== .PHONY: deploy-ipc lint fmt check-subnet slither check-gateway test prepare storage build clean