Skip to content

add ocamlformat github action #1

add ocamlformat github action

add ocamlformat github action #1

Workflow file for this run

name: ocamlformat
on: [push, pull_request]
jobs:
format:
name: ocamlformat
strategy:
fail-fast: false
matrix:
ocaml-version: ["4.14.2"]
operating-system: [ubuntu-latest]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use OCaml ${{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-version }}
- name: Install ocamlformat
run: opam install ocamlformat
- name: Format code
run: |
find . -name \*\.ml | xargs ocamlformat --inplace
git diff --quiet
- name: Build
run: |
opam install -y mirage
mirage configure -t hvt
make