Skip to content

ci: support precheck for v15 #1

ci: support precheck for v15

ci: support precheck for v15 #1

Workflow file for this run

name: precheck
on:
push:
branches: [ POLARDB_15_STABLE ]
paths:
- '.github/workflows/precheck.yml'
- 'config/**'
- 'contrib/**'
- 'external/**'
- 'src/**'
- 'configure*'
- 'build.sh'
pull_request:
branches: [ POLARDB_15_STABLE ]
paths:
- '.github/workflows/precheck.yml'
- 'config/**'
- 'contrib/**'
- 'external/**'
- 'src/**'
- 'configure*'
- 'build.sh'
# trigger testing manually
workflow_dispatch:
jobs:
build_normal:
runs-on: ubuntu-latest
strategy:
matrix:
container_image: [ ubuntu20.04, ubuntu22.04, ubuntu24.04, anolis8, rocky8, rocky9 ]
debug_mode: [ on, off ]
steps:
- name: fetch source code
uses: actions/checkout@v4
- name: create and start the container
run: |
docker create \
-t \
--name polardb_${{ matrix.container_image }} \
-v `pwd`:/home/postgres/PolarDB-for-PostgreSQL \
polardb/polardb_pg_devel:${{ matrix.container_image }} \
bash && \
docker start polardb_${{ matrix.container_image }}
- name: change ownership of the source code
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
sudo chown -R postgres:postgres ./"
- name: build and run precheck
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
if [ -f /etc/bashrc ]; then source /etc/bashrc; fi && \
./build.sh --ws=1 --wr=2 --debug=${{ matrix.debug_mode }} --jobs=$jobs --ec='--enable-tap-tests' && \
make precheck -j$jobs"
- name: change ownership of the source code back
run: |
sudo chown -R runner:runner `pwd`