Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
FROM ocaml/opam:alpine-3.18-ocaml-5.1 AS builder
# Using the "no flat float array" based image which is OCaml compiled with
# --disable-flat-float-array. This gives a container smaller image overall
# but disables OCaml's optimization for float arrays. Does not prevent
# float arrays from being used.
FROM docker.io/ocaml/opam:debian-13-ocaml-5.4-no-flat-float-array AS builder

ENV PATH="/home/opam/.opam/5.1/bin:${PATH}"
ENV PATH="/home/opam/.opam/5.4/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 ounit2 yojson ezxmlm

WORKDIR /opt/test-runner

# Set owner to opam for the dune commands
RUN chown -R opam:opam /opt/test-runner

COPY runner/ .
RUN dune test && dune build

FROM ocaml/opam:alpine-3.18-ocaml-5.1 AS runner
FROM docker.io/ocaml/opam:debian-13-ocaml-5.4-no-flat-float-array AS runner

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

RUN opam update
RUN opam install base dune ounit2 ppx_deriving ppx_sexp_conv qcheck react calendar
Expand Down
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": 3,
"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.mli: \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
}