name: build on: [push, pull_request] jobs: run: name: Build strategy: matrix: #os: [macos-latest, ubuntu-latest, windows-latest] os: [macos-latest, ubuntu-latest] ocaml: [ '4.08.0', '4.03.0', '4.11.0' ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@main - uses: avsm/setup-ocaml@v1 with: ocaml-version: ${{ matrix.ocaml }} - 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 . if: steps.cache-opam.outputs.cache-hit != 'true' - run: opam depext -yt containers containers-data containers-thread if: steps.cache-opam.outputs.cache-hit != 'true' - run: opam install -t . --deps-only if: ${{ matrix.os == 'ubuntu-latest' }} and ${{ steps.cache-opam.outputs.cache-hit != 'true' }} - run: opam install . --deps-only # no test deps if: ${{ matrix.os != 'ubuntu-latest' }} and ${{ steps.cache-opam.outputs.cache-hit != 'true' }} - run: opam exec -- dune build - run: opam exec -- dune runtest if: ${{ matrix.os == 'ubuntu-latest' }} - run: opam exec -- dune runtest -p containers # test only core on non-ubuntu platform if: ${{ matrix.os != 'ubuntu-latest' }}