citus/.github/workflows/build-and-test-pg-master.yml

72 lines
1.9 KiB
YAML

name: Build & Test Citus with PG Master
on:
workflow_dispatch:
push:
branches:
- "main"
pull_request:
jobs:
build-and-test-pg-master:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
libreadline-dev \
zlib1g-dev \
flex \
bison \
libxml2-dev \
libxslt-dev \
libssl-dev \
git
- name: Clone PostgreSQL Repository
run: |
git clone https://github.com/postgres/postgres.git
cd postgres
git checkout master
- name: Build PostgreSQL from Source
run: |
cd postgres
./configure --prefix=/usr/local/pgmaster
make -j$(nproc)
sudo make install
- name: Add PostgreSQL to PATH
run: echo "/usr/local/pgmaster/bin" >> $GITHUB_PATH
- name: Verify PostgreSQL Build
run: |
pg_config --version
- name: Set up PG config for Citus build
run: |
# Set PG_MAJOR to "master"
export PG_MAJOR=master
echo "PG_MAJOR is set to $PG_MAJOR"
# Create the directory structure expected by build-citus.sh and symlink the pg_config
sudo mkdir -p /usr/lib/postgresql/$PG_MAJOR/bin
sudo ln -sf /usr/local/pgmaster/bin/pg_config /usr/lib/postgresql/$PG_MAJOR/bin/pg_config
- name: Build Citus
env:
PG_MAJOR: master
run: |
# Confirm that the expected pg_config is being used
which pg_config
ls -l /usr/lib/postgresql/$PG_MAJOR/bin/pg_config
./ci/build-citus.sh
- name: Run Citus Tests
run: |
# Adjust the test target as needed.
make -C src/test/regress check-vanilla