Skip to content

Commit

Permalink
Fixes for Docker and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AltGr committed Jul 28, 2021
1 parent 66994f2 commit 19e7438
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .ci-macosx.sh
Expand Up @@ -6,7 +6,7 @@ brew update
brew install pkg-config
brew install opam
brew install libev
opam init -y --compiler=4.05.0
opam init -y --compiler=4.12.0
eval $(opam env)

opam install -y -j 2 . --deps-only --locked
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-builds.yml
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Prepare build environment
run: |
opam init -a --bare
opam switch create . ocaml-base-compiler 'dune<2' --deps-only
opam switch create . ocaml-base-compiler --deps-only
- name: Build the binaries
run: |
opam exec -- make LINKING_MODE=static
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,4 +1,4 @@
FROM ocaml/opam2:alpine as compilation
FROM ocaml/opam:alpine-3.13-ocaml-4.12 as compilation
LABEL Description="learn-ocaml building" Vendor="OCamlPro"

WORKDIR /home/opam/learn-ocaml
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.test-client
@@ -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.05 as compilation
FROM ocaml/opam:alpine-3.13-ocaml-4.12 as compilation
LABEL Description="learn-ocaml building" Vendor="OCamlPro"

WORKDIR 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.05 \
&& opam switch 4.12 \
&& 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
4 changes: 2 additions & 2 deletions scripts/static-build.sh
Expand Up @@ -10,11 +10,11 @@ cd $(dirname "$0")/..
set -o pipefail
git ls-files -z | xargs -0 tar c | \
docker run --rm -i \
ocamlpro/ocaml:4.05 \
ocamlpro/ocaml:4.12 \
sh -uexc \
'tar x >&2 &&
sudo apk add openssl-libs-static >&2 &&
opam switch create . ocaml-system "dune<2" --deps-only >&2 &&
opam switch create . ocaml-system --deps-only >&2 &&
opam exec make LINKING_MODE=static >&2 &&
tar c -hC _build/install/default/bin .' | \
tar vx

0 comments on commit 19e7438

Please sign in to comment.