-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
61 lines (43 loc) · 1.88 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
help: ##@Miscellaneous Show this help
@echo "Usage: make [target] ...\n"
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
install: ##@Miscellaneous Install dependencies
@npm i near-cli
@cargo build
measure: ##@Miscellaneous Measure gas cost.
./scripts/measure.sh
check: ##@Miscellaneous Run all checks.
make fmt && make lint && make build && make test && make int && make mutation
mutation: ##@Miscellaneous Run mutation test.
./scripts/mutation.sh
build: ##@Build Build the contract locally.
./scripts/build.sh
build-integration: ##@Build Build the contract for integration tests.
./scripts/build-integration.sh
build-in-docker: ##@Build Build reproducible artifact in Docker.
./scripts/build-in-docker.sh
dock: build-in-docker ##@Build Shorthand for `build-in-docker`
deploy: ##@Deploy Deploy the contract to dev account on Testnet.
./scripts/deploy.sh
testnet-deploy: ##@Test Deploy the contract to dev account on Testnet.
make build
near deploy v8.jar.sweatty.testnet ./res/sweat_jar.wasm --force
cov: ##@Testing Run unit tests with coverage.
cargo llvm-cov --hide-instantiations --open --ignore-filename-regex tests.rs
test: ##@Testing Run unit tests.
cargo test --package sweat-jar-model --features=release-api --release && \
cargo test --package sweat_jar --release
integration: ##@Testing Run integration tests.
cargo test --package integration-tests
int: integration ##@Testing Shorthand for `integration`
fmt: ##@Chores Format the code using rustfmt nightly.
cargo +nightly fmt --all
lint: ##@Chores Run lint checks with Clippy.
./scripts/lint.sh
hash: ##@Chores Check if contract in commit has valid hash.
./scripts/check-contract-hash.sh
HELP_FUN = \
%help; while(<>){push@{$$help{$$2//'options'}},[$$1,$$3] \
if/^([\w-_]+)\s*:.*\#\#(?:@(\w+))?\s(.*)$$/}; \
print"$$_:\n", map" $$_->[0]".(" "x(20-length($$_->[0])))."$$_->[1]\n",\
@{$$help{$$_}},"\n" for keys %help; \