diff --git a/HACKING.md b/HACKING.md index d46b1240b5..8d575efd94 100644 --- a/HACKING.md +++ b/HACKING.md @@ -4,6 +4,15 @@ ### Setting up the Project +Before starting to hack you need a properly configured development environment. Linux and macOS are supported and used daily by the core team. System dependencies include: +* Libev: http://software.schmorp.de/pkg/libev.html +* Oniguruma: https://github.com/kkos/oniguruma +* OpenSSL: https://www.openssl.org/ +* GNU Multiple Precision: https://gmplib.org/ +* Git LFS + +The project [`Dockerfile`](./Dockerfile) contains up-to-date system configuration instructions, as used to ship into production. It is written for the Alpine Linux distribution but is meant to be adapted to other environments such as Ubuntu, macOS+Homebrew or others. The GitHub workflow file [`.github/workflows/ci.yml`](.github/workflows/ci.yml) also contains useful commands for Ubuntu and macOS. Since ocaml.org is mostly written in OCaml, a properly configured OCaml development environment is also required, but is not detailed here. Although Docker is used to ship, it is not a requirement to begin hacking. Currently, ocaml.org doesn't yet compile using OCaml 5, version 4.14 of the language is used. + The `Makefile` contains many commands that can get you up and running, a typical workflow will be to clone the repository after forking it. ``` @@ -81,9 +90,11 @@ in ocaml.org and merged as a pull request. ### Deploying -Commits added on `main` are automatically deployed on . +Commits added on some branches are are automatically deployed: +- `main` on . +- `staging` on . -The deployment pipeline is managed in which listens to the `main` branch and builds the site using the `Dockerfile` at the root of the project. +The deployment pipeline is managed in which listens to the `main` and `staging` branches and builds the site using the `Dockerfile` at the root of the project. To test the deployment locally, you can run the following commands: @@ -96,6 +107,8 @@ This will build the docker image and run a docker container with the port `8080` With the docker container running, you can visit the site at . +The docker images automatically build from the `live` and `staging` branches, and are then pushed to Docker Hub: https://hub.docker.com/r/ocurrent/v3.ocaml.org-server + ### Managing dependencies ocaml.org is using an Opam switch which is local and bound to a pinned commit in opam-repository. This is intended to protect the build from upstream regressions. The Opam repository is specified in three (3) places: