Commit 1c984f4 1 parent e3fa90d commit 1c984f4 Copy full SHA for 1c984f4
File tree 3 files changed +19
-13
lines changed
3 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 1
- FROM gcc:8.5.0
1
+ FROM ubuntu:24.04
2
2
3
- ENV OCAML_VERSION 4.01 .0
3
+ ENV OCAML_VERSION 4.05 .0
4
4
5
- RUN apt update && apt upgrade -y && apt install -y --force-yes make
5
+ RUN apt update && apt upgrade -y && apt install -y --force-yes opam
6
6
7
- RUN wget https://github.com/ocaml/ocaml/archive/refs/tags/${OCAML_VERSION}.zip
8
- RUN unzip ${OCAML_VERSION}.zip
9
- RUN cd ocaml-${OCAML_VERSION} && ./configure && make world.opt && make install
7
+ RUN opam init --disable-sandboxing
8
+ RUN opam update
10
9
11
- RUN mkdir /code
10
+ RUN opam install -y ocaml=${OCAML_VERSION}
11
+ RUN opam switch create ${OCAML_VERSION}
12
+
13
+ RUN mkdir code
12
14
WORKDIR /code
13
15
14
16
CMD /code/scripts/docker/run-ml.sh
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ SUPPORTED_LANGUAGES = \
46
46
$(JAVA ) \
47
47
$(JS ) \
48
48
$(LUA ) \
49
+ $(ML ) \
49
50
$(PHP ) \
50
51
$(PY ) \
51
52
$(R ) \
@@ -54,7 +55,6 @@ SUPPORTED_LANGUAGES = \
54
55
$(SCALA ) \
55
56
$(SQL ) \
56
57
$(TS )
57
- # $(ML)
58
58
# $(PAS)
59
59
60
60
ifdef LANGUAGES
Original file line number Diff line number Diff line change 9
9
for folder in ${FOLDERS} ; do
10
10
[[ -f " ${folder} WRONG" ]] && continue
11
11
12
- if [[ " $( find " ${folder} " -name ' *.ml' | wc -l) " -eq 1 ]]; then
12
+ rm -rf " ${folder} main.ml" 2> /dev/null
13
+
14
+ if [[ " $( find " ${folder} " -name ' *.ml' | wc -l) " -ge 1 ]]; then
13
15
echo " ${folder} "
14
16
cd " ${folder} " || exit 1
15
17
18
+ rm -rf " ${folder} main.ml" 2> /dev/null
19
+
16
20
cp ./* .ml main.ml
17
- ocamlc -o ml.out main.ml
21
+ ocamlc -o ml main.ml
18
22
19
23
if [[ -f in.txt ]]; then
20
- ./ml.out < in.txt > result-ml.txt
24
+ ./ml < in.txt > result-ml.txt
21
25
else
22
- ./ml.out > result-ml.txt
26
+ ./ml > result-ml.txt
23
27
fi
24
28
25
- rm -rf ml.out main.ml main.cmi main.cmo
29
+ rm -rf ml main.ml main.cmi main.cmo
26
30
27
31
diff result-ml.txt out.txt
28
32
You can’t perform that action at this time.
0 commit comments