-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
136 lines (130 loc) · 4.48 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
128
129
130
131
132
133
134
135
136
.PHONY: check lint format
format:
@for script in $(SCRIPTS) ; do \
dos2unix $$script; \
done
@for file in $(FILES) ; do \
dos2unix $$file; \
done
@for fn in $(FUNCTIONS) ; do \
dos2unix $$fn; \
done
lint:
@for image in $(IMAGES) ; do \
hadolint ./Dockerfile.$$image ; \
done
@hadolint ./Dockerfile
@yamllint .
@checkov
check:
@for script in $(SCRIPTS) ; do \
shfmt --write --list $$script; \
shellcheck $$script --enable all; \
done
@for fn in $(FUNCTIONS) ; do \
shfmt --write --list --indent 4 --case-indent --space-redirects $$fn; \
shellcheck $$fn --enable all; \
done
.PHONY: build-image
build-image: format
@docker build --no-cache -t ${REGISTRY}/${GITHUB_ACTOR}/${TASK}:$(VERSION) -f ./Dockerfile.${TASK} .
@docker build --no-cache -t ${REGISTRY}/${GITHUB_ACTOR}/${TASK} -f ./Dockerfile.${TASK} .
.PHONY: gold gold-push
gold: format
@docker build --no-cache -t ${REGISTRY}/${GITHUB_ACTOR}/gold -f ./Dockerfile .
gold-push:
@docker push "${REGISTRY}/${GITHUB_ACTOR}/gold"
.PHONY: dev dev-push
dev:
@$(MAKE) TASK=$@ --no-print-directory build-image
dev-push:
@docker push "${REGISTRY}/${GITHUB_ACTOR}/dev:${VERSION}"
@docker push "${REGISTRY}/${GITHUB_ACTOR}/dev"
.PHONY: notebook notebook-push
notebook:
@$(MAKE) TASK=$@ --no-print-directory build-image
notebook-push:
@docker push "${REGISTRY}/${GITHUB_ACTOR}/notebook:${VERSION}"
@docker push "${REGISTRY}/${GITHUB_ACTOR}/notebook"
.PHONY: rust rust-push
rust:
@$(MAKE) TASK=$@ --no-print-directory build-image
rust-push:
@docker push "${REGISTRY}/${GITHUB_ACTOR}/rust:${VERSION}"
@docker push "${REGISTRY}/${GITHUB_ACTOR}/rust"
.PHONY: web web-push
web:
@$(MAKE) TASK=$@ --no-print-directory build-image
web-push:
@docker push "${REGISTRY}/${GITHUB_ACTOR}/web:${VERSION}"
@docker push "${REGISTRY}/${GITHUB_ACTOR}/web"
#
# Build variables
#
VERSION = `cat VERSION`
REGISTRY = ghcr.io
GITHUB_ACTOR = jhwohlgemuth
IMAGES = \
dev \
notebook \
rust \
web
SCRIPTS = \
./provision/scripts/dev/configure_locale.sh \
./provision/scripts/dev/configure_ohmyzsh.sh \
./provision/scripts/dev/install_apptainer.sh \
./provision/scripts/dev/install_cosmopolitan.sh \
./provision/scripts/dev/install_cuda.sh \
./provision/scripts/dev/install_dependencies.sh \
./provision/scripts/dev/install_docker.sh \
./provision/scripts/dev/install_dotnet.sh \
./provision/scripts/dev/install_homebrew.sh \
./provision/scripts/dev/install_musl.sh \
./provision/scripts/dev/install_nix.sh \
./provision/scripts/dev/install_ohmyzsh.sh \
./provision/scripts/dev/install_pinokio.sh \
./provision/scripts/dev/install_xr0.sh \
./provision/scripts/dev/start_docker.sh \
./provision/scripts/dev/start_pinokio.sh \
./provision/scripts/gold/install_aeneas.sh \
./provision/scripts/gold/install_coq.sh \
./provision/scripts/gold/install_creusot.sh \
./provision/scripts/gold/install_dependencies.sh \
./provision/scripts/gold/install_frama-c.sh \
./provision/scripts/gold/install_klee.sh \
./provision/scripts/gold/install_ocaml.sh \
./provision/scripts/gold/install_provers.sh \
./provision/scripts/gold/install_verus.sh \
./provision/scripts/notebook/download_notebooks.sh \
./provision/scripts/notebook/install_code_server.sh \
./provision/scripts/notebook/install_conda.sh \
./provision/scripts/notebook/install_dependencies.sh \
./provision/scripts/notebook/install_dotnet_jupyter_kernel.sh \
./provision/scripts/notebook/install_elixir_jupyter_kernel.sh \
./provision/scripts/notebook/install_elixir.sh \
./provision/scripts/notebook/install_extensions.sh \
./provision/scripts/notebook/install_go_jupyter_kernel.sh \
./provision/scripts/notebook/install_latex.sh \
./provision/scripts/notebook/install_lpython.sh \
./provision/scripts/notebook/install_nim.sh \
./provision/scripts/notebook/install_scala_jupyter_kernel.sh \
./provision/scripts/rust/install_dependencies.sh \
./provision/scripts/rust/install_wasm_tools.sh \
./.github/actions/build-and-push-image/entrypoint.sh
FUNCTIONS = \
./provision/functions/cleanup \
./provision/functions/is_command \
./provision/functions/is_installed \
./provision/functions/move_lines \
./provision/functions/remove_empty_lines \
./provision/functions/requires
FILES = \
./config/code-server/service/finish \
./config/code-server/service/run \
./config/jupyter/service/finish \
./config/jupyter/service/run \
./config/verdaccio/service/finish \
./config/verdaccio/service/log \
./config/verdaccio/service/run \
./config/.utoprc \
./config/init.ml