Skip to content

Commit

Permalink
add OCaml 5.0.0 compativility
Browse files Browse the repository at this point in the history
  • Loading branch information
kxc-wraikny committed Feb 21, 2023
1 parent cb76f39 commit 0f9989d
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ocaml-general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
matrix:
ocaml-version:
- 4.13.1
- 5.0.0
arch:
- amd64
# - arm64 # it's taking too long for the purpose of validation
Expand Down Expand Up @@ -81,8 +82,7 @@ jobs:
- 4.12.1
- 4.13.1
- 4.14.1
# OCaml 5.x is not supported yet
# - 5.0.0
- 5.0.0
arch:
- amd64
- arm64
Expand Down
24 changes: 3 additions & 21 deletions ocaml-general/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,11 @@ RUN apt-get update && apt-get install -y \
opam

ARG OCAML_VERSION=4.13.1
ARG OCAML_VERSION_MAJOR=$(eval cut -d'.' -f1 <<< $OCAML_VERSION)
RUN opam init --auto-setup --yes --bare --disable-sandboxing
RUN opam switch create $OCAML_VERSION
RUN opam install --yes \
dune.3.4.0 \
merlin \
odoc.2.2.0 \
ppxlib.0.26.0 \
ppx_deriving.5.2.1 \
js_of_ocaml.4.1.0 js_of_ocaml-ppx.4.1.0 js_of_ocaml-ppx.4.1.0 \
sexplib.v0.15.0 ppx_sexp_conv.v0.15.1 \
yojson.1.7.0 ppx_yojson_conv.v0.15.0 \
jsonm.1.0.1 \
ppx_optcomp.v0.15.0 \
brr.0.0.4 \
prr.0.1.1 \
zed.3.2.0 \
tezt.3.0.0 \
ocamlformat.0.24.1 \
ppx_inline_test.v0.15.0 \
alcotest.1.6.0 \
qcheck.0.19.1 \
qcheck-alcotest.0.19.1 \
&& opam clean -y --logs --repo-cache --download-cache --switch-cleanup
COPY install_ocaml_${OCAML_VERSION_MAJOR}_packages.sh /tmp/install_packages.sh
RUN /tmp/install_packages.sh && rm /tmp/install_packages.sh

ENV DEBIAN_FRONTEND=$DEBIAN_FRONTEND_OLD
ENV OPAMROOT=/root/.opam
Expand Down
23 changes: 23 additions & 0 deletions ocaml-general/install_ocaml_4_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

opam install --yes \
dune.3.4.0 \
merlin \
odoc.2.2.0 \
ppxlib.0.26.0 \
ppx_deriving.5.2.1 \
js_of_ocaml.4.1.0 js_of_ocaml-ppx.4.1.0 js_of_ocaml-ppx.4.1.0 \
sexplib.v0.15.0 ppx_sexp_conv.v0.15.1 \
yojson.1.7.0 ppx_yojson_conv.v0.15.0 \
jsonm.1.0.1 \
ppx_optcomp.v0.15.0 \
brr.0.0.4 \
prr.0.1.1 \
zed.3.2.0 \
tezt.3.0.0 \
ocamlformat.0.24.1 \
ppx_inline_test.v0.15.0 \
alcotest.1.6.0 \
qcheck.0.19.1 \
qcheck-alcotest.0.19.1 \
&& opam clean -y --logs --repo-cache --download-cache --switch-cleanup
22 changes: 22 additions & 0 deletions ocaml-general/install_ocaml_5_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

opam install --yes \
dune.3.4.0 \
merlin \
odoc.2.2.0 \
ppxlib.0.28.0 \
ppx_deriving.5.2.1 \
js_of_ocaml.4.1.0 js_of_ocaml-ppx.4.1.0 js_of_ocaml-lwt.4.1.0 \
sexplib.v0.15.1 ppx_sexp_conv.v0.15.1 \
yojson.2.0.2 ppx_yojson_conv.v0.15.1 \
jsonm.1.0.1 \
ezjsonm.1.3.0 \
ppx_optcomp.v0.15.0 \
brr.0.0.4 \
prr.0.1.1 \
zed.3.2.0 \
tezt.3.0.0 \
ppx_inline_test.v0.15.0 \
alcotest.1.6.0 \
qcheck.0.20 \
qcheck-alcotest.0.20

0 comments on commit 0f9989d

Please sign in to comment.