This is a webpage for dune binaries distribution of Dune developer Preview.
The page is automatically generated from file metadata.json. Apart from the
YAML part, the code is written in OCaml.
The GitHub Actions pipeline regularly creates commit on the main branch where
it:
- updates the content of
metadata.json - updates the content of
index.html - generates new artifacts and pushes them to their SSH storage using
RClone
The web page is deployed on dune.ci.dev.
⌛ The pipeline is triggered every day at 01:00 UTC.
Caution
The metadata.json file must not be modified manually. If you do so, expect some unexpected behaviours.
You need to have opam available to install and build the project.
The OCaml code is stored in the sandworm directory. Install the dependencies with the following commands:
$ cd sandworm/
$ opam install . --deps-only --with-dev-setupPlease note that --with-dev-setup should only be used for a development
purpose.
The configuration is in sandworm/bin/config.ml
file. When running in the pipeline, the sandworm binary is generated before
its execution. As a result, the path taken is the root of this repository. If
you want to run it locally, make sure the files artifacts and rclone.conf
are available in the directory where sandworm binary is executed.
The export relies on an SSH key to the server. If you want to run your own
tests, you need to have a server available by SSH with an SSH key. Then,
you have to create a rclone.conf file as follows:
[dune-binary-distribution]
type = sftp
user = <username>
host = <replace.myhost.com>
key_file = </path/to/your/ssh/private/key>
shell_type = unixIf you don't have a /dune directory on your server, you might want to change
the s3_bucket_ref variable. It could be:
let s3_bucket_ref = "dune-binary-distribution:/path/to/your/server/dir"Tip
For our use case, the RClone configuration works with SFTP but, it is compatible with any RClone provider.
Now your setup is ready, you can execute this list of commands to generate or update the files:
$ cd sandworm
$ dune build
$ cd ../
$ ls
artifacts rclone.conf
$ ./sandworm/_build/install/default/bin/sandwormThe deployment are automatically done through GitHub Actions. No need to add extra work to deploy it.
This schema provides explanations about the workflow used to build the binaries and the certificates, and export them to the correct server.