Skip to content

Automatically create binaries when creating releases#11

Open
Leonidas-from-XIV wants to merge 2 commits intoquantifyearth:mainfrom
tarides:dune-pkg-binary-release
Open

Automatically create binaries when creating releases#11
Leonidas-from-XIV wants to merge 2 commits intoquantifyearth:mainfrom
tarides:dune-pkg-binary-release

Conversation

@Leonidas-from-XIV
Copy link

@Leonidas-from-XIV Leonidas-from-XIV commented Mar 20, 2026

This PR is an extension of @gridbugs' work in #7 (and contains it as first commit), updating it with the current state of Dune package management.

  • It adds a portable lock directory to the project, to make sure the builds use the same versions as when developing. This part is optional; we could move the lock directory into the release builds
  • When a release is created on Github (be it manually or via tools like dune-release) it triggers the release workflow which will use Dune package management to build the project on macOS (AMD64 & ARM64), Ubuntu (AMD64) and Alpine (AMD64, static) using the Github runners and will upload the results to the release that was created. This takes in my testing about 5 minutes on Linux, 10 minutes on macOS ARM64 and 15 minutes on AMD64. Thus the release binaries appear on the release within about 20 minutes.
  • It adds information in the README on how to work with package management or OPAM and links to the relevant documentation in the Dune documentation.

As for demonstration, in our fork of the project I have created a release which has the 2 source archives automatically created by GitHub. Then the release also contains 4 tarballs which were uploaded by the automatically-triggered action run which can be inspected and debugged.

The repository continues to be usable with OPAM as well as without (the recently released Dune 3.22 has a --pkg=disabled flag to disable using package management); packaging for OPAM should also work without issue as container-image.opam uses dune build -p which also disables package management even in the presence of lock directories.

Thanks to @gridbugs who did the majority of the initial work, @Alizter who helped me debug issues with static builds that segfaulted and @Sudha247 who helped to review internally.

Closes #7.

gridbugs and others added 2 commits March 13, 2026 15:52
When a tag is pushed, a github action will build the project using dune
package management and release the binaries under the tag on github.

Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
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.

2 participants