Skip to content

Commit

Permalink
[ci] Pin the ocurrent repository while waiting for a new release
Browse files Browse the repository at this point in the history
  • Loading branch information
mattam82 committed Jan 24, 2025
1 parent 7e4244b commit 6048ba0
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
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.0"

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-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: Pin occurrent to its master branch
run: opam pin add -y https://github.com/ocurrent/ocurrent.git#master

- 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 -- make test

- name: Format code
run: opam exec -- dune build --auto-promote @fmt
if: runner.os == 'Linux'

0 comments on commit 6048ba0

Please sign in to comment.