Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add build and test workflow #6

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: pg_quack Build and Test
on:
push:
pull_request:
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
version: [REL_16_STABLE]
runs-on: ${{ matrix.os }}

steps:
- name: Test details
run: echo Build and test pg_quack on ${{ matrix.os }} with PostgreSQL ${{ matrix.version }} branch

- name: Checkout and build PostgreSQL code
run: |
sudo apt-get update -qq
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get install -y build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev libxml2-utils xsltproc ccache pkg-config libc++-dev libc++abi-dev libglib2.0-dev libtinfo5 cmake libstdc++-12-dev
rm -rf postgres
git clone --branch ${{ matrix.version }} --single-branch --depth 1 https://github.com/postgres/postgres.git
pushd postgres
git branch
./configure --prefix=$PWD/inst/ --enable-cassert --enable-debug --with-openssl
make -j4 install

- name: Start Postgres
run: |
pushd postgres
cd inst/bin
./initdb -D data
./pg_ctl -D data -l logfile start
popd

- name: Checkout pg_quack extension code
uses: actions/checkout@v4
with:
path: quack

- name: Build and test pg_quack extension
id: regression-tests
run: |
export PATH="${PWD}/postgres/inst/bin:$PATH"
pushd quack
git submodule update --init --recursive
make
make install
make installcheck
popd

- name: Print regression.diffs if regression tests failed
if: failure() && steps.regression-tests.outcome != 'success'
run: |
cat quack/regression.diffs
25 changes: 0 additions & 25 deletions third_party/third_party.cmake

This file was deleted.