-
Notifications
You must be signed in to change notification settings - Fork 359
/
Makefile
127 lines (99 loc) · 2.91 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
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
export VERSION := $(shell ./version.sh)
.PHONY: all
all:
$(MAKE) get-deps
$(MAKE) build
.PHONY: get-deps
get-deps: get-deps-pip get-deps-go get-deps-webui
.PHONY: get-deps-%
get-deps-%:
$(MAKE) -C $(subst -,/,$*) get-deps
.PHONY: get-deps-pip
get-deps-pip:
pip install -r requirements.txt
.PHONY: get-deps-go
get-deps-go:
$(MAKE) go-version-check
$(MAKE) get-deps-master
$(MAKE) get-deps-agent
$(MAKE) get-deps-proto
# Go versions may look like goM, goM.N, or goM.N.P. Only 1.22.* is supported.
supported_go_minor_version = go1.22
system_go_version := $(shell go version | sed 's/.*\(go[[:digit:]][[:digit:].]*\).*/\1/')
.PHONY: go-version-check
go-version-check:
@: $(if $(findstring $(supported_go_minor_version), $(system_go_version)), \
, \
$(error go version $(system_go_version) not supported. Must use $(supported_go_minor_version).x))
.PHONY: package
package:
$(MAKE) -C agent $@
$(MAKE) -C master $@
.PHONY: package-dryrun
package-dryrun:
$(MAKE) -C agent $@
$(MAKE) -C master $@
.PHONY: package-ee
package-ee:
$(MAKE) -C agent $@
$(MAKE) -C master $@
set-config-dev: .git/hooks/pre-commit
.git/hooks/pre-commit:
pre-commit install
.PHONY: build-%
build-%:
$(MAKE) -C $(subst -,/,$*) build
.PHONY: build-docs
build-docs: build-harness build-examples build-helm build-proto build-bindings
$(MAKE) -C docs build
.PHONY: build-bindings
build-bindings: build-proto
$(MAKE) -C bindings build
.PHONY: build-webui
build-webui: build-bindings
$(MAKE) -C webui build
.PHONY: build-agent
build-agent: build-proto
$(MAKE) -C agent build
.PHONY: build-master
build-master: build-proto
$(MAKE) -C master build
.PHONY: build
build: build-master build-agent build-webui build-docs
.PHONY: clean-%
clean-%:
$(MAKE) -C $(subst -,/,$*) clean
.PHONY: clean
clean: clean-tools clean-proto clean-harness clean-examples clean-docs clean-webui clean-master clean-agent clean-bindings
.PHONY: check-%
check-%:
$(MAKE) -C $(subst -,/,$*) check
.PHONY: check
check: check-proto check-harness check-e2e_tests check-tools check-master check-webui check-examples check-docs check-schemas
$(MAKE) check-agent
.PHONY: fmt-%
fmt-%:
$(MAKE) -C $(subst -,/,$*) fmt
.PHONY: fmt
fmt: fmt-harness fmt-e2e_tests fmt-tools fmt-master fmt-agent fmt-webui fmt-examples fmt-docs fmt-schemas fmt-proto
.PHONY: test-%
test-%:
$(MAKE) -C $(subst -,/,$*) test
.PHONY: test
test: test-harness test-master test-agent test-webui
# local frontend dev server against current DET_MASTER
.PHONY: localfrontend
local: build-bindings get-deps-webui
HOST="localhost" DET_WEBPACK_PROXY_URL=${DET_MASTER} $(MAKE) -C webui live
.PHONY: devcluster
devcluster:
devcluster -c tools/devcluster.yaml
TF_LOCK ?= true
.PHONY: slurmcluster
slurmcluster:
$(MAKE) -C tools/slurm slurmcluster FLAGS="$(FLAGS)" TF_LOCK=$(TF_LOCK)
slurmcluster/usage:
$(MAKE) -C tools/slurm usage
.PHONY: unslurmcluster
unslurmcluster:
$(MAKE) -C tools/slurm unslurmcluster TF_LOCK=$(TF_LOCK)