mirror of
https://github.com/pgpointcloud/pointcloud.git
synced 2026-01-25 16:25:49 +00:00
Add Test for PG16
Note other changes needed to be made for this:
- Add new postgres16, it's misnamed as moment, cause it doesn't have
postgis yet
- Change postgresql_postgis.sh to:
- Use trusted instead of apt-key which is deprecated
- Added a condition to postgresql_postgis.sh to skip PostGIS
install if no PostGIS version is specified
Since PostGIS is not yet available in
apt.postgresql.org repo for PG16
- Use pgdg-snapshot instead of main
repo except for PG12
(it has all stable branches and main)
- For PG12, jsut continue to use main repo,
since PostGIS 2.5 is not carried in snapshot
This commit is contained in:
parent
553a137543
commit
35fb903c0f
31
.github/scripts/postgresql_postgis.sh
vendored
31
.github/scripts/postgresql_postgis.sh
vendored
@ -2,11 +2,34 @@
|
||||
|
||||
set -e
|
||||
|
||||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
||||
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main $POSTGRESQL_VERSION" |sudo tee /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
|
||||
|
||||
if ["$POSTGRESQL_VERSION" = "12"];
|
||||
then
|
||||
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main $POSTGRESQL_VERSION" |sudo tee /etc/apt/sources.list.d/pgdg.list
|
||||
else
|
||||
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg-snapshot main $POSTGRESQL_VERSION" |sudo tee /etc/apt/sources.list.d/pgdg.list
|
||||
fi
|
||||
|
||||
# RAISE priority of pgdg
|
||||
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
|
||||
sudo apt-get update
|
||||
sudo apt-get --purge remove postgresql\*
|
||||
sudo apt-get install -q postgresql-server-dev-$POSTGRESQL_VERSION postgresql-client-$POSTGRESQL_VERSION postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION libcunit1-dev valgrind g++
|
||||
sudo apt-get purge postgresql-*
|
||||
sudo apt-get install -q postgresql-$POSTGRESQL_VERSION postgresql-server-dev-$POSTGRESQL_VERSION postgresql-client-$POSTGRESQL_VERSION libcunit1-dev valgrind g++
|
||||
|
||||
if [ -z "$POSTGIS_VERSION" ]
|
||||
then
|
||||
echo "No PostGIS version specified, skipping install of PostGIS"
|
||||
else
|
||||
sudo apt-get install postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION
|
||||
fi
|
||||
|
||||
sudo pg_dropcluster --stop $POSTGRESQL_VERSION main
|
||||
sudo rm -rf /etc/postgresql/$POSTGRESQL_VERSION /var/lib/postgresql/$POSTGRESQL_VERSION
|
||||
sudo pg_createcluster -u postgres $POSTGRESQL_VERSION main --start -- --auth-local trust --auth-host trust
|
||||
|
||||
28
.github/workflows/jammy_postgres16_postgis3.yml
vendored
Normal file
28
.github/workflows/jammy_postgres16_postgis3.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
name: "[ubuntu-22.04] PostgreSQL 16 and PostGIS 3"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Building and testing
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v2
|
||||
- name: Install PostgreSQL and PostGIS
|
||||
env:
|
||||
POSTGRESQL_VERSION: 16
|
||||
#POSTGIS_VERSION: 3
|
||||
run: .github/scripts/postgresql_postgis.sh
|
||||
- name: Install and check PgPointCloud
|
||||
run: .github/scripts/pgpointcloud.sh
|
||||
- name: Error
|
||||
if: ${{ failure() }}
|
||||
run: cat pgsql/regression.diffs
|
||||
- name: Dump and restore tests
|
||||
run: .github/scripts/test_dump_restore.sh
|
||||
Loading…
x
Reference in New Issue
Block a user