Artifact For Rio's Operational Semantics #137
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Format | |
on: | |
push: | |
pull_request: | |
branches: [main] | |
# Ensures that only the latest commit of a PR can execute the actions. | |
# Useful for cancelling job when a sequence of commits are quickly added. | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set-up OCaml | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: 5 | |
- name: Install ocamlformat | |
working-directory: rio | |
run: opam install ocamlformat | |
- name: Check format | |
working-directory: rio | |
run: | | |
[ $(opam exec -- dune fmt 2> >(wc -c)) -eq 0 ] | |