diff --git a/.github/workflows/build_static.yml b/.github/workflows/build_static.yml index 5aab6ed72..0c4684ce3 100644 --- a/.github/workflows/build_static.yml +++ b/.github/workflows/build_static.yml @@ -78,7 +78,10 @@ jobs: - name: Install static dependencies run: sudo apk add zlib-static + - run: opam switch create . ocaml-system --locked --deps-only --ignore-constraints-on alt-ergo-lib,alt-ergo-parsers + - run: opam exec -- dune subst + - name: Build statically linked binary run: LINK_MODE=static opam exec -- dune build --release src/bin/text/Main_text.exe diff --git a/Dockerfile b/Dockerfile index 123b06274..3681e4f65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,11 +30,13 @@ RUN opam switch create . 4.14.1 --locked --deps-only --ignore-constraints-on alt RUN opam exec -- dune subst -RUN LINK_MODE=mixed opam exec -- dune build --release src/bin/text/Main_text.exe +RUN LINK_MODE=mixed opam exec -- dune build --release @install + +RUN opam exec -- dune install --relocatable --prefix /opt/alt-ergo/ FROM scratch AS alt-ergo -COPY --from=compilation /src/alt-ergo/src/bin/text/Main_text.exe /bin/alt-ergo -ENTRYPOINT [ "/bin/alt-ergo" ] +COPY --from=compilation /opt/alt-ergo/ /opt/alt-ergo/ +ENTRYPOINT [ "/opt/alt-ergo/bin/alt-ergo" ] # FROM ocamlpro/ocaml:4.14 AS compilation #