diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9f99e3..1dd9d29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: - { PGVER: 13 } - { PGVER: 14 } - { PGVER: 15 } - # - { PGVER: 16 } + - { PGVER: 16 } runs-on: ubuntu-latest steps: @@ -27,14 +27,23 @@ jobs: - name: 'Check Out' uses: actions/checkout@v3 + - name: 'Force apt.postgresql.org to have higher priority' + run: | + cat << EOF >> ./pgdg.pref + Package: * + Pin: release o=apt.postgresql.org + Pin-Priority: 600 + EOF + sudo cp ./pgdg.pref /etc/apt/preferences.d/ + sudo apt update + - name: 'Install GDAL' run: | - sudo add-apt-repository ppa:ubuntugis/ppa - sudo apt-get update 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 @@ -45,10 +54,16 @@ jobs: export PGDATA=/var/lib/postgresql/${{ matrix.ci.PGVER }}/main export PGETC=/etc/postgresql/${{ matrix.ci.PGVER }}/main export PGBIN=/usr/lib/postgresql/${{ matrix.ci.PGVER }}/bin + export RUNNER_USER=`whoami` + sudo chmod -R 755 /home/${RUNNER_USER} # sudo su postgres -c "$PGBIN/pg_ctl --pgdata $PGDATA stop" # sudo $PGBIN/pg_ctlcluster ${{ matrix.ci.PGVER }} main stop sudo cp ./ci/pg_hba.conf $PGETC/pg_hba.conf - sudo su postgres -c "$PGBIN/pg_ctl --pgdata $PGDATA start -o '-c config_file=$PGETC/postgresql.conf -p 5432'" + sudo systemctl stop postgresql + sudo pg_ctlcluster ${{ matrix.ci.PGVER }} main start + sudo pg_lsclusters + #sudo systemctl restart postgresql + #sudo su postgres -c "$PGBIN/pg_ctl --pgdata $PGDATA start -o '-c config_file=$PGETC/postgresql.conf -p 5432'" - name: 'Build & Test' run: | @@ -56,5 +71,3 @@ jobs: PG_CFLAGS=-Werror make sudo make install PGUSER=postgres make installcheck || (cat regression.diffs && /bin/false) - -