From 0f071e879c2dda26db38bd42ffa5b65384f0db7e Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Fri, 4 Oct 2024 16:03:58 +0200 Subject: [PATCH] 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 | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 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..b783064af6 --- /dev/null +++ b/.github/workflows/driver.yml @@ -0,0 +1,37 @@ +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@v2 + + # 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"