From 9fe414f793c9966734272b2274a3f83dbe18b255 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 5 Aug 2020 14:05:12 -0400 Subject: [PATCH] chore: small refactor of github actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sadly the matrix thing is not expressive enough to use a given switch only on a given OS (like, windows + mingw32). So, 🤷 --- .github/workflows/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4c6a1994..74787458 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,22 +3,22 @@ on: [push] jobs: run: name: Build - runs-on: ${{ matrix.operating-system }} strategy: matrix: - operating-system: [macos-latest, ubuntu-latest, windows-latest] - ocaml-version: [ '4.08.0' ] + os: [macos-latest, ubuntu-latest, windows-latest] + ocaml: [ '4.08.0' ] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@main - uses: avsm/setup-ocaml@master with: - ocaml-version: ${{ matrix.ocaml-version }} + ocaml-version: ${{ matrix.ocaml }} - run: opam pin -n . - run: opam depext -yt containers containers-data containers-thread - run: opam install -t . --deps-only - if: ${{ matrix.operating-system != 'windows-latest' }} + if: ${{ matrix.os != 'windows-latest' }} - run: opam install . --deps-only # no test deps - if: ${{ matrix.operating-system == 'windows-latest' }} + if: ${{ matrix.os == 'windows-latest' }} - run: opam exec -- dune build - run: opam exec -- dune runtest - if: ${{ matrix.operating-system != 'windows-latest' }} + if: ${{ matrix.os != 'windows-latest' }}