Skip to content

Add CI for pg12/13 per #259 #69

Add CI for pg12/13 per #259

Add CI for pg12/13 per #259 #69

Workflow file for this run

# GitHub Actions for OGR-FDW
#
# Paul Ramsey <pramsey at cleverelephant dot ca>
name: "CI"
on:
push:
# branches-ignore:
# - 'master'
pull_request: ~
jobs:
linux:
name: "CI"
strategy:
fail-fast: false
matrix:
ci:
- { PGVER: 11 }
- { PGVER: 12 }
- { PGVER: 13 }
- { PGVER: 14 }
- { PGVER: 15 }
- { PGVER: 16 }
- { PGVER: 17 }
runs-on: ubuntu-latest
steps:
- name: 'Check Out'
uses: actions/checkout@v4
- name: 'Raise Priority for apt.postgresql.org'
run: |
cat << EOF >> ./pgdg.pref
Package: *
Pin: release o=apt.postgresql.org
Pin-Priority: 600
EOF
sudo mv ./pgdg.pref /etc/apt/preferences.d/
sudo apt update
- name: 'Install GDAL'
run: |
sudo apt-get install libgdal-dev
- name: 'Install PostgreSQL'
run: |
sudo apt-get purge postgresql-*
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg-snapshot main ${{ matrix.ci.PGVER }}" > /etc/apt/sources.list.d/pgdg.list'
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sudo apt-get update
sudo apt-get -y install postgresql-${{ matrix.ci.PGVER }} postgresql-server-dev-${{ matrix.ci.PGVER }}
- name: 'Start PostgreSQL'
run: |
export PGVER=${{ matrix.ci.PGVER }}
export PGDATA=/var/lib/postgresql/$PGVER/main
export PGETC=/etc/postgresql/$PGVER/main
export PGBIN=/usr/lib/postgresql/$PGVER/bin
export RUNNER_USER=`whoami`
# make sure postgres user can access data files
sudo chmod -R 755 /home/${RUNNER_USER}
sudo cp ./ci/pg_hba.conf $PGETC/pg_hba.conf
sudo systemctl stop postgresql
sudo pg_ctlcluster $PGVER main start
sudo pg_lsclusters
- name: 'Build & Test'
run: |
export PATH=/usr/lib/postgresql/${{ matrix.ci.PGVER }}/bin/:$PATH
PG_CFLAGS=-Werror make
sudo make install
PGUSER=postgres make installcheck || (cat regression.diffs && /bin/false)