-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (24 loc) · 1.76 KB
/
Makefile
File metadata and controls
34 lines (24 loc) · 1.76 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
TAG ?= latest
.PHONY: all image-tier1 image-tier2 image-tier3 clean test-tier1 test-tier2 test-tier3
all: image-tier1 image-tier2 image-tier3
image-tier1:
cd tier1 && docker build -t dmoj/runtimes-tier1 -t dmoj/runtimes-tier1:$(TAG) -t ghcr.io/dmoj/runtimes-tier1:$(TAG) .
image-tier2: image-tier1
cd tier2 && docker build -t dmoj/runtimes-tier2 -t dmoj/runtimes-tier2:$(TAG) -t ghcr.io/dmoj/runtimes-tier2:$(TAG) .
image-tier3: image-tier2
cd tier3 && docker build -t dmoj/runtimes-tier3 -t dmoj/runtimes-tier3:$(TAG) -t ghcr.io/dmoj/runtimes-tier3:$(TAG) \
--build-arg KOTLIN_ZIP_URL="$(shell ./github-curl https://api.github.com/repos/JetBrains/kotlin/releases | jq -r '[.[] | select(.prerelease | not) | .assets | flatten | .[] | select((.name | startswith("kotlin-compiler")) and (.name | endswith(".zip"))) | .browser_download_url][0]')" \
--build-arg LEAN4_ZIP_URL="$(shell ./github-curl https://api.github.com/repos/leanprover/lean4/releases | jq -r '[.[] | select(.prerelease | not) | .assets | flatten | .[] | select((.name | startswith("lean-")) and (.name | endswith("-linux.zip"))) | .browser_download_url][0]')" \
.
clean:
-docker rmi dmoj/runtimes-tier3 dmoj/runtimes-tier3:$(TAG) ghcr.io/dmoj/runtimes-tier3:$(TAG)
-docker rmi dmoj/runtimes-tier2 dmoj/runtimes-tier2:$(TAG) ghcr.io/dmoj/runtimes-tier2:$(TAG)
-docker rmi dmoj/runtimes-tier1 dmoj/runtimes-tier1:$(TAG) ghcr.io/dmoj/runtimes-tier1:$(TAG)
docker builder prune -a -f
test: test-tier1 test-tier2 test-tier3
test-tier1:
docker run --rm -v "`pwd`/test":/code --cap-add=SYS_PTRACE dmoj/runtimes-tier1
test-tier2:
docker run --rm -v "`pwd`/test":/code --cap-add=SYS_PTRACE dmoj/runtimes-tier2
test-tier3:
docker run --rm -v "`pwd`/test-tier3":/code --cap-add=SYS_PTRACE dmoj/runtimes-tier3