Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 26 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,50 @@ on:
branches:
- "**" # This will match pull requests targeting any branch

permissions:
contents: read

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ocaml-compiler:
- 5.3.x
ocaml-version:
- "5.4"

runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash

steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup OCaml
uses: ocaml/setup-ocaml@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8
- name: Environment setup
run: |
echo "DUNE_WORKSPACE=$PWD/dune-workspace-${{ matrix.ocaml-version }}" >> "$GITHUB_ENV"

- name: Setup Dune
uses: mbarbin/setup-dune@ae2985bcdedc6fb24e5743d6f9dace9cf262b41c # v2.0.0+patch-4
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
default: https://github.com/ocaml/opam-repository.git
mbarbin: https://github.com/mbarbin/opam-repository.git
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages
version: "3.21.0"
workspace: ${{ env.DUNE_WORKSPACE }}
cache-prefix: "main-ci-${{ matrix.ocaml-version }}"
cache-readonly: ${{ github.ref != 'refs/heads/main' }}
steps: install-dune enable-pkg lazy-update-depexts install-gpatch install-depexts

- name: Install dependencies
run: opam install . --deps-only --with-doc --with-test --with-dev-setup
- name: Build and Run Tests
run: dune build @all @runtest

- name: Build
run: opam exec -- dune build @all @lint
- name: Lint
run: dune build @lint @fmt @unused-libs

- name: Run tests
run: opam exec -- dune runtest
- name: Build Doc
run: dune build @doc

- name: Check for uncommitted changes
run: git diff --exit-code

- name: Lint opam
uses: ocaml/setup-ocaml/lint-opam@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8

- name: Lint fmt
uses: ocaml/setup-ocaml/lint-fmt@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8

- name: Lint doc
uses: ocaml/setup-ocaml/lint-doc@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8
31 changes: 18 additions & 13 deletions .github/workflows/deploy-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ on:
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

permissions:
contents: read

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
env:
OCAML_VERSION: "5.4"
defaults:
run:
shell: bash
Expand All @@ -29,23 +34,23 @@ jobs:

- name: Install Docusaurus Dependencies
working-directory: ./doc
run: npm ci
run: npm ci --ignore-scripts

- name: Setup OCaml
uses: ocaml/setup-ocaml@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8
with:
ocaml-compiler: "5.3.x"
opam-repositories: |
default: https://github.com/ocaml/opam-repository.git
mbarbin: https://github.com/mbarbin/opam-repository.git
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages
- name: Environment setup
run: |
echo "DUNE_WORKSPACE=$PWD/dune-workspace-${{ env.OCAML_VERSION }}" >> "$GITHUB_ENV"

- name: Install OCaml Dependencies
run: opam install . --deps-only --with-doc
- name: Setup Dune
uses: mbarbin/setup-dune@ae2985bcdedc6fb24e5743d6f9dace9cf262b41c # v2.0.0+patch-4
with:
version: "3.21.0"
workspace: ${{ env.DUNE_WORKSPACE }}
cache-prefix: "main-ci-${{ env.OCAML_VERSION }}"
cache-readonly: true
steps: install-dune enable-pkg lazy-update-depexts install-gpatch install-depexts

- name: Build Odoc Pages
run: opam exec -- dune build @doc
run: dune build @doc

- name: Copy Odoc Pages to Docusaurus Static Directory
run: |
Expand Down
31 changes: 18 additions & 13 deletions .github/workflows/test-deploy-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ on:
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

permissions:
contents: read

jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
env:
OCAML_VERSION: "5.4"
defaults:
run:
shell: bash
Expand All @@ -29,23 +34,23 @@ jobs:

- name: Install Docusaurus Dependencies
working-directory: ./doc
run: npm ci
run: npm ci --ignore-scripts

- name: Setup OCaml
uses: ocaml/setup-ocaml@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8
with:
ocaml-compiler: "5.3.x"
opam-repositories: |
default: https://github.com/ocaml/opam-repository.git
mbarbin: https://github.com/mbarbin/opam-repository.git
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages
- name: Environment setup
run: |
echo "DUNE_WORKSPACE=$PWD/dune-workspace-${{ env.OCAML_VERSION }}" >> "$GITHUB_ENV"

- name: Install OCaml Dependencies
run: opam install . --deps-only --with-doc
- name: Setup Dune
uses: mbarbin/setup-dune@ae2985bcdedc6fb24e5743d6f9dace9cf262b41c # v2.0.0+patch-4
with:
version: "3.21.0"
workspace: ${{ env.DUNE_WORKSPACE }}
cache-prefix: "main-ci-${{ env.OCAML_VERSION }}"
cache-readonly: true
steps: install-dune enable-pkg lazy-update-depexts install-gpatch install-depexts

- name: Build Odoc Pages
run: opam exec -- dune build @doc
run: dune build @doc

- name: Copy Odoc Pages to Docusaurus Static Directory
run: |
Expand Down
13 changes: 13 additions & 0 deletions dune-workspace-5.4
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(lang dune 3.20)

(pkg enabled)

(lock_dir
(repositories overlay upstream mbarbin)
(constraints
(ocaml
(= 5.4.1))))

(repository
(name mbarbin)
(url "git+https://github.com/mbarbin/opam-repository.git"))
6 changes: 3 additions & 3 deletions third-party-license/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ See the [actions/upload-pages-artifact license](https://github.com/actions/uploa

---

## ocaml/setup-ocaml
## ocaml-dune/setup-dune

- Repository: https://github.com/ocaml/setup-ocaml
- Repository: https://github.com/ocaml-dune/setup-dune
- License: MIT License

See the [ocaml/setup-ocaml license](https://github.com/ocaml/setup-ocaml/blob/master/LICENSE) for full details.
See the [ocaml-dune/setup-dune license](https://github.com/ocaml-dune/setup-dune/blob/main/LICENSE.md) for full details.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License
# MIT License

Copyright (c) 2019 Anil Madhavapeddy
Copyright (c) 2025-2026 Tarides, Samuel Hym

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down