Skip to content

Commit

Permalink
Upgrade to OCaml 5.2 (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Nov 28, 2023
1 parent 567bd8c commit e41546c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tests/**/results.json
tests/**/.merlin.json
tests/**/*-junit-results.xml
**/_build/
34 changes: 17 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
FROM ocaml/opam:alpine-3.18-ocaml-4.14-afl AS builder
FROM ocaml/opam:alpine-3.18-ocaml-5.2 AS builder

ENV PATH="/home/opam/.opam/5.2/bin:${PATH}"

RUN opam update \
&& opam install base core dune \
calendar react \
ounit ounit2 qcheck ezxmlm yojson \
ppx_deriving
ENV PATH="/home/opam/.opam/4.14/bin:${PATH}"
# We purposefully don't combine the opam update and opam install steps
# to allow the opam update layer to be re-used in the runner image below
RUN opam update
RUN opam install dune yojson ezxmlm

COPY . .
WORKDIR ./runner
USER root
WORKDIR /opt/test-runner
COPY runner/ .
RUN dune build
USER $CONTAINER_USER_ID

FROM ocaml/opam:alpine-3.18-ocaml-4.14-afl
WORKDIR /opt/test-runner
FROM ocaml/opam:alpine-3.18-ocaml-5.2 AS runner

ENV PATH="/home/opam/.opam/5.2/bin:${PATH}"

RUN opam update \
&& opam install dune ounit2 base qcheck react ppx_sexp_conv calendar ppx_deriving
RUN opam update
RUN opam install base ounit2 qcheck react calendar

WORKDIR /opt/test-runner

COPY --from=builder /opt/test-runner/_build/default/src/runner.exe bin/runner
COPY . .
COPY --from=builder /home/opam/runner/_build/default/src/runner.exe bin/runner
ENV PATH="/home/opam/.opam/4.14/bin:${PATH}"

USER root
ENTRYPOINT ["/opt/test-runner/bin/run.sh"]
2 changes: 1 addition & 1 deletion tests/example-empty-file/expected_results.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 2,
"status": "error",
"message": "File \"leap.ml\", line 1:\nError: The implementation leap.ml\n does not match the interface .test.eobjs/byte/leap.cmi: \n The value `leap_year' is required but not provided\n File \"leap.mli\", line 1, characters 0-26: Expected declaration\nmake: *** [Makefile:4: test] Error 1",
"message": "File \"leap.ml\", line 1:\nError: The implementation \"leap.ml\" does not match the interface \"leap.ml\": \n The value \"leap_year\" is required but not provided\n File \"leap.mli\", line 1, characters 0-26: Expected declaration\nmake: *** [Makefile:4: test] Error 1",
"tests": null
}

0 comments on commit e41546c

Please sign in to comment.