From 9d00e58e5c0543ee55931e78ce6ce8c85266cb94 Mon Sep 17 00:00:00 2001 From: Mathieu Barbin Date: Tue, 6 Jan 2026 12:53:11 +0100 Subject: [PATCH 1/4] Use --only-packages instead of -p in more-ci targets --- .github/workflows/more-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/more-ci.yml b/.github/workflows/more-ci.yml index a67d56e..314f2ce 100644 --- a/.github/workflows/more-ci.yml +++ b/.github/workflows/more-ci.yml @@ -65,4 +65,4 @@ jobs: run: opam install ./fpath-sexp0.opam ./fpath-base.opam ./fpath-base-tests.opam --deps-only --with-test - name: Build & Run tests - run: opam exec -- dune build @all @runtest -p fpath-sexp0,fpath-base,fpath-base-tests + run: opam exec -- dune build @all @runtest --only-packages=fpath-sexp0,fpath-base,fpath-base-tests From 6d64aca6c903d11e455f60918ea79f3fc70953b6 Mon Sep 17 00:00:00 2001 From: Mathieu Barbin Date: Thu, 8 Jan 2026 10:13:51 +0100 Subject: [PATCH 2/4] Add versioned dune-workspace files for CI Create dune-workspace files based on [more-ci.yml] and [ocaml-4-ci.yml]. --- dune-workspace | 12 ++++++++++++ dune-workspace-4.14 | 13 +++++++++++++ dune-workspace-5.2 | 13 +++++++++++++ dune-workspace-5.3 | 13 +++++++++++++ dune-workspace-5.4 | 17 +++++++++++++++++ 5 files changed, 68 insertions(+) create mode 100644 dune-workspace create mode 100644 dune-workspace-4.14 create mode 100644 dune-workspace-5.2 create mode 100644 dune-workspace-5.3 create mode 100644 dune-workspace-5.4 diff --git a/dune-workspace b/dune-workspace new file mode 100644 index 0000000..53d6fbd --- /dev/null +++ b/dune-workspace @@ -0,0 +1,12 @@ +(lang dune 3.20) + +(lock_dir + (repositories overlay upstream alpha mbarbin)) + +(repository + (name mbarbin) + (url "git+https://github.com/mbarbin/opam-repository.git")) + +(repository + (name alpha) + (url "git+https://github.com/kit-ty-kate/opam-alpha-repository.git")) diff --git a/dune-workspace-4.14 b/dune-workspace-4.14 new file mode 100644 index 0000000..fe1c72c --- /dev/null +++ b/dune-workspace-4.14 @@ -0,0 +1,13 @@ +(lang dune 3.20) + +(pkg enabled) + +(lock_dir + (repositories overlay upstream mbarbin) + (constraints + (ocaml + (= 4.14.2)))) + +(repository + (name mbarbin) + (url "git+https://github.com/mbarbin/opam-repository.git")) diff --git a/dune-workspace-5.2 b/dune-workspace-5.2 new file mode 100644 index 0000000..b89d1d5 --- /dev/null +++ b/dune-workspace-5.2 @@ -0,0 +1,13 @@ +(lang dune 3.20) + +(pkg enabled) + +(lock_dir + (repositories overlay upstream mbarbin) + (constraints + (ocaml + (= 5.2.1)))) + +(repository + (name mbarbin) + (url "git+https://github.com/mbarbin/opam-repository.git")) diff --git a/dune-workspace-5.3 b/dune-workspace-5.3 new file mode 100644 index 0000000..9f241c8 --- /dev/null +++ b/dune-workspace-5.3 @@ -0,0 +1,13 @@ +(lang dune 3.20) + +(pkg enabled) + +(lock_dir + (repositories overlay upstream mbarbin) + (constraints + (ocaml + (= 5.3.0)))) + +(repository + (name mbarbin) + (url "git+https://github.com/mbarbin/opam-repository.git")) diff --git a/dune-workspace-5.4 b/dune-workspace-5.4 new file mode 100644 index 0000000..27f9589 --- /dev/null +++ b/dune-workspace-5.4 @@ -0,0 +1,17 @@ +(lang dune 3.20) + +(pkg enabled) + +(lock_dir + (repositories overlay upstream alpha mbarbin) + (constraints + (ocaml + (= 5.4.0)))) + +(repository + (name mbarbin) + (url "git+https://github.com/mbarbin/opam-repository.git")) + +(repository + (name alpha) + (url "git+https://github.com/kit-ty-kate/opam-alpha-repository.git")) From 100a42cad70ac594eab9798e83400e1f851fccb9 Mon Sep 17 00:00:00 2001 From: Mathieu Barbin Date: Thu, 8 Jan 2026 13:29:13 +0100 Subject: [PATCH 3/4] Add version-specific package overrides for CI workflows Refactor to prepare merging more-ci and ocaml-4 ci --- .github/workflows/more-ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/more-ci.yml b/.github/workflows/more-ci.yml index 314f2ce..3ca1d8a 100644 --- a/.github/workflows/more-ci.yml +++ b/.github/workflows/more-ci.yml @@ -31,6 +31,7 @@ jobs: - 5.4.x - 5.3.x - 5.2.x + - 4.14.x exclude: # We exclude the combination already tested in the 'ci' workflow. - os: ubuntu-latest @@ -58,11 +59,21 @@ jobs: - name: Edit dune-project run: opam exec -- ocaml .github/workflows/edit_dune_project_dot_ml "${{ matrix.ocaml-compiler }}" + - name: Environment setup + run: | + if [ "${{ matrix.ocaml-compiler }}" = "4.14.x" ]; then + echo "PACKAGES=fpath-sexp0" >> "$GITHUB_ENV" + echo "OPAM_PACKAGES=./fpath-sexp0.opam" >> "$GITHUB_ENV" + else + echo "PACKAGES=fpath-sexp0,fpath-base,fpath-base-tests" >> "$GITHUB_ENV" + echo "OPAM_PACKAGES=./fpath-sexp0.opam ./fpath-base.opam ./fpath-base-tests.opam" >> "$GITHUB_ENV" + fi + # We build and run tests for a subset of packages. More tests are run in # the development workflow and as part of the main CI job. These are the # tests that are checked for every combination of os and ocaml-compiler. - name: Install dependencies - run: opam install ./fpath-sexp0.opam ./fpath-base.opam ./fpath-base-tests.opam --deps-only --with-test + run: opam install ${{ env.OPAM_PACKAGES }} --deps-only --with-test - name: Build & Run tests - run: opam exec -- dune build @all @runtest --only-packages=fpath-sexp0,fpath-base,fpath-base-tests + run: opam exec -- dune build @all @runtest --only-packages=${{ env.PACKAGES }} From 35c9f6180a3d6e17829e02027967626ab615aa55 Mon Sep 17 00:00:00 2001 From: Mathieu Barbin Date: Thu, 8 Jan 2026 14:48:41 +0100 Subject: [PATCH 4/4] Remove edition of itd in more-ci The value [true] that is present in `dune-project` is the most permissive, thus keeping it is not going to create new errors. The build with [false], which is the eventual desired value, is already checked as part of the main ci, so we don't need to check it with all versions. This change will eventually simplify the migration to new workflows based on [setup-dune] so we are making this refactor as prerequisite. --- .github/workflows/more-ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/more-ci.yml b/.github/workflows/more-ci.yml index 3ca1d8a..e59c6ec 100644 --- a/.github/workflows/more-ci.yml +++ b/.github/workflows/more-ci.yml @@ -55,10 +55,6 @@ jobs: # janestreet-bleeding: https://github.com/janestreet/opam-repository.git # janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages - # Setting `(implicit_transitive_deps VALUE)` conditionally based on the compiler version. - - name: Edit dune-project - run: opam exec -- ocaml .github/workflows/edit_dune_project_dot_ml "${{ matrix.ocaml-compiler }}" - - name: Environment setup run: | if [ "${{ matrix.ocaml-compiler }}" = "4.14.x" ]; then