Skip to content

Commit

Permalink
feat: complete porting to OCaml 5.1 and jsoo 5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
AltGr committed Jul 26, 2024
1 parent b6c9cc0 commit ebd0091
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/opam-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
uses: avsm/setup-ocaml@v1
# TODO: Keep up-to-date!
with:
ocaml-version: 4.12.0
ocaml-version: 5.1.1
- name: Install opam-publish
run: |
opam install -y -j 2 "opam-publish>=2.3.0"
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ocaml/opam:alpine-3.13-ocaml-4.12 as compilation
FROM ocaml/opam:alpine-3.20-ocaml-5.1 as compilation
LABEL Description="learn-ocaml building" Vendor="OCamlPro"

WORKDIR /home/opam/learn-ocaml
Expand All @@ -9,7 +9,7 @@ RUN sudo chown -R opam:nogroup .
ENV OPAMYES true
RUN echo 'archive-mirrors: [ "https://opam.ocaml.org/cache" ]' >> ~/.opam/config \
&& opam repository set-url default http://opam.ocaml.org \
&& opam switch 4.12 \
&& opam switch 5.1 \
&& echo 'pre-session-commands: [ "sudo" "apk" "add" depexts ]' >> ~/.opam/config \
&& opam install . --deps-only --locked

Expand Down Expand Up @@ -61,7 +61,7 @@ EXPOSE 8443
USER learn-ocaml
WORKDIR /home/learn-ocaml

ARG opam_switch="/home/opam/.opam/4.12"
ARG opam_switch="/home/opam/.opam/5.1"

COPY --from=compilation /home/opam/install-prefix /usr
COPY --from=compilation "$opam_switch/bin"/ocaml* "$opam_switch/bin/"
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.test-client
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This Dockerfile is useful for testing purposes
# to ensure learn-ocaml-client can be built alone from learn-ocaml-client.opam

FROM ocaml/opam:alpine-3.13-ocaml-4.12 as compilation
FROM ocaml/opam:alpine-3.20-ocaml-5.1 as compilation
LABEL Description="learn-ocaml building" Vendor="OCamlPro"

WORKDIR /home/opam/learn-ocaml
Expand All @@ -13,7 +13,7 @@ RUN sudo chown -R opam:nogroup .
ENV OPAMYES true
RUN echo 'archive-mirrors: [ "https://opam.ocaml.org/cache" ]' >> ~/.opam/config \
&& opam repository set-url default http://opam.ocaml.org \
&& opam switch 4.12 \
&& opam switch 5.1 \
&& echo 'pre-session-commands: [ "sudo" "apk" "add" depexts ]' >> ~/.opam/config \
&& opam pin add -n -y -k path learn-ocaml-client . \
&& opam install learn-ocaml-client --deps-only
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.test-server
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This Dockerfile is useful for testing purposes
# to ensure learn-ocaml can be built alone from learn-ocaml.opam

FROM ocaml/opam:alpine-3.13-ocaml-4.12 as compilation
FROM ocaml/opam:alpine-3.20-ocaml-5.1 as compilation
LABEL Description="learn-ocaml building" Vendor="OCamlPro"

WORKDIR /home/opam/learn-ocaml
Expand All @@ -13,7 +13,7 @@ RUN sudo chown -R opam:nogroup .
ENV OPAMYES true
RUN echo 'archive-mirrors: [ "https://opam.ocaml.org/cache" ]' >> ~/.opam/config \
&& opam repository set-url default http://opam.ocaml.org \
&& opam switch 4.12 \
&& opam switch 5.1 \
&& echo 'pre-session-commands: [ "sudo" "apk" "add" depexts ]' >> ~/.opam/config \
&& opam pin add -n -y -k path learn-ocaml . \
&& opam install learn-ocaml --deps-only
Expand Down Expand Up @@ -67,7 +67,7 @@ EXPOSE 8443
USER learn-ocaml
WORKDIR /home/learn-ocaml

ARG opam_switch="/home/opam/.opam/4.12"
ARG opam_switch="/home/opam/.opam/5.1"

COPY --from=compilation /home/opam/install-prefix /usr
COPY --from=compilation "$opam_switch/bin"/ocaml* "$opam_switch/bin/"
Expand Down
2 changes: 1 addition & 1 deletion scripts/static-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd $(dirname "$0")/..
set -o pipefail
git ls-files -z | xargs -0 tar c | \
docker run --rm -i \
ocamlpro/ocaml:4.12 \
ocamlpro/ocaml:5.1 \
sh -uexc \
'tar x >&2 &&
sudo apk add openssl-libs-static bash >&2 &&
Expand Down

0 comments on commit ebd0091

Please sign in to comment.