Skip to content

Commit 6f00e0f

Browse files
committed
Run CI actions for PGSM with assertions enabled
To save some CPU cycles now that we will build muhc more we only build with gcc against packages on Linux. Also disable building with injection points for now until we have some test case which actually uses them since PostgreSQL version before 17 did not support them.
1 parent a6eb046 commit 6f00e0f

3 files changed

Lines changed: 36 additions & 4 deletions

File tree

.github/scripts/build-postgres.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ PSP_DIR=$SCRIPT_DIR/../../../postgres
1010
case "$1" in
1111
debug)
1212
echo "Building with debug option"
13-
ARGS+=" --enable-cassert --enable-injection-points"
13+
ARGS+=" --enable-cassert"
1414
;;
1515

1616
debugoptimized)
1717
echo "Building with debugoptimized option"
1818
export CFLAGS="-O2"
19-
ARGS+=" --enable-cassert --enable-injection-points"
19+
ARGS+=" --enable-cassert"
2020
;;
2121

2222
coverage)
2323
echo "Building with coverage option"
24-
ARGS+=" --enable-cassert --enable-injection-points --enable-coverage"
24+
ARGS+=" --enable-cassert --enable-coverage"
2525
;;
2626

2727
sanitize)

.github/workflows/build-and-test.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,21 @@ jobs:
5050
run: .github/scripts/macos-deps.sh
5151

5252
- name: Install PostgreSQL
53+
if: env.PG_PACKAGE != 'source'
5354
run: .github/scripts/install-postgresql.sh ${{ env.PG_PACKAGE }} ${{ env.PG_VERSION }}
5455

56+
- name: Clone postgres repository
57+
if: env.PG_PACKAGE == 'source'
58+
uses: actions/checkout@v7
59+
with:
60+
path: postgres
61+
repository: percona/postgres.git
62+
ref: PSP_REL_${{ env.PG_VERSION }}_STABLE
63+
64+
- name: Build PostgreSQL
65+
if: env.PG_PACKAGE == 'source'
66+
run: .github/scripts/build-postgres.sh ${{ env.BUILD_TYPE }}
67+
5568
- name: Build pg_stat_monitor
5669
run: .github/scripts/build.sh ${{ env.BUILD_TYPE }}
5770

.github/workflows/matrix.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
pg_package: [psp]
2020
pg_version: [14, 15, 16, 17, 18]
2121
os: [ubuntu-24.04]
22-
compiler: [gcc, clang]
22+
compiler: [gcc]
2323
build_type: [debugoptimized]
2424
uses: ./.github/workflows/build-and-test.yml
2525
with:
@@ -38,6 +38,25 @@ jobs:
3838
pg_package: [pgdg]
3939
pg_version: [14, 15, 16, 17, 18]
4040
os: [ubuntu-24.04]
41+
compiler: [gcc]
42+
build_type: [debugoptimized]
43+
uses: ./.github/workflows/build-and-test.yml
44+
with:
45+
pg_package: ${{ matrix.pg_package }}
46+
pg_version: ${{ matrix.pg_version }}
47+
os: ${{ matrix.os }}
48+
compiler: ${{ matrix.compiler }}
49+
build_type: ${{ matrix.build_type }}
50+
secrets: inherit
51+
52+
source:
53+
name: From source
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
pg_package: [source]
58+
pg_version: [14, 15, 16, 17, 18]
59+
os: [ubuntu-24.04]
4160
compiler: [gcc, clang]
4261
build_type: [debugoptimized]
4362
uses: ./.github/workflows/build-and-test.yml

0 commit comments

Comments
 (0)