-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
96 lines (73 loc) · 1.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
.PHONY: usage
usage:
-echo 'Usage: make (docker|deploy-dashboard)'
.PHONY: test
test:
cargo vendor
cargo build
cargo test
.PHONY: build
build:
cargo build
.PHONY: format
format:
cargo fmt
.PHONY: submission
submission:
@rm -rf build/submission
bash script/build-submission.sh
.PHONY: submission-test
submission-test: submission
cd build/submission && bash build.sh && bash run.sh http://imoz.jp test
.PHONY: performance
performance:
bash test/performance_test.sh
.PHONY: ai-check
ai-check:
bash test/ai_name_test.sh
.PHONY: deploy-dashboard
deploy-dashboard:
cd go/cmd/dashboard && unagi --bare make deploy
.PHONY: bootstrap
bootstrap:
cd docker && make bootstrap
.PHONY: unagi
unagi:
cd docker && make docker
.PHONY: docker
docker:
docker build -t imos/icfpc2020:submission .
.PHONY: launcher
launcher: docker/launcher
.PHONY: upload
upload: push-docker
.PHONY: upload-launcher
upload-launcher: docker/upload-launcher
.PHONY: upload-installer
upload-installer: docker/upload-installer
.PHONY: push-docker
push-docker: docker/push-docker-latest
.PHONY: docker/%
docker/%: unagi
docker run -v $(shell pwd):/work -w /work \
-v /var/run/docker.sock:/var/run/docker.sock \
imos/icfpc2020 make "orig@$*"
################################################################################
# Targets run inside unagi image.
################################################################################
.PHONY: orig@launcher
orig@launcher:
cd go/cmd/launcher && make -j 6
cp script/launcher.sh build/launcher
chmod +x build/launcher
.PHONY: orig@upload-launcher
orig@upload-launcher:
cd go/cmd/launcher && make -j 6 upload
.PHONY: orig@upload-installer
orig@upload-installer:
gsutil cp script/install-launcher.sh gs://icfpc-public-data/install.sh
.PHONY: orig@orig-upload
orig@upload: orig@upload-launcher orig@upload-installer
.PHONY: orig@push-docker-%
orig@push-docker-%:
bash script/push-docker-image.sh "$*"