Skip to content

pg_tle CI

pg_tle CI #555

Workflow file for this run

name: pg_tle CI
on:
schedule:
# Runs every day at 5am.
- cron: '0 5 * * *'
push:
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'
workflow_dispatch:
jobs:
test:
defaults:
run:
shell: sh
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
version: [master, REL_17_STABLE, REL_16_STABLE, REL_15_STABLE, REL_14_STABLE, REL_13_STABLE, REL_12_STABLE, REL_11_STABLE]
runs-on: ${{ matrix.os }}
timeout-minutes: 120
steps:
- name: Checkout pg_tle
uses: actions/checkout@v4
with:
path: pg_tle
- name: Checkout Postgres
run: |
sudo apt-get -y -q update
sudo apt-get -y -q install libperl-dev libipc-run-perl
git clone --branch ${{ matrix.version }} https://github.com/postgres/postgres.git
- name: Build Postgres
run: |
cd postgres
sh configure --prefix=$PWD/inst/ --enable-debug --enable-cassert --enable-tap-tests --with-openssl --with-perl CFLAGS="-ggdb3 -O0"
make -j4 install
# Install extensions
make -C contrib install
- if: ${{ matrix.version == 'master' }}
name: Check pg_tle code indentation (master only)
run: |
cd postgres
make -C src/tools/pg_bsd_indent/ -j4 install
src/tools/pgindent/pgindent --indent=$GITHUB_WORKSPACE/postgres/src/tools/pg_bsd_indent/pg_bsd_indent --diff $GITHUB_WORKSPACE/pg_tle > pgindent.diffs
test -s pgindent.diffs && cat pgindent.diffs && exit 1 || exit 0
- name: Build pg_tle
run: |
cd pg_tle
export PATH=$GITHUB_WORKSPACE/postgres/inst/bin:"$PATH"
make PROFILE="-Wall -Wmissing-prototypes -Werror=maybe-uninitialized -Werror" -j4 all install
- name: Run pg_tle tests
run: |
export PATH=$GITHUB_WORKSPACE/postgres/inst/bin:"$PATH"
postgres/inst/bin/initdb -D postgres/inst/bin/data
echo "shared_preload_libraries = 'pg_tle'" >> postgres/inst/bin/data/postgresql.conf
postgres/inst/bin/pg_ctl -D postgres/inst/bin/data -l postgres/inst/bin/logfile start
cd pg_tle
PERL5LIB="postgres/src/test/perl:${PERL5LIB}" make installcheck
- name: Show pg_tle core tests diff
if: ${{ failure() }}
run: |
cat pg_tle/regression.diffs
- name: Upload test artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-artifact-${{ matrix.os }}-${{ matrix.version }}
path: |
postgres/pgindent.diffs
pg_tle/regression.diffs
pg_tle/tmp_check/log
retention-days: 1