-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
88 lines (64 loc) · 1.71 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.PHONY: default
default: build
.git/hooks/pre-commit: .githooks/pre-commit
cp .githooks/pre-commit .git/hooks/pre-commit
.PHONY: githooks
githooks: .git/hooks/pre-commit
.PHONY: deps
deps: .lib/libbls.a .lib/libbandersnatch_vrfs.a .lib/libec.a .lib/libmsquic.a
.lib/libbls.a: $(wildcard Utils/Sources/bls/src/*)
./scripts/build-rust-libs.sh
.lib/libbandersnatch_vrfs.a: $(wildcard Utils/Sources/bandersnatch/src/*)
./scripts/build-rust-libs.sh
.lib/libec.a: $(wildcard Utils/Sources/erasure-coding/src/*)
./scripts/build-rust-libs.sh
.lib/libmsquic.a:
./scripts/external-libs.sh
.PHONY: test
test: githooks deps
./scripts/runTests.sh test
.PHONY: test-cargo
test-cargo:
cargo test --manifest-path Utils/Sources/bandersnatch/Cargo.toml
.PHONY: test-all
test-all: test test-cargo
.PHONY: test-coverage
test-coverage:
./scripts/runTests.sh test --enable-code-coverage
.PHONY: build
build: githooks deps
./scripts/run.sh build
.PHONY: build-verbose
build-verbose: githooks
./scripts/run.sh build --verbose
.PHONY: resolve
resolve: githooks
./scripts/run.sh package resolve
.PHONY: clean
clean:
./scripts/run.sh package clean
.PHONY: clean-lib
clean-lib:
rm -f .lib/*.a
.PHONY: clean-all
clean-all: clean clean-lib
.PHONY: lint
lint: githooks
swiftlint lint --config .swiftlint.yml --strict
.PHONY: format
format: githooks
swiftformat .
.PHONY: format-cargo
format-cargo:
cargo fmt --manifest-path Utils/Sources/bandersnatch/Cargo.toml
.PHONY: format-all
format-all: format format-cargo
.PHONY: format-clang
format-clang:
find . \( -name "*.c" -o -name "helpers.h" \) -exec clang-format -i {} +
.PHONY: run
run: githooks
swift run --package-path Boka Boka --validator
.PHONY: devnet
devnet:
./scripts/devnet.sh