Skip to content

chore(ci): Build OxCaml development branch#13981

Merged
Leonidas-from-XIV merged 7 commits intoocaml:mainfrom
Sudha247:ci-oxcaml-trunk
Apr 8, 2026
Merged

chore(ci): Build OxCaml development branch#13981
Leonidas-from-XIV merged 7 commits intoocaml:mainfrom
Sudha247:ci-oxcaml-trunk

Conversation

@Sudha247
Copy link
Copy Markdown
Collaborator

Fixes #13895.

Adds a workflow to test the build of OxCaml development branch, to catch any issues like #13889 early. Uses nix for faster builds. The workflow itself is more generic, such that any other critical rev deps can be added to the same workflow to test development builds.

Currently runs on pull_request for testing. We may only need to run this as part of release readiness later on.

Comment thread flake.nix Outdated
Copy link
Copy Markdown
Collaborator

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a lot of experience with Nix so I'd rather suggest @Alizter takes a look at the part but here's some improvements for the Github action.

Comment thread .github/workflows/revdeps-dev-build.yml Outdated
Comment thread .github/workflows/revdeps-dev-build.yml Outdated
Comment thread .github/workflows/revdeps-dev-build.yml Outdated
Comment thread .github/workflows/revdeps-dev-build.yml
Comment thread .github/workflows/revdeps-dev-build.yml Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds CI coverage for building the OxCaml development branch against Dune’s development version, aiming to catch regressions earlier (per #13895 / #13889) by leveraging Nix for a more reproducible and faster setup.

Changes:

  • Add a new GitHub Actions workflow to build OxCaml trunk on pull_request and workflow_dispatch.
  • Extend the Nix flake with an ox-trunk devShell tailored for building OxCaml trunk (including a pinned Menhir source).
  • Update flake.lock to include the new menhir-src flake input.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
flake.nix Adds menhir-src input and an ox-trunk devShell to support OxCaml trunk builds in CI.
flake.lock Locks the new menhir-src input for reproducible builds.
.github/workflows/revdeps-dev-build.yml Introduces a workflow that builds Dune from the PR, then builds OxCaml trunk using the new Nix devShell.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/revdeps-dev-build.yml Outdated
Comment thread flake.nix
Copy link
Copy Markdown
Collaborator

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shonfeder shonfeder requested a review from Alizter April 2, 2026 22:41
Copy link
Copy Markdown
Member

@shonfeder shonfeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me. I am a bit unsure how this will generalize to other revdeps, since I'd rather think they could be tested with opam or dune facilities (e.g., via opam pin --dev-repo, but this looks like it should give us what we need to the oxcaml builds we need! Thanks :)

Comment thread .github/workflows/revdeps-dev-build.yml
Comment thread .github/workflows/revdeps-dev-build.yml Outdated
@Alizter
Copy link
Copy Markdown
Collaborator

Alizter commented Apr 7, 2026

FYI I have made some changes with how we run oxcaml packages in the main flake output here: #13999. Introduced there is a general mechanism that reads an arbitrary opam repository and translates it into nix derivations using the same sources and patches etc.

The motivation there was to use the oxcaml repository as the source of truth for oxcaml patches so that we could finally start using things like ppx_expect with oxcaml.

This should be the package set that you use for revdeps of oxcaml if that is what you want to test. However I should note that the opam repository patches won't cover oxcaml main changes.

Sudha247 added 4 commits April 7, 2026 15:29
Adds a workflow to test the build of OxCaml development branch, to catch any
issues like ocaml#13889 early. Uses nix for faster builds. The workflow itself is
more generic such that any other critical rev deps can be added to the same
workflow to test development builds.

Currently runs on `pull_request` for testing. We may only need to run this as
part of release readiness later on.

Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Adding the specific version of menhir library required by OxCaml trunk as a
flake input and reference it so we don't have to define it inline.

Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Use checkout action to also fetch rev-dep repos and simplify shell
commands.

Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
@Sudha247
Copy link
Copy Markdown
Collaborator Author

Sudha247 commented Apr 8, 2026

The CI run is validated here: https://github.com/ocaml/dune/actions/runs/24086266630/job/70259907780?pr=13981. It takes about ~15 minutes. I've now changed it to just run on workflow_dispatch, to be used as a part of pre-release checks. This can be changed later to add more conditions to run it. I'll merge when the CI is green, unless there are any objections.

@Leonidas-from-XIV
Copy link
Copy Markdown
Collaborator

@Sudha247 have you considered running it as part of release branches automatically? It think this is a decent compromise that avoids burdening regular PRs with lengthy CI runs but does not require manual steps like workflow_dispatch does?

  push:
    branches:
      - '*-rc'

Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
@Sudha247
Copy link
Copy Markdown
Collaborator Author

Sudha247 commented Apr 8, 2026

Good point! Done.

@Leonidas-from-XIV Leonidas-from-XIV merged commit 10d0616 into ocaml:main Apr 8, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OxCaml build testing in CI

5 participants