-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 962 Bytes
/
Makefile
File metadata and controls
43 lines (32 loc) · 962 Bytes
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
.PHONY: all build clean run test fmt setup loadtest lint build-docker smoketest
all: setup
cargo build --release
setup:
./script/setup-protoc.sh
build:
ifndef version
$(error version is required. Usage: make build version=v0.1.0 [platform=linux/amd64])
endif
./script/build.sh $(version) $(platform)
build-docker: build
ifndef version
$(error version is required. Usage: make build-docker version=v0.1.0 [platform=linux/amd64])
endif
./docker/build.sh $(version) $(platform)
clean:
cargo clean
run: setup
cargo run
lint: setup
cargo clippy --all-targets --all-features -- -D warnings
test: lint
cargo test --workspace --exclude loadtests --no-fail-fast -- --nocapture
fmt:
cargo fmt
loadtest: setup
@echo "Building bgpggd and running load tests..."
cargo build --bin bgpggd --release
cargo test -p loadtests --release -- --nocapture --test-threads=1
smoketest: setup
cargo build --release --bin bgpggd --bin bgpgg
./smoketests/test.sh