mirror of
https://github.com/HypoPG/hypopg
synced 2026-05-24 09:38:21 +00:00
Add support for devel versions in CI and test pg19
Many thanks to Christoph Berg for debugging and fixing the commands for the "devel" version of the package. Co-authored-by: Christoph Berg <myon@debian.org>
This commit is contained in:
parent
a6454522f1
commit
1c8faf49e7
1 changed files with 26 additions and 7 deletions
33
.github/workflows/tests.yml
vendored
33
.github/workflows/tests.yml
vendored
|
|
@ -28,7 +28,8 @@ jobs:
|
|||
"15",
|
||||
"16",
|
||||
"17",
|
||||
"18"
|
||||
"18",
|
||||
"19devel"
|
||||
]
|
||||
os: ["ubuntu-22.04"]
|
||||
|
||||
|
|
@ -37,23 +38,41 @@ jobs:
|
|||
|
||||
- name: Set up prerequisites and environment
|
||||
run: |
|
||||
echo "*********** ENVIRONMENT ************"
|
||||
if [[ "${{ matrix.postgres_major_version }}" == *"devel" ]]; then
|
||||
pg_major=$( echo "${{ matrix.postgres_major_version }}" | grep -Eo "[0-9]+")
|
||||
devel="yes"
|
||||
else
|
||||
pg_major="${{ matrix.postgres_major_version }}"
|
||||
devel="no"
|
||||
fi
|
||||
|
||||
export PG_MAJOR_VERSION=${pg_major}
|
||||
echo "PG_MAJOR_VERSION=$PG_MAJOR_VERSION" >> $GITHUB_ENV
|
||||
echo "MAKEFLAGS=$MAKEFLAGS -j $(grep -c ^processor /proc/cpuinfo)" >> $GITHUB_ENV
|
||||
echo ""
|
||||
|
||||
echo "************ CLEAN IMAGE ***********"
|
||||
sudo apt remove -y '^postgres.*' '^libpq.*'
|
||||
echo ""
|
||||
|
||||
echo "********* REPOSITORY SET UP ********"
|
||||
sudo apt-get install -y wget gnupg
|
||||
|
||||
if [[ "${devel}" == "yes" ]]; then
|
||||
sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg-snapshot main ${PG_MAJOR_VERSION}"
|
||||
fi
|
||||
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
||||
|
||||
# pin the pgdg repository with higher priority than the OS (500)
|
||||
echo "Package: *" | sudo tee /etc/apt/preferences.d/pgdg.pref
|
||||
echo "Pin: release o=apt.postgresql.org" | sudo tee -a /etc/apt/preferences.d/pgdg.pref
|
||||
echo "Pin-Priority: 800" | sudo tee -a /etc/apt/preferences.d/pgdg.pref
|
||||
|
||||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
||||
sudo apt-get update -y -qq --fix-missing
|
||||
echo ""
|
||||
|
||||
echo "*********** ENVIRONMENT ************"
|
||||
export PG_MAJOR_VERSION=${{ matrix.postgres_major_version }}
|
||||
echo "PG_MAJOR_VERSION=$PG_MAJOR_VERSION" >> $GITHUB_ENV
|
||||
echo "MAKEFLAGS=$MAKEFLAGS -j $(grep -c ^processor /proc/cpuinfo)" >> $GITHUB_ENV
|
||||
echo ""
|
||||
|
||||
echo "******** INSTALL POSTGRES **********"
|
||||
sudo apt-get install -y \
|
||||
postgresql-$PG_MAJOR_VERSION \
|
||||
|
|
|
|||
Loading…
Reference in a new issue