setup-ocaml 3.0.14 (#93) #130
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: CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build and test on ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-20.04 | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: "Windows: Set git to use LF" | |
if: runner.os == 'Windows' | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Use Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Use OCaml 4.14.1 | |
uses: ocaml/[email protected] | |
with: | |
ocaml-compiler: 4.14.1 | |
opam-pin: false | |
- name: OPAM install | |
run: opam install . --deps-only --with-test | |
- name: Check format | |
run: opam exec -- dune build @fmt | |
- name: Build | |
run: opam exec -- dune build | |
- name: Test | |
run: opam exec -- dune runtest | |
- name: (release only) Get artifact | |
id: get_artifact | |
if: github.event_name != 'pull_request' | |
run: node .github/workflows/get_artifact.js | |
- name: (release only) Upload artifact ${{ matrix.os }} | |
if: github.event_name != 'pull_request' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.get_artifact.outputs.artifact_name }} | |
path: ${{ steps.get_artifact.outputs.exe_name }} |