Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
bclement-ocp committed Mar 20, 2024
1 parent bf4fcd5 commit 1229dcb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build_static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down

0 comments on commit 1229dcb

Please sign in to comment.