Update GitHub Actions workflow to build and test Citus with PostgreSQL master

m3hm3t/pg18_pre
Mehmet Yilmaz 2025-04-03 10:46:36 +00:00
parent c940bda953
commit e2f882cc89
1 changed files with 47 additions and 90 deletions

View File

@ -1,4 +1,4 @@
name: Build & Test PG Master name: Build & Test Citus with PG Master
on: on:
workflow_dispatch: workflow_dispatch:
@ -8,96 +8,53 @@ on:
pull_request: pull_request:
jobs: jobs:
params: build-and-test-pg-master:
runs-on: ubuntu-latest
name: Initialize parameters
outputs:
build_image_name: "ghcr.io/citusdata/extbuilder"
test_image_name: "ghcr.io/citusdata/exttester"
pg_master_version: '{ "major": "master", "full": "master" }'
image_suffix: "-veab367a"
steps:
- name: Set up parameters
run: echo 'noop'
build_pg_master:
needs: params
name: Build for PG${{ fromJson(matrix.pg_version).major }}
strategy:
fail-fast: false
matrix:
image_name:
- ${{ needs.params.outputs.build_image_name }}
pg_version:
- ${{ needs.params.outputs.pg_master_version }}
image_suffix:
- ${{ needs.params.outputs.image_suffix }}
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container:
image: "${{ matrix.image_name }}:${{ fromJson(matrix.pg_version).full }}${{ matrix.image_suffix }}"
options: --user root
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Expose PG_MAJOR to GitHub Environment
run: echo "PG_MAJOR=${{ fromJson(matrix.pg_version).major }}" >> $GITHUB_ENV
shell: bash
- name: Build Citus with PG master branch
run: "./ci/build-citus.sh"
shell: bash
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ env.PG_MAJOR }}
path: |-
./build-${{ env.PG_MAJOR }}/*
./install-${{ env.PG_MAJOR }}.tar
test_citus_pg_master: - name: Install Build Dependencies
needs: build_pg_master run: |
name: PG${{ fromJson(matrix.pg_version).major }} - Test Citus sudo apt-get update
strategy: sudo apt-get install -y \
fail-fast: false build-essential \
matrix: libreadline-dev \
suite: zlib1g-dev \
- regress flex \
image_name: bison \
- ${{ needs.params.outputs.test_image_name }} libxml2-dev \
pg_version: libxslt-dev \
- ${{ needs.params.outputs.pg_master_version }} libssl-dev \
make: git
- check-split
- check-multi - name: Clone PostgreSQL Repository
- check-multi-1 run: |
- check-multi-mx # Clone PostgreSQL master branch
- check-vanilla git clone https://github.com/postgres/postgres.git
- check-isolation cd postgres
- check-operations git checkout master
- check-follower-cluster
- check-columnar - name: Build PostgreSQL from Source
- check-columnar-isolation run: |
- check-enterprise cd postgres
- check-enterprise-isolation ./configure --prefix=/usr/local/pgmaster
- check-enterprise-isolation-logicalrep-1 make -j$(nproc)
- check-enterprise-isolation-logicalrep-2 sudo make install
- check-enterprise-isolation-logicalrep-3
runs-on: ubuntu-20.04 - name: Set PG Binaries Path
container: run: echo "/usr/local/pgmaster/bin" >> $GITHUB_PATH
image: "${{ matrix.image_name }}:${{ fromJson(matrix.pg_version).full }}${{ needs.params.outputs.image_suffix }}"
options: --user root --dns=8.8.8.8 - name: Verify PostgreSQL Build
steps: run: |
- uses: actions/checkout@v4 pg_config --version
- uses: ./.github/actions/setup_extension
- name: Run tests - name: Build Citus
run: gosu circleci make -C src/test/${{ matrix.suite }} ${{ matrix.make }} run: |
timeout-minutes: 20 # Ensure the newly built PostgreSQL is used
- name: Save logs and results which pg_config
if: always() ./ci/build-citus.sh
uses: ./.github/actions/save_logs_and_results
with: - name: Run Citus Tests
folder: ${{ fromJson(matrix.pg_version).major }}_${{ matrix.make }} run: |
- name: Upload coverage results # Example test adjust the make target and test directory as needed
if: always() make -C src/test/regress check-vanilla
uses: ./.github/actions/upload_coverage
with:
flags: ${{ env.PG_MAJOR }}_${{ matrix.suite }}_${{ matrix.make }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}