forked from viamrobotics/rust-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
24 lines (23 loc) · 850 Bytes
/
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
BUF_BIN="`pwd`/bin"
PATH_WITH_TOOLS="${BUF_BIN}:${PATH}"
all: build build-example
build:
cargo build
build-example:
cd examples/ && cargo build
build-dialdbg:
# this target is used by homebrew; if altering, update homebrew formula.
cargo build --release --features dialdbg
buf-clean:
find src/gen -type f \( -iname "*.rs" ! -iname "mod.rs" \) -delete
buf-install:
./etc/install_buf.sh $(BUF_BIN)
buf: buf-install buf-clean
PATH=${PATH_WITH_TOOLS} buf generate buf.build/viamrobotics/goutils --template buf.gen.yaml
PATH=${PATH_WITH_TOOLS} buf generate buf.build/googleapis/googleapis --template buf.gen.yaml --path google/rpc --path google/api
tests/goutils:
git clone --depth=1 https://github.com/viamrobotics/goutils.git tests/goutils
test: buf tests/goutils build
./etc/test.sh
test-server: tests/goutils
./etc/run_echo_server.sh 8081