mirror of
https://github.com/c-cube/iter.git
synced 2025-12-06 11:15:32 -05:00
chore: update CI to use ocaml actions v2
This commit is contained in:
parent
0d2cc1c01e
commit
7244b2eb5e
1 changed files with 19 additions and 18 deletions
37
.github/workflows/main.yml
vendored
37
.github/workflows/main.yml
vendored
|
|
@ -1,32 +1,33 @@
|
||||||
name: build
|
name: build
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
name: Build
|
name: Build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
os:
|
||||||
ocaml: [ '4.08.0', '4.03.0', '4.11.0' ]
|
- macos-latest
|
||||||
|
- ubuntu-latest
|
||||||
|
- windows-latest
|
||||||
|
ocaml-compiler:
|
||||||
|
- 4.03.x
|
||||||
|
- 4.08.x
|
||||||
|
- 4.12.x
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@v2
|
||||||
- uses: avsm/setup-ocaml@v1
|
- uses: ocaml/setup-ocaml@v2
|
||||||
with:
|
with:
|
||||||
ocaml-version: ${{ matrix.ocaml }}
|
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
||||||
- name: cache opam
|
|
||||||
id: cache-opam
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: _opam
|
|
||||||
key: opam-${{matrix.operating-system}}-${{matrix.ocaml-version}}
|
|
||||||
- run: opam pin -n .
|
- run: opam pin -n .
|
||||||
if: steps.cache-opam.outputs.cache-hit != 'true'
|
|
||||||
- run: opam depext -yt iter
|
- run: opam depext -yt iter
|
||||||
if: steps.cache-opam.outputs.cache-hit != 'true'
|
|
||||||
- run: opam install -t . --deps-only
|
- run: opam install -t . --deps-only
|
||||||
if: ${{ matrix.os != 'windows-latest' }} and ${{ steps.cache-opam.outputs.cache-hit != 'true' }}
|
|
||||||
- run: opam install . --deps-only # no test deps
|
|
||||||
if: ${{ matrix.os == 'windows-latest' }} and ${{ steps.cache-opam.outputs.cache-hit != 'true' }}
|
|
||||||
- run: opam exec -- dune build
|
- run: opam exec -- dune build
|
||||||
- run: opam exec -- dune runtest
|
- run: opam exec -- dune runtest
|
||||||
if: ${{ matrix.os != 'windows-latest' }}
|
if: ${{ matrix.os == 'ubuntu-latest'}}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue