-
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.
- Loading branch information
1 parent
ee897a3
commit 1e599bc
Showing
3 changed files
with
43 additions
and
8 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 @@ | ||
bin/ |
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 |
---|---|---|
@@ -1,15 +1,48 @@ | ||
FROM ocamlpro/ocaml:4.14 | ||
FROM quay.io/pypa/manylinux_2_28_aarch64 AS compilation | ||
|
||
USER ocaml | ||
ADD https://github.com/ocaml/opam/releases/download/2.2.0-beta1/opam-2.2.0-beta1-arm64-linux /bin/opam | ||
|
||
RUN sudo apk add zlib-static | ||
RUN chmod +x /bin/opam | ||
|
||
COPY . . | ||
RUN opam init -a --bare --disable-sandboxing | ||
|
||
RUN sudo chmod a+wx . | ||
COPY . /src/alt-ergo | ||
|
||
RUN opam switch create . ocaml-system --locked --deps-only --ignore-constraints-on alt-ergo-lib,alt-ergo-parsers | ||
WORKDIR /src/alt-ergo | ||
|
||
ENV OPAMYES 1 | ||
ENV OPAMDEPEXTYES 1 | ||
ENV OPAMCONFIRMLEVEL unsafe-yes | ||
ENV OPAMERRLOGLEN 0 | ||
|
||
RUN yum -y install gmp-static zlib-static | ||
|
||
RUN opam switch create . 4.14.1 --locked --deps-only --ignore-constraints-on alt-ergo-lib,alt-ergo-parsers | ||
|
||
RUN opam exec -- dune subst | ||
|
||
RUN LINK_MODE=static opam exec -- dune build --release src/bin/text/Main_text.exe | ||
RUN LINK_MODE=mixed opam exec -- dune build --release src/bin/text/Main_text.exe | ||
|
||
FROM scratch AS alt-ergo | ||
COPY --from=compilation /src/alt-ergo/src/bin/text/Main_text.exe /bin/alt-ergo | ||
ENTRYPOINT [ "/bin/alt-ergo" ] | ||
|
||
# FROM ocamlpro/ocaml:4.14 AS compilation | ||
# | ||
# USER ocaml | ||
# | ||
# RUN sudo apk add zlib-static | ||
# | ||
# COPY --chown=ocaml:ocaml . /src/alt-ergo | ||
# | ||
# WORKDIR /src/alt-ergo | ||
# | ||
# RUN opam switch create . ocaml-system --locked --deps-only --ignore-constraints-on alt-ergo-lib,alt-ergo-parsers | ||
# | ||
# RUN opam exec -- dune subst | ||
# | ||
# RUN LINK_MODE=static opam exec -- dune build --release src/bin/text/Main_text.exe | ||
# | ||
# FROM scratch AS alt-ergo | ||
# COPY --from=compilation /src/alt-ergo/src/bin/text/Main_text.exe /bin/alt-ergo | ||
# ENTRYPOINT [ "/bin/alt-ergo" ] |
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