From c0fee97f64ca4cb57bcb972efb108b1f1f36f4c5 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 24 Aug 2022 17:06:16 +0200 Subject: [PATCH 1/2] Consistently use the same checkout action --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c706abd730..e1e8aa49fd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -220,7 +220,7 @@ jobs: env: GITHUB_COMMIT: ${{ github.sha }} steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3 - id: Remote-Dir name: Unique directory name for the remote build run: echo "::set-output name=remotepath::postgrest-build-$(uuidgen)" From 5cbabfa6c72cb4a9b0ad53758d8fa5ddf02e7755 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 24 Aug 2022 17:06:30 +0200 Subject: [PATCH 2/2] 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-') }}