-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (50 loc) · 1.88 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
.PHONY: build up down check format check-leaders check-workers check-first check-optimizer format-first format-optimizer docker help gradle python black
### Docker commands
build: down
docker compose build --pull
up: build
docker compose up -d --build
down:
docker compose down -v
docker rm -vf $(docker ps -aq) 2> /dev/null || echo No containers to remove
### Host commands
gradle:
./gradlew check
python:
python3 -m mypy --strict app.py utils/ && python3 -m pylint app.py utils/ && python3 -m black --check app.py utils/
black:
python3 -m black app.py utils/
# Start of real targets
check: check-leaders check-workers check-first check-optimizer
format: format-first format-optimizer
check-leaders:
@cd leaders && $(MAKE) -f ../Makefile -s gradle
check-workers:
@cd workers && $(MAKE) -f ../Makefile -s gradle
check-first:
@cd microservices/first && $(MAKE) -f ../../Makefile -s python
check-optimizer:
@cd microservices/optimizer && $(MAKE) -f ../../Makefile -s python
format-first:
@cd microservices/first && $(MAKE) -f ../../Makefile -s black
format-optimizer:
@cd microservices/optimizer && $(MAKE) -f ../../Makefile -s black
define HELP_BODY
# DOCKER
build: build all Docker images for SPEED
up: runs SPEED with docker compose
down: stops and removes containers
# HOST
The below commands are all run on the host machine, not inside Docker. We recommend using the above commands for a more standard experience.
check: runs all check commands
format: runs all format commands
check-leaders: runs all style and lint checks for leaders project
check-workers: runs all style and lint checks for workers project
check-first: runs all style and lint checks for first project
check-optimizer: runs all style and lint checks for optimizer project
format-first: formats first project
format-optimizer: formats optimizer project
endef
export HELP_BODY
help:
@echo "$$HELP_BODY"