Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Add shell script that builds dune and makes tarball#12

Merged
gridbugs merged 1 commit intoocaml-dune:mainfrom
gridbugs:make-tarball-script
Aug 12, 2025
Merged

Add shell script that builds dune and makes tarball#12
gridbugs merged 1 commit intoocaml-dune:mainfrom
gridbugs:make-tarball-script

Conversation

@gridbugs
Copy link
Contributor

This makes it easier to test the binary distro offline since the tarball has the same logic as the release github action (which now just runs the script). This also makes it more reliable to test the build and packaging process since the script can be run from a test setting, so this change also introduces a github action that runs such a test.

@gridbugs gridbugs requested a review from Sudha247 August 12, 2025 01:45
@gridbugs gridbugs force-pushed the make-tarball-script branch 7 times, most recently from 88df2e4 to fbedf11 Compare August 12, 2025 02:26
Copy link
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.

Nice shell scripts :)

Comment on lines +8 to +11
echo "TARGET is the nix target that gets built. It should be one of:"
echo " - .#dune.dynamic (builds a dynamically-linked dune executable)"
echo " - .#dune.static (builds a statically-linked dune executable)"
exit 1
Copy link
Member

Choose a reason for hiding this comment

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

For my own edification, where is the logic that will actually make this decision based on the value of TARGET? Searching this repo for those strings didn't seem to turn anything up for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's in the github action in the file .github/workflows/build.yml.

Copy link
Member

Choose a reason for hiding this comment

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

Oh yes. That I saw. Perhaps that intended usage shoukd be noted here then? There is nothing about this script itself as is that lets readers of the file know it has a coupling like that with the GitHub workflow.

@gridbugs gridbugs force-pushed the make-tarball-script branch 3 times, most recently from 70b4014 to 4f13911 Compare August 12, 2025 03:30
This makes it easier to test the binary distro offline since the tarball
has the same logic as the release github action (which now just runs the
script). This also makes it more reliable to test the build and
packaging process since the script can be run from a test setting, so
this change also introduces a github action that runs such a test.

Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
@gridbugs gridbugs force-pushed the make-tarball-script branch from 4f13911 to 973c8e1 Compare August 12, 2025 03:32
@gridbugs gridbugs merged commit c1dfd58 into ocaml-dune:main Aug 12, 2025
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants