Skip to content

Commit 71e70bf

Browse files
authored
Replace git submodules with published dependencies (#177)
* Replace git submodules with published dependencies Contributes to tarides/infrastructure#389
1 parent 5966a0d commit 71e70bf

File tree

11 files changed

+34
-73
lines changed

11 files changed

+34
-73
lines changed

.gitmodules

Lines changed: 0 additions & 9 deletions
This file was deleted.

Dockerfile

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
1-
FROM ocaml/opam:debian-12-ocaml-4.14@sha256:45b04e2a4c933c57549382045dfac12cb7e872cace0456f92f4b022066e48111 AS build
1+
FROM ocaml/opam:debian-12-ocaml-4.14@sha256:14f4cc396d19e5eba0c4cd8258eedd1045091f887920ba53431e1e05110311fc AS build
22
RUN sudo ln -f /usr/bin/opam-2.1 /usr/bin/opam && opam init --reinit -ni
33
RUN sudo apt-get update && sudo apt-get install -y capnproto graphviz libcapnp-dev libev-dev libffi-dev libgmp-dev libsqlite3-dev pkg-config
4-
RUN cd ~/opam-repository && git fetch -q origin master && git reset --hard 30b1b97d735732e40996cf2e6b06d478ac40633f && opam update
5-
COPY --chown=opam \
6-
vendor/ocurrent/current_github.opam \
7-
vendor/ocurrent/current_git.opam \
8-
vendor/ocurrent/current.opam \
9-
vendor/ocurrent/current_web.opam \
10-
/src/vendor/ocurrent/
11-
COPY --chown=opam \
12-
vendor/ocluster/current_ocluster.opam \
13-
vendor/ocluster/ocluster-api.opam \
14-
/src/vendor/ocluster/
4+
RUN cd ~/opam-repository && git fetch -q origin master && git reset --hard 56e31a3bc1fd0bfd87e5251972e806b8f78082a5 && opam update
5+
156
WORKDIR /src
16-
RUN opam pin add -yn current_github.dev "./vendor/ocurrent" && \
17-
opam pin add -yn current_git.dev "./vendor/ocurrent" && \
18-
opam pin add -yn current.dev "./vendor/ocurrent" && \
19-
opam pin add -yn current_web.dev "./vendor/ocurrent" && \
20-
opam pin add -yn current_ocluster.dev "./vendor/ocluster" && \
21-
opam pin add -yn ocluster-api.dev "./vendor/ocluster"
7+
# See https://github.com/ocurrent/ocaml-docs-ci/pull/177#issuecomment-2445338172
8+
RUN sudo chown opam:opam $(pwd)
9+
10+
# We want to cache the installation of dependencies prior to pulling in changes from the source dir
11+
COPY --chown=opam ./ocaml-docs-ci.opam /src/
12+
RUN opam install -y --deps-only .
2213

23-
COPY --chown=opam ocaml-docs-ci.opam /src/
24-
RUN opam install --deps-only .
25-
ADD --chown=opam . .
26-
RUN opam exec -- dune build ./_build/install/default/bin/ocaml-docs-ci ./_build/install/default/bin/ocaml-docs-ci-solver && cp ./_build/install/default/bin/ocaml-docs-ci ./_build/install/default/bin/ocaml-docs-ci-solver .
14+
COPY --chown=opam . .
15+
RUN opam exec -- dune build ./_build/install/default/bin/ocaml-docs-ci ./_build/install/default/bin/ocaml-docs-ci-solver
16+
RUN cp ./_build/install/default/bin/ocaml-docs-ci ./_build/install/default/bin/ocaml-docs-ci-solver .
2717

2818
FROM debian:12
2919
RUN apt-get update && apt-get install rsync libev4 openssh-client curl gnupg2 dumb-init git graphviz libsqlite3-dev ca-certificates netbase gzip bzip2 xz-utils unzip tar -y --no-install-recommends

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ git clone --recursive https://github.com/ocurrent/ocaml-docs-ci.git
1414
cd ocaml-docs-ci
1515
```
1616

17-
Note: you need to clone with --recursive because this project uses submodules (it depends on some packages that aren't released yet). If you forget, `git submodule update --init` will fetch them.
18-
1917
Then you need an opam 2.1 switch using OCaml 4.14. Recommend using this command to setup a local switch just for `docs-ci`.
2018

2119
```shell
@@ -124,4 +122,4 @@ Migrations will not run unless the --migration-path flag is present when invokin
124122

125123
### Epoch management
126124
Epochs are used in ocaml-docs-ci to organise sets of artifacts all produced by the same odoc/voodoo version.
127-
There is a cli tool for managing epochs described in [epoch.md](./src/cli/epoch.md).
125+
There is a cli tool for managing epochs described in [epoch.md](./src/cli/epoch.md).

docker/storage/Dockerfile

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,22 @@
1-
FROM ocaml/opam:debian-12-ocaml-4.14@sha256:45b04e2a4c933c57549382045dfac12cb7e872cace0456f92f4b022066e48111 AS build
1+
FROM ocaml/opam:debian-12-ocaml-4.14@sha256:14f4cc396d19e5eba0c4cd8258eedd1045091f887920ba53431e1e05110311fc AS build
22
RUN sudo ln -f /usr/bin/opam-2.1 /usr/bin/opam && opam init --reinit -ni
33
RUN sudo apt-get update
4-
RUN cd ~/opam-repository && git fetch -q origin master && git reset --hard ad6e2e1786b2097fda5be14d6411b60597e97058 && opam update
5-
COPY --chown=opam \
6-
vendor/ocurrent/current_github.opam \
7-
vendor/ocurrent/current_git.opam \
8-
vendor/ocurrent/current.opam \
9-
vendor/ocurrent/current_web.opam \
10-
/src/vendor/ocurrent/
11-
COPY --chown=opam \
12-
vendor/ocluster/current_ocluster.opam \
13-
vendor/ocluster/ocluster-api.opam \
14-
/src/vendor/ocluster/
4+
RUN cd ~/opam-repository && git fetch -q origin master && git reset --hard 56e31a3bc1fd0bfd87e5251972e806b8f78082a5 && opam update
5+
156
WORKDIR /src
16-
RUN opam pin add -yn current_github.dev "./vendor/ocurrent" && \
17-
opam pin add -yn current_git.dev "./vendor/ocurrent" && \
18-
opam pin add -yn current.dev "./vendor/ocurrent" && \
19-
opam pin add -yn current_web.dev "./vendor/ocurrent" && \
20-
opam pin add -yn current_ocluster.dev "./vendor/ocluster" && \
21-
opam pin add -yn ocluster-api.dev "./vendor/ocluster"
7+
# See https://github.com/ocurrent/ocaml-docs-ci/pull/177#issuecomment-2445338172
8+
RUN sudo chown opam:opam $(pwd)
229

2310
COPY --chown=opam ocaml-docs-ci.opam ocaml-docs-ci-client.opam /src/
24-
RUN opam install --deps-only .
11+
RUN opam install -y --deps-only .
2512
ADD --chown=opam . .
26-
RUN opam exec -- dune build ./_build/install/default/bin/epoch && cp ./_build/install/default/bin/epoch .
13+
RUN opam exec -- dune build ./_build/install/default/bin/epoch
14+
RUN cp ./_build/install/default/bin/epoch .
2715

2816
FROM debian:12
29-
ENV DEBIAN_FRONTEND noninteractive
30-
ENV LANG C.UTF-8
31-
ENV NOTVISIBLE "in users profile"
17+
ENV DEBIAN_FRONTEND=noninteractive
18+
ENV LANG=C.UTF-8
19+
ENV NOTVISIBLE="in users profile"
3220

3321
RUN apt-get update && \
3422
apt-get install -y openssh-server rsync git && \

dune

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
(data_only_dirs "_opam" "var" "tmp")
2-
3-
(vendored_dirs vendor)

dune-project

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818
(depends
1919
(ocaml (>= 4.14.1))
2020
(opam-format (>= 2.1.4))
21-
(current (>= 0.6))
21+
(current (>= 0.6.6))
2222
current_web
2323
current_git
2424
current_github
2525
current_ocluster
26+
current_docker
27+
current_rpc
2628
(cstruct (>= 6.1.0))
2729
(opam-0install (>= 0.4.3))
2830
(capnp-rpc-unix (>= 1.2))
@@ -40,7 +42,7 @@
4042
(git-unix (>= 3.13.0))
4143
conf-libev
4244
dune-build-info
43-
(ocaml-version (>= 3.6.1))
45+
(ocaml-version (>= 3.6.9))
4446
(obuilder-spec (>= 0.5.1))
4547
(ocolor (>= 1.3.0))
4648
(memtrace (>= 0.1.1)) ; required for memory profiling
@@ -57,7 +59,7 @@
5759
(ocaml (>= 4.14.1))
5860
(logs (>= 0.7.0))
5961
(fmt (>= 0.8.9))
60-
current_rpc
62+
(current_rpc (>= 0.6.6))
6163
(capnp-rpc-unix (>= 1.2))
6264
dockerfile
6365
(mdx :with-test)

ocaml-docs-ci-client.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ depends: [
1313
"ocaml" {>= "4.14.1"}
1414
"logs" {>= "0.7.0"}
1515
"fmt" {>= "0.8.9"}
16-
"current_rpc"
16+
"current_rpc" {>= "0.6.6"}
1717
"capnp-rpc-unix" {>= "1.2"}
1818
"dockerfile"
1919
"mdx" {with-test}

ocaml-docs-ci.opam

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ depends: [
1414
"dune" {>= "3.6"}
1515
"ocaml" {>= "4.14.1"}
1616
"opam-format" {>= "2.1.4"}
17-
"current" {>= "0.6"}
17+
"current" {>= "0.6.6"}
1818
"current_web"
1919
"current_git"
2020
"current_github"
2121
"current_ocluster"
22+
"current_docker"
23+
"current_rpc"
2224
"cstruct" {>= "6.1.0"}
2325
"opam-0install" {>= "0.4.3"}
2426
"capnp-rpc-unix" {>= "1.2"}
@@ -36,7 +38,7 @@ depends: [
3638
"git-unix" {>= "3.13.0"}
3739
"conf-libev"
3840
"dune-build-info"
39-
"ocaml-version" {>= "3.6.1"}
41+
"ocaml-version" {>= "3.6.9"}
4042
"obuilder-spec" {>= "0.5.1"}
4143
"ocolor" {>= "1.3.0"}
4244
"memtrace" {>= "0.1.1"}
@@ -63,6 +65,3 @@ build: [
6365
]
6466
dev-repo: "git+https://github.com/ocurrent/ocaml-docs-ci.git"
6567
available: [ arch != "x86_32" ]
66-
pin-depends: [
67-
["ocaml-version.dev" "git+https://github.com/ocurrent/ocaml-version#7a8d86e1fc66329b189a155136147970e03a3a54"]
68-
]

ocaml-docs-ci.opam.template

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
available: [ arch != "x86_32" ]
2-
pin-depends: [
3-
["ocaml-version.dev" "git+https://github.com/ocurrent/ocaml-version#7a8d86e1fc66329b189a155136147970e03a3a54"]
4-
]

vendor/ocluster

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)