new changes #356
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: Opam | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
ocaml-compiler: [4.12.1, 4.13.1, 4.14.1] | |
steps: | |
- name: Checkout project | |
uses: actions/[email protected] | |
with: | |
submodules: "recursive" | |
- name: Setup OCaml ${{ matrix.ocaml-compiler }} | |
uses: ocaml/setup-ocaml@v2 | |
if: ${{ startsWith(matrix.os, 'windows-') }} | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
opam-repositories: | | |
opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset | |
default: https://github.com/ocaml/opam-repository.git | |
- name: Setup OCaml ${{ matrix.ocaml-compiler }} | |
uses: ocaml/setup-ocaml@v2 | |
if: ${{ !startsWith(matrix.os, 'windows-') }} | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
- name: Inspect depexts | |
run: | | |
opam exec -- which cmake | |
opam exec -- which gcc | |
opam exec -- which g++ | |
opam exec -- gcc --version | |
opam exec -- g++ --version | |
- name: Install local dependencies | |
run: opam install . --deps-only --with-test | |
- name: Build project | |
run: opam exec -- dune build | |
- name: Run tests | |
run: opam exec -- dune runtest --display=short | |
build_gcc10: | |
name: Test GCC 10 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
ocaml-compiler: [4.14.1] | |
steps: | |
- name: Setup gcc 10 | |
run: | | |
sudo apt update | |
sudo apt install gcc-10 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100 | |
- name: Checkout project | |
uses: actions/[email protected] | |
with: | |
submodules: "recursive" | |
- name: Setup OCaml ${{ matrix.ocaml-compiler }} | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
- name: Inspect depexts | |
run: | | |
opam exec -- which cmake | |
opam exec -- which gcc | |
opam exec -- which g++ | |
opam exec -- gcc --version | |
opam exec -- g++ --version | |
- name: Install local dependencies | |
run: opam install . --deps-only --with-test | |
- name: Build project | |
run: opam exec -- dune build | |
- name: Run tests | |
run: opam exec -- dune runtest --display=short |