@@ -5,8 +5,6 @@ GIT_TAG ?= $(shell git describe --tags --abbrev=0)
55
66BUILD_PATH = "target"
77
8- FUNCTIONAL_TESTS_DIR = functional-tests
9- FUNCTIONAL_TESTS_DATADIR = _dd
108DOCKER_DIR = docker
119DOCKER_DATADIR = .data
1210PROVER_PERF_EVAL_DIR = provers/perf
@@ -34,7 +32,7 @@ help: ## Display this help.
3432
3533.PHONY : build
3634build : # # Build the workspace into the `target` directory.
37- cargo build --workspace --bin " strata-client " --features " $( FEATURES) " --profile " $( PROFILE) "
35+ cargo build --workspace --bin " zkvm-runner " --features " $( FEATURES) " --profile " $( PROFILE) "
3836
3937# #@ Test
4038
@@ -55,10 +53,6 @@ cov-unit: ## Run unit tests with coverage.
5553cov-report-html : # # Generate an HTML coverage report and open it in the browser.
5654 cargo llvm-cov --open --workspace --locked nextest
5755
58- .PHONY : test-int
59- test-int : # # Run integration tests
60- cargo nextest run -p " integration-tests" --status-level=fail --no-capture
61-
6256.PHONY : mutants-test
6357mutants-test : # # Runs `nextest` under `cargo-mutants`. Caution: This can take *really* long to run.
6458 cargo mutants --workspace -j2
@@ -78,23 +72,6 @@ prover-clean: ## Cleans up proofs and profiling data generated
7872 rm -rf $(PROVER_PERF_EVAL_DIR ) /* .trace
7973 rm -rf $(PROVER_PROOFS_CACHE_DIR ) /* .proof
8074
81-
82- # #@ Functional Tests
83- .PHONY : ensure-poetry
84- ensure-poetry :
85- @if ! command -v poetry & > /dev/null; then \
86- echo " poetry not found. Please install it by the following the instructions from: https://python-poetry.org/docs/#installation" \
87- exit 1; \
88- fi
89-
90- .PHONY : activate
91- activate : ensure-poetry # # Activate poetry environment for integration tests.
92- cd $(FUNCTIONAL_TESTS_DIR ) && poetry install --no-root
93-
94- .PHONY : clean-dd
95- clean-dd : # # Remove the data directory used by functional tests.
96- rm -rf $(FUNCTIONAL_TESTS_DIR ) /$(FUNCTIONAL_TESTS_DATADIR ) 2> /dev/null
97-
9875.PHONY : clean-cargo
9976clean-cargo : # # cargo clean
10077 cargo clean 2> /dev/null
@@ -103,12 +80,8 @@ clean-cargo: ## cargo clean
10380clean-docker-data : # # Remove docker data files inside /docker/.data
10481 rm -rf $(DOCKER_DIR ) /$(DOCKER_DATADIR ) 2> /dev/null
10582
106- .PHONY : clean-poetry
107- clean-poetry : # # Remove poetry virtual environment
108- cd $(FUNCTIONAL_TESTS_DIR ) && rm -rf .venv 2> /dev/null
109-
11083.PHONY : clean
111- clean : clean-dd clean- docker-data clean-cargo clean-poetry # # clean functional tests directory, cargo clean, clean docker data, clean poetry virtual environment
84+ clean : clean-docker-data clean-cargo # # cargo clean, clean docker data
11285 @echo " \n\033[36m======== CLEAN_COMPLETE ========\033[0m\n"
11386
11487.PHONY : docker-up
@@ -120,11 +93,6 @@ docker-down: ## docker compose down
12093 cd $(DOCKER_DIR ) && docker compose down && \
12194 rm -rf $(DOCKER_DATADIR ) 2> /dev/null
12295
123-
124- .PHONY : test-functional
125- test-functional : ensure-poetry activate clean-dd # # Runs functional tests.
126- cd $(FUNCTIONAL_TESTS_DIR ) && ./run_test.sh
127-
12896# #@ Code Quality
12997
13098.PHONY : fmt-check-ws
@@ -150,40 +118,25 @@ fmt-check-toml: ensure-taplo ## Runs `taplo` to check that TOML files are proper
150118fmt-toml : ensure-taplo # # Runs `taplo` to format TOML files
151119 taplo fmt
152120
153- .PHONY : fmt-check-func-tests
154- fmt-check-func-tests : ensure-poetry activate # # Check formatting of python files inside `test` directory.
155- cd $(FUNCTIONAL_TESTS_DIR ) && poetry run ruff format --check
156-
157- .PHONY : fmt-func-tests
158- fmt-func-tests : ensure-poetry activate # # Apply formatting of python files inside `test` directory.
159- cd $(FUNCTIONAL_TESTS_DIR ) && poetry run ruff format
121+ define lint-pkg
122+ find $(1 ) -type f -name "Cargo.toml" -exec sh -c \
123+ 'f="$$1"; echo "Clippy for $${f}" && \
124+ cargo clippy --manifest-path $${f} --all-features -- -D warnings' shell {} \;
125+ endef
160126
161127.PHONY : lint-check-ws
162128lint-check-ws : # # Checks for lint issues in the workspace.
163- cargo clippy \
164- --workspace \
165- --bin " strata-client" \
166- --lib \
167- --examples \
168- --tests \
169- --benches \
170- --all-features \
171- --no-deps \
172- -- -D warnings
129+ $(call lint-pkg,examples) && $(call lint-pkg,crates)
130+
131+ define lint-pkg-fix
132+ find $(1 ) -type f -name "Cargo.toml" -exec sh -c \
133+ 'f="$$1"; echo "Clippy for $${f}" && \
134+ cargo clippy --manifest-path $${f} --all-features --fix -- -D warnings' shell {} \;
135+ endef
173136
174137.PHONY : lint-fix-ws
175138lint-fix-ws : # # Lints the workspace and applies fixes where possible.
176- cargo clippy \
177- --workspace \
178- --bin " strata-client" \
179- --lib \
180- --examples \
181- --tests \
182- --benches \
183- --all-features \
184- --fix \
185- --no-deps \
186- -- -D warnings
139+ $(call lint-pkg-fix,examples) && $(call lint-pkg-fix,crates)
187140
188141ensure-codespell :
189142 @if ! command -v codespell & > /dev/null; then \
@@ -203,16 +156,8 @@ lint-fix-codespell: ensure-codespell ## Runs `codespell` to fix spelling errors
203156lint-check-toml : ensure-taplo # # Lints TOML files
204157 taplo lint
205158
206- .PHONY : lint-check-func-tests
207- lint-check-func-tests : ensure-poetry activate # # Lints the functional tests
208- cd $(FUNCTIONAL_TESTS_DIR ) && poetry run ruff check
209-
210- .PHONY : lint-fix-func-tests
211- lint-fix-func-tests : ensure-poetry activate # # Lints the functional tests and applies fixes where possible
212- cd $(FUNCTIONAL_TESTS_DIR ) && poetry run ruff check --fix
213-
214159.PHONY : lint
215- lint : fmt-check-ws fmt-check-func-tests fmt-check- toml lint-check-ws lint-check-func-tests lint-check-codespell # # Runs all lints and checks for issues without trying to fix them.
160+ lint : fmt-check-ws fmt-check-toml lint-check-ws lint-check-codespell # # Runs all lints and checks for issues without trying to fix them.
216161 @echo " \n\033[36m======== OK: Lints and Formatting ========\033[0m\n"
217162
218163.PHONY : lint-fix
@@ -240,7 +185,7 @@ test: ## Runs all tests in the workspace including unit and docs tests.
240185 make test-doc
241186
242187.PHONY : pr
243- pr : lint rustdocs test-doc test-unit test-int test-functional # # Runs lints (without fixing), audit, docs, and tests (run this before creating a PR).
188+ pr : lint rustdocs test-doc test-unit # # Runs lints (without fixing), audit, docs, and tests (run this before creating a PR).
244189 @echo " \n\033[36m======== CHECKS_COMPLETE ========\033[0m\n"
245190 @test -z " $$ (git status --porcelain)" || echo " WARNNG: You have uncommitted changes"
246191 @echo " All good to create a PR!"
0 commit comments