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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:

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

- name: Setup OCaml
uses: ocaml/setup-ocaml@v3
uses: ocaml/setup-ocaml@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
Expand All @@ -47,10 +47,10 @@ jobs:
run: git diff --exit-code

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

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

- name: Lint doc
uses: ocaml/setup-ocaml/lint-doc@v3
uses: ocaml/setup-ocaml/lint-doc@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8
10 changes: 5 additions & 5 deletions .github/workflows/deploy-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v5
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: npm
Expand All @@ -32,7 +32,7 @@ jobs:
run: npm ci

- name: Setup OCaml
uses: ocaml/setup-ocaml@v3
uses: ocaml/setup-ocaml@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8
with:
ocaml-compiler: "5.3.x"
opam-repositories: |
Expand All @@ -57,7 +57,7 @@ jobs:
run: npm run build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with:
path: doc/build

Expand All @@ -83,4 +83,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
6 changes: 3 additions & 3 deletions .github/workflows/test-deploy-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v5
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: npm
Expand All @@ -32,7 +32,7 @@ jobs:
run: npm ci

- name: Setup OCaml
uses: ocaml/setup-ocaml@v3
uses: ocaml/setup-ocaml@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8
with:
ocaml-compiler: "5.3.x"
opam-repositories: |
Expand Down
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=0.27.0
version=0.28.1
profile=janestreet
parse-docstrings=true
1 change: 0 additions & 1 deletion bin/main.ml

This file was deleted.

35 changes: 35 additions & 0 deletions doc-experiment-docusaurus-dev.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "Dev targets and documentation"
maintainer: ["Mathieu Barbin"]
authors: ["Mathieu Barbin"]
license: "MIT"
homepage: "https://github.com/mbarbin/doc-experiment-docusaurus"
doc: "https://mbarbin.github.io/doc-experiment-docusaurus/"
bug-reports: "https://github.com/mbarbin/doc-experiment-docusaurus/issues"
depends: [
"dune" {>= "3.17"}
"ocaml" {>= "5.2"}
"doc-experiment-docusaurus-tests" {= version}
"mylib" {= version}
"myotherlib" {= version}
"mdx" {>= "2.4"}
"ocamlformat" {= "0.28.1"}
"sherlodoc" {>= "0.2"}
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/mbarbin/doc-experiment-docusaurus.git"
32 changes: 32 additions & 0 deletions doc-experiment-docusaurus-tests.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "Tests for doc-experiment-docusaurus"
maintainer: ["Mathieu Barbin"]
authors: ["Mathieu Barbin"]
license: "MIT"
homepage: "https://github.com/mbarbin/doc-experiment-docusaurus"
doc: "https://mbarbin.github.io/doc-experiment-docusaurus/"
bug-reports: "https://github.com/mbarbin/doc-experiment-docusaurus/issues"
depends: [
"dune" {>= "3.17"}
"ocaml" {>= "5.2"}
"mylib" {= version}
"myotherlib" {= version}
"ppx_expect" {>= "v0.17" & < "v0.18"}
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/mbarbin/doc-experiment-docusaurus.git"
8 changes: 4 additions & 4 deletions doc/docs/tutorials/hello-mylib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ the doc up to date.
We can make use of code defined in libraries.

```ocaml
# Stdio.print_s Mylib.hello_world
"Hello, World!"
# print_endline Mylib.hello_world
Hello, World!
- : unit = ()
```

Expand All @@ -18,6 +18,6 @@ We can make use of code defined in libraries.
We can make use of executables defined in packages.

```bash
$ mylib print
"Hello, World!"
$ mybin print
Hello, World!
```
1 change: 1 addition & 0 deletions doc/docs/tutorials/hello-mylib/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(mdx
(package doc-experiment-docusaurus-dev)
(deps
(package mylib))
(preludes prelude.txt))
166 changes: 45 additions & 121 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 3.16)
(lang dune 3.17)

(name doc-experiment-docusaurus)

Expand All @@ -17,140 +17,64 @@

(using mdx 0.4)

(implicit_transitive_deps false)

(package
(name mylib)
(synopsis "A package named mylib in this project")
(depends
(ocaml
(>= 5.2))
(base
(and
(>= v0.17)
(< v0.18)))
(command-unix-for-opam
(>= 0.0.2))
(core
(and
(>= v0.17)
(< v0.18)))
(expect_test_helpers_core
(and
:with-test
(>= v0.17)
(< v0.18)))
(mdx
(>= 2.4))
(ppx_compare
(and
(>= v0.17)
(< v0.18)))
(ppx_enumerate
(and
(>= v0.17)
(< v0.18)))
(ppx_expect
(and
:with-test
(>= v0.17)
(< v0.18)))
(ppx_hash
(and
(>= v0.17)
(< v0.18)))
(ppx_here
(and
(>= v0.17)
(< v0.18)))
(ppx_js_style
(and
:dev
(>= v0.17)
(< v0.18)))
(ppx_let
(and
(>= v0.17)
(< v0.18)))
(ppx_sexp_conv
(and
(>= v0.17)
(< v0.18)))
(ppx_sexp_value
(and
(>= v0.17)
(< v0.18)))
(sherlodoc
(and
:with-doc
(>= 0.2)))
(stdio
(and
(>= v0.17)
(< v0.18)))))
(cmdlang
(>= 0.0.9))
(cmdlang-cmdliner-err-runner
(>= 0.0.16))
(dune-build-info
(>= 3.17))))

(package
(name myotherlib)
(synopsis "Another package named myotherlib in this project")
(depends
(ocaml
(>= 5.2))
(base
(and
(>= v0.17)
(< v0.18)))
(command-unix-for-opam
(>= 0.0.2))
(core
(and
(>= v0.17)
(< v0.18)))
(expect_test_helpers_core
(and
:with-test
(>= v0.17)
(< v0.18)))
(ppx_compare
(and
(>= v0.17)
(< v0.18)))
(ppx_enumerate
(and
(>= v0.17)
(< v0.18)))
(cmdlang
(>= 0.0.9))
(cmdlang-cmdliner-err-runner
(>= 0.0.16))))

(package
(name doc-experiment-docusaurus-tests)
(synopsis "Tests for doc-experiment-docusaurus")
(allow_empty)
(depends
(ocaml
(>= 5.2))
(mylib
(= :version))
(myotherlib
(= :version))
(ppx_expect
(and
:with-test
(>= v0.17)
(< v0.18)))
(ppx_hash
(and
(>= v0.17)
(< v0.18)))
(ppx_here
(and
(>= v0.17)
(< v0.18)))
(ppx_js_style
(and
:dev
(>= v0.17)
(< v0.18)))
(ppx_let
(and
(>= v0.17)
(< v0.18)))
(ppx_sexp_conv
(and
(>= v0.17)
(< v0.18)))
(ppx_sexp_value
(and
(>= v0.17)
(< v0.18)))
(sherlodoc
(and
:with-doc
(>= 0.2)))
(stdio
(and
(>= v0.17)
(< v0.18)))))

(package
(name doc-experiment-docusaurus-dev)
(synopsis "Dev targets and documentation")
(allow_empty)
(depends
(ocaml
(>= 5.2))
(doc-experiment-docusaurus-tests
(= :version))
(mylib
(= :version))
(myotherlib
(= :version))
(mdx
(>= 2.4))
(ocamlformat
(= 0.28.1))
(sherlodoc
(>= 0.2))))
10 changes: 10 additions & 0 deletions dunolint
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(lang dunolint 1.0)

(rule
(cond
((path (glob test/**))
(enforce
(dune
(library
(and (not (has_field public_name))
(package (equals doc-experiment-docusaurus-tests)))))))))
Loading