Skip to content

Latest commit

 

History

History
95 lines (69 loc) · 2.28 KB

CONTRIBUTING.md

File metadata and controls

95 lines (69 loc) · 2.28 KB

Contributing

Setup your development environment

You need Opam, you can install it by following Opam's documentation.

With Opam installed, you can install the dependencies with:

make deps

Then, build the project with:

make build

Running Binary

After building the project, you can run the main binary that is produced.

make start

Running Tests

You can run the test compiled executable:

make test

Building documentation

Documentation for the libraries in the project can be generated with:

make doc
open-cli $(make doc-path)

This assumes you have a command like open-cli installed on your system.

NOTE: On macOS, you can use the system command open, for instance open $(make doc-path)

Releasing

To release prebuilt binaries to all platforms, we use GitHub Actions to build each binary individually.

The binaries are then uploaded to a GitHub Release.

To trigger the Release workflow, you need to push a git tag to the repository. We provide a script that will bump the version of the project, tag the commit and push it to GitHub:

make release

The script will release the current project version on Opam, update the documentation and push a new tag on GitHub.

Repository Structure

The following snippet describes Spin's repository structure.

.
├── .github/
|   Contains GitHub specific files such as actions definitions and issue templates.
│
├── bin/
|   Source for Spin's binary. This links to the library defined in `lib/`.
│
├── lib/
|   Source for Spin's library. Contains Spin's core functionnalities.
│
├── test/
|   Unit tests and integration tests for Spin.
│
├── dune-project
|   Dune file used to mark the root of the project and define project-wide parameters.
|   For the documentation of the syntax, see https://dune.readthedocs.io/en/stable/dune-files.html#dune-project
│
├── LICENSE
│
├── Makefile
|   Make file containing common development command.
│
├── README.md
│
└── spin.opam
    Opam package definition.
    To know more about creating and publishing opam packages, see https://opam.ocaml.org/doc/Packaging.html.