From 1031dc3872737f9a96d094c7d6b3fdb6470a22c6 Mon Sep 17 00:00:00 2001 From: Dmitry Ivanov Date: Tue, 17 Nov 2020 01:15:20 +0100 Subject: [PATCH] Run CI job in a FreeBSD VM (#322) * Run CI job in a FreeBSD VM * Explanation why the freebsd job is running on macOS --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69482857d..2566985cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,8 @@ jobs: path: | ${{ steps.setup-haskell-cabal.outputs.cabal-store }} dist-newstyle + tests/dist-newstyle + bench/dist-newstyle key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} restore-keys: | ${{ runner.os }}-${{ matrix.ghc }}- @@ -50,3 +52,25 @@ jobs: cd bench cabal bench -O0 --benchmark-options "--quick --min-duration=0 --include-first-iter" + build-freebsd: + # This job intentionally is using macOS because at the time of the writing + # Linux and Windows environments don't have the necessary virtualization features. + # See https://github.com/vmactions/freebsd-vm#under-the-hood. + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - name: Build + id: build-freebsd + uses: vmactions/freebsd-vm@v0.0.8 + with: + usesh: true + prepare: pkg install -y ghc hs-cabal-install + run: | + freebsd-version + cabal update + cabal build + (cd tests; cabal test) + (cd bench; cabal bench -O0 --benchmark-options "--quick --min-duration=0 --include-first-iter") + cabal haddock + cabal sdist all +