From 8748739a3e4f0af1fd705ae8f12d7b852a5f75a3 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Fri, 4 Oct 2024 15:54:56 +0200 Subject: [PATCH 1/4] Vendor sherlodoc as a submodule Checked-out to branch odoc3_compat of https://github.com/Julow/sherlodoc --- .gitmodules | 4 ++++ dune | 2 ++ sherlodoc | 1 + 3 files changed, 7 insertions(+) create mode 100644 .gitmodules create mode 160000 sherlodoc diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..fb46c7e2cb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "sherlodoc"] + path = sherlodoc + url = https://github.com/Julow/sherlodoc + branch = odoc3_compat diff --git a/dune b/dune index 3a7000ca50..44f3c64001 100644 --- a/dune +++ b/dune @@ -23,3 +23,5 @@ (progn (bash "diff doc/driver.mld doc/driver.mld.corrected >&2 || true") (cat doc/driver-benchmarks.json)))) + +(vendored_dirs sherlodoc) diff --git a/sherlodoc b/sherlodoc new file mode 160000 index 0000000000..5fc34e57af --- /dev/null +++ b/sherlodoc @@ -0,0 +1 @@ +Subproject commit 5fc34e57afb04ff92229a1b783fad7100506abf8 From f90579f5c43dfc617c584e1bc2a32699b1dee35d Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Fri, 4 Oct 2024 16:03:44 +0200 Subject: [PATCH 2/4] Driver depends on sherlodoc --- src/driver/dune | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/driver/dune b/src/driver/dune index 1111cc3c42..c7a1751b3a 100644 --- a/src/driver/dune +++ b/src/driver/dune @@ -2,7 +2,8 @@ (public_name odoc_driver) (package odoc-driver) (link_deps - (package odoc)) + (package odoc) + (package sherlodoc)) (libraries cmdliner bos From 1a48b36868f572c57e7a667d6187b73343b77766 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Fri, 4 Oct 2024 16:03:58 +0200 Subject: [PATCH 3/4] Run the driver in CI The driver runs on Base. This will also test that sherlodoc is co-installable with odoc. --- .github/workflows/driver.yml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/driver.yml diff --git a/.github/workflows/driver.yml b/.github/workflows/driver.yml new file mode 100644 index 0000000000..4f85e078af --- /dev/null +++ b/.github/workflows/driver.yml @@ -0,0 +1,39 @@ +name: "Driver" + +on: + - pull_request + +jobs: + build: # Check build on various OSes + + strategy: + matrix: + os: + - ubuntu-latest + ocaml-compiler: + - 5.2.x + + runs-on: ${{ matrix.os }} + + steps: + # Clone the project + - uses: actions/checkout@v4 + with: + submodules: true + + # Setup + - name: Setup OCaml ${{ matrix.ocaml-version }} + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + opam-local-packages: odoc-parser.opam odoc.opam odoc-driver.opam sherlodoc/sherlodoc.opam + + - name: Install dependencies + run: | + opam install -y --deps-only -t ./odoc-parser.opam ./odoc.opam ./odoc-driver.opam sherlodoc/sherlodoc.opam + opam install -y base # Input to the driver + + - name: Run the driver + run: | + opam exec -- dune exec -- odoc_driver -p base + echo "Generated $(find _html -name '*.html' | wc -l) pages" From f580b0f3d7c5f6ce3b3b941014b6ff5cc445b0e4 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Wed, 9 Oct 2024 17:21:14 +0200 Subject: [PATCH 4/4] Driver depends on sherlodoc --- odoc-driver.opam | 1 + 1 file changed, 1 insertion(+) diff --git a/odoc-driver.opam b/odoc-driver.opam index 510b96d707..b992aa35f9 100644 --- a/odoc-driver.opam +++ b/odoc-driver.opam @@ -45,6 +45,7 @@ depends: [ "progress" "cmdliner" "sexplib" + "sherlodoc" ] build: [