Skip to content

Update the CI and deployment to OCaml 5.2.1, Alpine 2.21, opam 2.3, and use BuildKit syntax in the Dockerfile #8151

Update the CI and deployment to OCaml 5.2.1, Alpine 2.21, opam 2.3, and use BuildKit syntax in the Dockerfile

Update the CI and deployment to OCaml 5.2.1, Alpine 2.21, opam 2.3, and use BuildKit syntax in the Dockerfile #8151

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON
workflow_dispatch:
jobs:
build:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
ocaml-compiler:
- "5.2"
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: ${{ matrix.os != 'macos-latest' }}
opam-repositories: |
pin: git+https://github.com/ocaml/opam-repository#2c9566f0b0de5ab6dad7ce8d22b68a2999a1861f
opam-disable-sandboxing: true
- name: Install system dependencies (Linux)
run: sudo apt update && sudo apt-get install libev-dev libonig-dev libcurl4-openssl-dev
if: runner.os == 'Linux'
- name: Install system dependencies (macOS)
run: brew update && brew reinstall libev openssl@3 # Openssl is a workaround for https://github.com/ocaml/opam-repository/issues/19676
if: runner.os == 'macOS'
- name: Install opam dependencies
run: opam install --deps-only --with-test .
- name: Install ocamlformat
run: opam install ocamlformat.0.26.2
- name: Build project
run: opam exec -- dune build @install
- name: Run tests
run: opam exec -- dune test
- name: Format code
run: opam exec -- dune build --auto-promote @fmt
if: runner.os == 'Linux'