From 6a550c8b521557b7f871d3ab4f213b802cacdb57 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Mon, 26 Apr 2021 15:36:58 -0700 Subject: [PATCH] Added Mac to CI --- .github/workflows/build.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3205ccf..cba8314 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,22 +3,37 @@ on: [push, pull_request] jobs: build: if: "!contains(github.event.head_commit.message, '[skip ci]')" - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: + os: [ubuntu-latest] postgres: [13, 12, 11, 10, 9.6] + include: + - os: macos-latest + postgres: 13 steps: - uses: actions/checkout@v2 - uses: ankane/setup-postgres@v1 with: postgres-version: ${{ matrix.postgres }} - - run: sudo apt-get update && sudo apt-get install postgresql-server-dev-${{ matrix.postgres }} libipc-run-perl + - if: ${{ startsWith(matrix.os, 'ubuntu') }} + run: sudo apt-get update && sudo apt-get install postgresql-server-dev-${{ matrix.postgres }} libipc-run-perl - run: make - - run: | + - if: ${{ startsWith(matrix.os, 'ubuntu') }} + run: | export PG_CONFIG=`which pg_config` sudo --preserve-env=PG_CONFIG make install + - if: ${{ startsWith(matrix.os, 'macos') }} + run: make install - run: make installcheck - if: ${{ failure() }} run: cat regression.diffs - - run: make prove_installcheck + - if: ${{ startsWith(matrix.os, 'ubuntu') }} + run: make prove_installcheck + - if: ${{ startsWith(matrix.os, 'macos') }} + run: | + brew install cpanm && cpanm IPC::Run + wget -q https://github.com/postgres/postgres/archive/refs/tags/REL_13_2.tar.gz + tar xf REL_13_2.tar.gz + make prove_installcheck PROVE=prove PERL5LIB=postgres-REL_13_2/src/test/perl