This document assumes you have OPAM installed.
To start building this project you will need to install the packages it depends on. To do so, run the following command:
$ opam install . --deps-only -t
This project uses dune as its build system. The
Makefile in this repo provides shorter commands over the dune
commands.
To build the project, run make
or make build
.
make test
will build and run the tests in the current OPAM switch.
make clean
can be used to clean up the build artifacts.
Before cutting a release, it is useful to test this project against all the
supported OCaml versions. make all-supported-ocaml-versions
will do just that,
but requires some setting up beforehand. The instructions are as follows:
- The
dune-workspace.dev
defines all the OPAM switches that will be tested when runningmake all-supported-ocaml-versions
. Make sure you have switches for all those OCaml version, with the appropriate names (e.g., for the build context that(context (opam (switch 4.07.1)))
defines, make sure you have a switch named4.07.1
. To find out which OPAM switches you have, runopam switch list
). - For every OPAM switch listed in the Dune workspace file, switch into it and run the installation command at the top of this document.
- Finally, you can now run
make all-supported-ocaml-versions
, which will build and test this project against all those OCaml versions.
- WIP