Skip to content

plr CI - comment out matid: 10 - was a DUPLICATE #749

plr CI - comment out matid: 10 - was a DUPLICATE

plr CI - comment out matid: 10 - was a DUPLICATE #749

Workflow file for this run

name: plr CI
run-name: plr CI - ${{ github.event.head_commit.message }}
on: [push, pull_request, workflow_dispatch]
jobs:
master:
runs-on: ubuntu-latest
steps:
- name: Echo site details
run: echo building master
- name: Checkout code
uses: actions/checkout@v3
- name: checkout postgres
run: |
sudo apt-get update -qq
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
sudo apt-get install -qq r-base-dev acl bison flex libssl-dev
sudo R --version
sudo /etc/init.d/postgresql stop
sudo apt-get remove --purge postgresql\*
sudo rm -rf /etc/postgresql /var/lib/postgresql
git clone --depth=1 https://github.com/postgres/postgres.git
pushd postgres
./configure
make -j4
sudo make install
export PATH=/usr/local/pgsql/bin:$PATH
initdb -D data
pg_ctl -D data -l logfile start
popd
- name: Script
run: |
export USE_PGXS=1
export PATH=/usr/local/pgsql/bin:$PATH
SHLIB_LINK=-lgcov PG_CPPFLAGS="-fprofile-arcs -ftest-coverage -O0" make
# USE_PGXS=1 is not required in Travis, and it is required in Github Actions
sudo USE_PGXS=1 PATH=/usr/local/pgsql/bin:$PATH make install
psql --version
R --version
make installcheck || (cat regression.diffs && false)
env:
USE_PGXS: 1
REL_17_:
runs-on: ubuntu-latest
steps:
- name: Echo site details
run: echo building master
- name: Checkout code
uses: actions/checkout@v4
- name: checkout postgres
run: |
set -x -v -e
sudo apt-get update -qq
sudo apt-get install -qq r-base-dev acl bison flex libssl-dev
sudo R --version
sudo /etc/init.d/postgresql stop
sudo apt-get remove --purge postgresql\*
sudo rm -rf /etc/postgresql /var/lib/postgresql
export RET=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -c 'REL_17_[0-9]')
if [ "${RET}" -gt "0" ]
then
echo -n "Release(s) are found. Taking the last Release . . . "
export GITTAG=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -e 'REL_17_[0-9]' | tail -n 1)
else
echo "Release(s) are not found. Trying Release Candidates."
export RET=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -c 'REL_17_RC[0-9]')
if [ "${RET}" -gt "0" ]
then
echo -n "Release Candidate(s) are found. Taking the last Release Candidate . . . "
export GITTAG=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -e 'REL_17_RC[0-9]' | tail -n 1)
else
echo "Release Candidate(s) are not found. Trying Betas."
export RET=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -c 'REL_17_BETA[0-9]')
if [ "${RET}" -gt "0" ]
then
echo -n "Beta(s) are found. Taking the last Beta . . . "
export GITTAG=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -e 'REL_17_BETA[0-9]' | tail -n 1)
else
echo "Beta(s) are not found."
fi
fi
fi
echo $GITTAG
git clone --branch $GITTAG --depth=1 https://github.com/postgres/postgres.git
pushd postgres
./configure
make
sudo make install
export PATH=/usr/local/pgsql/bin:$PATH
initdb -D data
pg_ctl -D data -l logfile start
popd
- name: Script
run: |
set -x -v -e
export USE_PGXS=1
export PATH=/usr/local/pgsql/bin:$PATH
SHLIB_LINK=-lgcov PG_CPPFLAGS="-fprofile-arcs -ftest-coverage -O0" make
# USE_PGXS=1 is not required in Travis, and it is required in Github Actions
sudo USE_PGXS=1 PATH=/usr/local/pgsql/bin:$PATH make install
psql --version
make installcheck || (cat regression.diffs && false)
env:
USE_PGXS: 1
build:
runs-on: ubuntu-latest
env:
PG: ${{ matrix.pg }}
strategy:
matrix:
include:
# SEEN JUL 2024
# Ubuntu 22.04 ubuntu-latest
# https://github.com/actions/runner-images
# jammy (22.04, LTS)
# https://wiki.postgresql.org/wiki/Apt
# https://apt.postgresql.org/pub/repos/apt/dists/
# https://apt.postgresql.org/pub/repos/apt/dists/jammy-pgdg/
# Source: postgresql-??
# https://apt.postgresql.org/pub/repos/apt/dists/jammy-pgdg/main/binary-amd64/Packages
- pg: 16
- pg: 15
- pg: 14
- pg: 13
- pg: 12
- pg: 11
- pg: 10
steps:
- name: Echo site details
run: echo PG $PG
- name: Checkout code
uses: actions/checkout@v4
- name: Before Script
run: |
echo Building plr with PostgreSQL $PG
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update -qq
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
sudo apt-get install -qq r-base-dev acl
sudo /etc/init.d/postgresql stop
sudo apt-get remove --purge postgresql\*
sudo rm -rf /etc/postgresql /var/lib/postgresql
sudo apt-get install postgresql-$PG
sudo apt-get install postgresql-server-dev-$PG
echo 'local all postgres trust' | sudo tee /etc/postgresql/$PG/main/pg_hba.conf > /dev/null
# Builds under "runner"
# Github Actions require elevated priviledges
sudo setfacl -Rm u:postgres:rwx,d:u:runner:rwx /home/runner
sudo pg_ctlcluster $PG main reload
- name: Script
run: |
sudo pg_lsclusters
export USE_PGXS=1
SHLIB_LINK=-lgcov PG_CPPFLAGS="-fprofile-arcs -ftest-coverage -O0" make
# USE_PGXS=1 is not required in Travis, and it is required in Github Actions
sudo USE_PGXS=1 make install
/usr/lib/postgresql/$PG/bin/pg_config
psql --version
R --version
make installcheck PGUSER=postgres || (cat regression.diffs && false)
- name: After Success
# success() returns true, when none of the previous steps have failed or been canceled.
if: ${{ success() }}
# Uploads code coverage to codecov.io
run: bash <(curl -s https://codecov.io/bash)