forked from SimonLangowski/trellis
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
66 lines (51 loc) · 1.49 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
.PHONY: build
build: init
cd go/0kn/cmd/xtrellis && go build
.PHONY: install
install: init
cd go/0kn/cmd/xtrellis && go install
.PHONY: uninstall
uninstall:
rm -f $(shell go env GOBIN)/xtrellis
.PHONY: install-deps-osx
install-deps-osx:
brew install protobuf gmp cmake openssl
.PHONY: install-deps-ubuntu
install-deps-ubuntu:
sudo apt install -y protobuf-compiler libgmp-dev cmake libssl-dev netcat
.PHONY: install-deps-mcl
install-deps-mcl:
./go/trellis/crypto/pairing/mcl/scripts/install-deps.sh
.PHONY: init
init:
./scripts/go-workspace-init.sh
.PHONY: protobuf
protobuf:
cd api && buf generate
.PHONY: test-go-0kn
test-go-0kn:
go test ./go/0kn/...
.PHONY: test-go-trellis
test-go-trellis:
go test -skip 'TestMarshalZero|TestKeyExchange' ./go/trellis/...
.PHONY: test
test: test-go-0kn test-go-trellis
.PHONY: clean
clean:
git clean -X -f
.PHONY: very-clean
very-clean: clean uninstall
.PHONY: docker-images
docker-images:
docker compose --project-directory docker/base/ --profile build build
docker compose --project-directory docker/remote-network-simulation/ --profile build build
.PHONY: docker-clean
docker-clean:
docker compose --project-directory docker/base --profile test-gateway down
docker compose --project-directory docker/remote-network-simulation --profile run down
# source env vars
include docker/base/.env
.PHONY: docker-very-clean
docker-very-clean: docker-clean
docker rmi -f ${IMG_REPO}/${IMG_NAME}:${IMG_TAG}
docker rmi -f ${IMG_REPO}/${IMG_NAME}-remote:${IMG_TAG}