From 3b290d524ca3d7811633008b913f93bb467f87db Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 24 Aug 2022 17:06:30 +0200 Subject: [PATCH] Add a CI check for building with Cabal The idea is that this ensures 1. that it's easy for contributers to hack on PostgREST without getting nix set up 2. we see things break more easily outside the very controlled nix environment (e.g. it would be easy to add a GHC 9.4.2 build here) --- .github/workflows/ci.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e1e8aa49fd..b43e59c169 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -211,6 +211,33 @@ jobs: path: postgrest if-no-files-found: error + Build-Cabal: + strategy: + matrix: + ghc: ['8.10.7', '9.2.4'] + fail-fast: false + name: Build Linux (Cabal, GHC ${{ matrix.ghc }}) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: ghcup + run: | + ghcup install ghc ${{ matrix.ghc }} + ghcup set ghc ${{ matrix.ghc }} + - name: Cache + uses: actions/cache@v3 + with: + path: ~/.cabal + key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.ghc }}- + - name: Install dependencies + run: | + cabal update + cabal build --only-dependencies --enable-tests --enable-benchmarks + - name: Build + run: cabal build --enable-tests --enable-benchmarks all + Build-Cabal-Arm: name: Build aarch64 (Cabal) if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/rel-') }}