Skip to content

Commit d4660d9

Browse files
committed
Fixes for Docker and CI
1 parent 66994f2 commit d4660d9

File tree

6 files changed

+121
-17
lines changed

6 files changed

+121
-17
lines changed

.ci-macosx.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ brew update
66
brew install pkg-config
77
brew install opam
88
brew install libev
9-
opam init -y --compiler=4.05.0
9+
opam init -y --compiler=4.12.0
1010
eval $(opam env)
1111

1212
opam install -y -j 2 . --deps-only --locked

.github/workflows/static-builds.yml

+6-10
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,16 @@ jobs:
4646
sw_vers
4747
system_profiler SPSoftwareDataType
4848
uname -a
49-
# Need unreleased 2.1.0~rc
50-
# - name: Retrieve opam
51-
# run: |
52-
# mkdir "$HOME/bin"
53-
# wget https://github.com/ocaml/opam/releases/download/2.1.0-beta2/opam-2.1.0-beta2-x86_64-macos -O $HOME/bin/opam
54-
# chmod a+x $HOME/bin/opam
55-
# echo "$HOME/bin" >> $GITHUB_PATH
56-
- name: Install latest opam
49+
- name: Retrieve opam
5750
run: |
58-
brew install opam --HEAD
51+
mkdir "$HOME/bin"
52+
wget https://github.com/ocaml/opam/releases/download/2.1.0/opam-2.1.0-x86_64-macos -O $HOME/bin/opam
53+
chmod a+x $HOME/bin/opam
54+
echo "$HOME/bin" >> $GITHUB_PATH
5955
- name: Prepare build environment
6056
run: |
6157
opam init -a --bare
62-
opam switch create . ocaml-base-compiler 'dune<2' --deps-only
58+
opam switch create . ocaml-base-compiler --deps-only
6359
- name: Build the binaries
6460
run: |
6561
opam exec -- make LINKING_MODE=static

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ocaml/opam2:alpine as compilation
1+
FROM ocaml/opam:alpine-3.13-ocaml-4.12 as compilation
22
LABEL Description="learn-ocaml building" Vendor="OCamlPro"
33

44
WORKDIR /home/opam/learn-ocaml

Dockerfile.test-client

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This Dockerfile is useful for testing purposes
22
# to ensure learn-ocaml-client can be built alone from learn-ocaml-client.opam
33

4-
FROM ocaml/opam:alpine-3.13-ocaml-4.05 as compilation
4+
FROM ocaml/opam:alpine-3.13-ocaml-4.12 as compilation
55
LABEL Description="learn-ocaml building" Vendor="OCamlPro"
66

77
WORKDIR learn-ocaml
@@ -13,7 +13,7 @@ RUN sudo chown -R opam:nogroup .
1313
ENV OPAMYES true
1414
RUN echo 'archive-mirrors: [ "https://opam.ocaml.org/cache" ]' >> ~/.opam/config \
1515
&& opam repository set-url default http://opam.ocaml.org \
16-
&& opam switch 4.05 \
16+
&& opam switch 4.12 \
1717
&& echo 'pre-session-commands: [ "sudo" "apk" "add" depexts ]' >> ~/.opam/config \
1818
&& opam pin add -n -y -k path learn-ocaml-client . \
1919
&& opam install learn-ocaml-client --deps-only

learn-ocaml-client.opam.locked

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
opam-version: "2.0"
2+
name: "learn-ocaml-client"
3+
version: "0.12"
4+
synopsis: "The learn-ocaml client"
5+
description: """\
6+
This contains the binaries to interact with the learn-ocaml
7+
platform from the command line."""
8+
maintainer: "Yann Régis-Gianas"
9+
authors: [
10+
"Benjamin Canou (OCamlPro)"
11+
"Çağdaş Bozman (OCamlPro)"
12+
"Grégoire Henry (OCamlPro)"
13+
"Louis Gesbert (OCamlPro)"
14+
"Pierrick Couderc (OCamlPro)"
15+
]
16+
license: "MIT"
17+
homepage: "https://github.com/ocaml-sf/learn-ocaml"
18+
bug-reports: "https://github.com/ocaml-sf/learn-ocaml/issues"
19+
depends: [
20+
"angstrom" {= "0.15.0"}
21+
"asak" {= "0.3"}
22+
"astring" {= "0.8.5"}
23+
"base" {= "v0.14.1"}
24+
"base-bigarray" {= "base"}
25+
"base-bytes" {= "base"}
26+
"base-threads" {= "base"}
27+
"base-unix" {= "base"}
28+
"base64" {= "3.5.0"}
29+
"bigarray-compat" {= "1.0.0"}
30+
"bigstringaf" {= "0.8.0"}
31+
"biniou" {= "1.2.1"}
32+
"cmdliner" {= "1.0.4"}
33+
"cohttp" {= "4.0.0"}
34+
"cohttp-lwt" {= "4.0.0"}
35+
"cohttp-lwt-unix" {= "4.0.0"}
36+
"conduit" {= "1.3.0"}
37+
"conduit-lwt" {= "1.3.0"}
38+
"conduit-lwt-unix" {= "1.3.0"}
39+
"conf-libssl" {= "3"}
40+
"conf-pkg-config" {= "2"}
41+
"conf-which" {= "1"}
42+
"cppo" {= "1.6.7"}
43+
"csexp" {= "1.5.1"}
44+
"cstruct" {= "5.0.0"}
45+
"digestif" {= "1.0.0"}
46+
"dune" {= "2.9.0"}
47+
"dune-configurator" {= "2.9.0"}
48+
"easy-format" {= "1.3.2"}
49+
"eqaf" {= "0.7"}
50+
"ezjsonm" {= "1.1.0"}
51+
"fieldslib" {= "v0.14.0"}
52+
"fmt" {= "0.8.9"}
53+
"gg" {= "0.9.3"}
54+
"hex" {= "1.4.0"}
55+
"ipaddr" {= "2.8.0"}
56+
"jbuilder" {= "1.0+beta20.2"}
57+
"js_of_ocaml" {= "3.9.0"}
58+
"js_of_ocaml-compiler" {= "3.9.1"}
59+
"js_of_ocaml-ppx" {= "3.9.0"}
60+
"jsonm" {= "1.0.1"}
61+
"logs" {= "0.7.0"}
62+
"lwt" {= "5.4.1"}
63+
"lwt_ssl" {= "1.1.3"}
64+
"magic-mime" {= "1.1.3"}
65+
"menhir" {= "20210419"}
66+
"menhirLib" {= "20210419"}
67+
"menhirSdk" {= "20210419"}
68+
"mmap" {= "1.1.0"}
69+
"num" {= "1.4"}
70+
"ocaml" {= "4.12.0"}
71+
"ocaml-base-compiler" {= "4.12.0"}
72+
"ocaml-compiler-libs" {= "v0.12.3"}
73+
"ocaml-config" {= "2"}
74+
"ocaml-migrate-parsetree" {= "1.8.0"}
75+
"ocaml-options-vanilla" {= "1"}
76+
"ocaml-syntax-shims" {= "1.0.0"}
77+
"ocamlbuild" {= "0.14.0"}
78+
"ocamlfind" {= "1.9.1"}
79+
"ocp-indent-nlfork" {= "1.5.4"}
80+
"ocp-ocamlres" {= "0.4"}
81+
"ocplib-endian" {= "1.1"}
82+
"ocplib-json-typed" {= "0.7.1"}
83+
"omd" {= "1.3.1"}
84+
"parsexp" {= "v0.14.1"}
85+
"pprint" {= "20200410"}
86+
"ppx_derivers" {= "1.2.1"}
87+
"ppx_fields_conv" {= "v0.14.1"}
88+
"ppx_sexp_conv" {= "v0.14.1"}
89+
"ppx_tools" {= "6.3"}
90+
"ppxlib" {= "0.15.0"}
91+
"re" {= "1.9.0"}
92+
"result" {= "1.5"}
93+
"seq" {= "0.2.2"}
94+
"sexplib" {= "v0.14.0"}
95+
"sexplib0" {= "v0.14.0"}
96+
"ssl" {= "0.5.5"}
97+
"stdlib-shims" {= "0.3.0"}
98+
"stringext" {= "1.6.0"}
99+
"topkg" {= "1.0.3"}
100+
"uchar" {= "0.0.2"}
101+
"uri" {= "4.2.0"}
102+
"uri-sexp" {= "4.2.0"}
103+
"uutf" {= "1.0.2"}
104+
"vg" {= "0.9.4"}
105+
"yojson" {= "1.7.0"}
106+
]
107+
build: ["dune" "build" "@install" "-p" name "-j" jobs]
108+
dev-repo: "git+https://github.com/ocaml-sf/learn-ocaml"

scripts/static-build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ cd $(dirname "$0")/..
1010
set -o pipefail
1111
git ls-files -z | xargs -0 tar c | \
1212
docker run --rm -i \
13-
ocamlpro/ocaml:4.05 \
13+
ocamlpro/ocaml:4.12 \
1414
sh -uexc \
1515
'tar x >&2 &&
16-
sudo apk add openssl-libs-static >&2 &&
17-
opam switch create . ocaml-system "dune<2" --deps-only >&2 &&
16+
sudo apk add openssl-libs-static bash >&2 &&
17+
opam switch create . ocaml-system --deps-only >&2 &&
1818
opam exec make LINKING_MODE=static >&2 &&
1919
tar c -hC _build/install/default/bin .' | \
2020
tar vx

0 commit comments

Comments
 (0)