-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: try to reinforce CI by running integration tests in docker
- Loading branch information
Showing
3 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
_opam | ||
_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM ocaml/opam:debian-ocaml-4.14 AS base | ||
|
||
WORKDIR /build/ | ||
RUN sudo chown -R opam: /build/ | ||
RUN sudo apt install protobuf-compiler libprotobuf-dev -y | ||
COPY --chown=opam ./src/ ./src/ | ||
COPY --chown=opam pbrt.opam pbrt_services.opam pbrt_yojson.opam ocaml-protoc.opam \ | ||
Makefile Makefile.test dune-project dune .ocamlformat \ | ||
.ocamlformat-ignore ./ | ||
|
||
RUN opam pin -n . | ||
RUN opam depext -yt ocaml-protoc | ||
RUN opam install -t . --deps-only | ||
|
||
FROM base AS run-the-damn-build | ||
RUN opam exec -- dune build @install | ||
RUN opam exec -- dune runtest | ||
|
||
# integration tests | ||
RUN opam install ppx_deriving -y | ||
RUN opam exec -- make clean build integration PB_LINC=/usr/lib/x86_64-linux-gnu/ PB_HINC=/usr/include/x86_64-linux-gnu/ | ||
|