-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
133 lines (98 loc) · 3.56 KB
/
Makefile
File metadata and controls
133 lines (98 loc) · 3.56 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
TEST_TARGET = //...
COVERAGE_REPORT = coverage_html
# release: build-deployment
# @docker run --rm -it -v ${HOME}/.ssh:/root/.ssh:ro -v $(CURDIR)/scripts:/opt/scripts das-deployment:latest /opt/scripts/deployment/release.sh
# deploy: build-deployment
# @docker run --rm -it -v ${HOME}/.ssh:/root/.ssh:ro -v $(CURDIR)/scripts:/opt/scripts das-deployment:latest /opt/scripts/deployment/fn_deploy.sh
release:
@bash $(CURDIR)/scripts/deployment/release.sh
deploy:
@bash $(CURDIR)/scripts/deployment/fn_deploy.sh
integration-tests:
@bash $(CURDIR)/scripts/deployment/tests.sh
build-deployment:
@docker build -f .docker/deployment/Dockerfile -t das-deployment:latest .
build-semver:
@docker image build -t trueagi/das:semantic-versioning ./scripts/semver
publish-semver:
@docker image push trueagi/das:semantic-versioning
github-runner:
@bash $(CURDIR)/scripts/github-runner/main.sh
build-image:
@bash -x src/scripts/docker_image_build.sh
build-mork-image:
@bash -x src/scripts/docker_image_build_mork.sh $(VERSION)
build-all: build-image
bash -x src/scripts/build.sh $(PACKAGE_TYPE)
run-attention-broker:
@bash -x src/scripts/run.sh attention_broker_service 0.0.0.0:40001
run-busnode:
@bash ./src/scripts/run.sh busnode $(filter-out $@, $(MAKECMDGOALS)) $(OPTIONS)
run-client:
@bash ./src/scripts/run.sh busclient $(filter-out $@, $(MAKECMDGOALS)) $(OPTIONS)
run-mork-server:
@bash -x src/scripts/mork_server.sh
mork-loader:
@bash -x src/scripts/mork_loader.sh $(FILE)
agents:
@bash -x src/scripts/run_agents.sh $(filter-out $@, $(MAKECMDGOALS))
setup-inference-toy-problem:
@bash ./src/scripts/setup_inference_toy_problem.sh $(filter-out $@, $(MAKECMDGOALS))
run-tests-db-loader:
@bash -x src/scripts/run.sh tests_db_loader $(OPTIONS)
setup-nunet-dms:
@bash -x src/scripts/setup-nunet-dms.sh
reset-nunet-dms:
@bash -x src/scripts/reset-nunet-dms.sh
bazel: build-image
@bash ./src/scripts/bazel.sh $(filter-out $@, $(MAKECMDGOALS))
clean:
@echo "Cleaning Bazel build outputs..."
@docker run --rm \
--user="$$(id -u):$$(id -g)" \
--volume /etc/passwd:/etc/passwd:ro \
--privileged \
--name="das-bazel-clean-$$(date +%s)" \
--network=host \
--volume "$(HOME)/.cache/das:$(HOME)/.cache" \
--volume "$(PWD):/opt/das" \
--volume "/tmp:/tmp" \
--workdir "/opt/das/src" \
das-builder \
bash -c 'find ~/.cache/ -name "*.o" -not -path "*/external/*" -delete'
@echo "Done."
test-all-no-cache: build-image run-tests-db-loader
@$(MAKE) bazel 'test --show_progress --cache_test_results=no //tests/...'
test-all: build-image run-tests-db-loader
@$(MAKE) bazel 'test --show_progress //tests/...'
test-agents-integration:
@bash ./src/scripts/integration_test_setup.sh &
@$(MAKE) bazel 'test --show_progress --cache_test_results=no //tests/integration/...' || true; \
touch ./bin/kill
lint-all:
@$(MAKE) bazel lint \
"//... --fix --report --diff" \
| grep -vE "(Lint results|All checks passed|^[[:blank:]]*$$)"
format-all:
@$(MAKE) bazel run format
format-check:
@$(MAKE) bazel run //:format.check
performance-tests:
@python3 src/tests/integration/performance/query_agent_metrics.py
test-coverage-check: build-image
@mkdir -p ./bin
@docker run --rm \
--user="$$(id -u):$$(id -g)" \
--volume /etc/passwd:/etc/passwd:ro \
--privileged \
--name="das-bazel-coverage-$$(date +%s)" \
--network=host \
--volume "$(HOME)/.cache/das:$(HOME)/.cache" \
--volume "$(PWD):/opt/das" \
--volume "/tmp:/tmp" \
--workdir "/opt/das/src" \
das-builder \
./scripts/bazel_coverage_check.sh
# Catch-all pattern to prevent make from complaining about unknown targets
%:
@: