-
Notifications
You must be signed in to change notification settings - Fork 171
/
Makefile
54 lines (40 loc) · 1.11 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
ifneq ("$(wildcard ./config.mk)","")
include config.mk
else
include config.mk.template
endif
.PHONY: protobuf lint test unit-test integration-test test
ci:
bash ci/ci_test.sh
op:
bash cc/build.sh || echo "WARN: make custom tf op failed!"
protobuf:
python -m grpc_tools.protoc -I protocols -I$(TF_PATH) \
--python_out=. \
--grpc_python_out=. \
protocols/fedlearner/common/*.proto
python -m grpc_tools.protoc -I protocols -I$(TF_PATH) \
--python_out=. \
--grpc_python_out=. \
protocols/fedlearner/channel/*.proto
python -m grpc_tools.protoc -I. \
--python_out=. \
fedlearner/fedavg/cluster/cluster.proto
python -m grpc_tools.protoc -I. \
--python_out=. \
--grpc_python_out=. \
fedlearner/fedavg/training_service.proto
lint:
pylint --rcfile ci/pylintrc fedlearner example
UNIT_TEST_SCRIPTS := $(shell find test -type f -name "test_*.py")
UNIT_TESTS := $(UNIT_TEST_SCRIPTS:%.py=%.phony)
test/%.phony: test/%.py
python $^
unit-test: $(UNIT_TESTS)
integration-test:
bash integration_tests.sh
test: unit-test integration-test
docker-build:
docker build . -t ${IMG}
docker-push:
docker push ${IMG}