Skip to content

Commit cc89729

Browse files
committed
Add build variations
1 parent 758730d commit cc89729

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/build-gpdb.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,44 @@ on:
1212

1313
jobs:
1414

15+
## ======================================================================
16+
## Job: prepare-build-matrix
17+
## ======================================================================
18+
19+
prepare-build-matrix:
20+
21+
name: Prepare Build Variations
22+
23+
runs-on: ubuntu-latest
24+
25+
outputs:
26+
build-matrix: ${{ steps.set-matrix.outputs.matrix }}
27+
28+
steps:
29+
- id: set-matrix
30+
run: |
31+
echo "=== Matrix Preparation ==="
32+
# Build result JSON with defaults applied
33+
RESULT='{"include":[
34+
{
35+
"name": "default"
36+
},
37+
{
38+
"name": "namedatalen-128",
39+
"extra_configure_flags": "--with-extended-namedatalen"
40+
}
41+
]}'
42+
# Output the matrix for GitHub Actions
43+
echo "Final matrix configuration:"
44+
echo "$RESULT" | jq .
45+
# Fix: Use block redirection
46+
{
47+
echo "matrix<<EOF"
48+
echo "$RESULT"
49+
echo "EOF"
50+
} >> "$GITHUB_OUTPUT"
51+
echo "=== Matrix Preparation Complete ==="
52+
1553
## ======================================================================
1654
## Job: prepare-test-matrix
1755
## ======================================================================
@@ -217,13 +255,22 @@ jobs:
217255
## ======================================================================
218256

219257
build:
258+
259+
name: Build (${{ matrix.name }})
260+
261+
needs: [prepare-build-matrix]
262+
220263
env:
221264
JOB_TYPE: build
222265
runs-on: ubuntu-latest
223266
timeout-minutes: 120
224267
outputs:
225268
build_timestamp: ${{ steps.set_timestamp.outputs.timestamp }}
226269

270+
strategy:
271+
fail-fast: false # Continue with other tests if one fails
272+
matrix: ${{ fromJson(needs.prepare-build-matrix.outputs.build-matrix) }}
273+
227274
container:
228275
image: ghcr.io/open-gpdb/gpdb-env:jammy-latest
229276

@@ -272,6 +319,8 @@ jobs:
272319
SRC_DIR: ${{ github.workspace }}
273320
run: |
274321
set -ex pipefail
322+
GPDB_EXTRA_CONFIGURE_FLAGS=${{ matrix.extra_configure_flags }}
323+
275324
chmod +x "${SRC_DIR}"/../gpdb-devops/build_automation/gpdb/scripts/configure-gpdb.sh
276325
cd ${SRC_DIR}
277326
if ! SRC_DIR=${SRC_DIR} ENABLE_DEBUG=${{ env.ENABLE_DEBUG }} ${SRC_DIR}/../gpdb-devops/build_automation/gpdb/scripts/configure-gpdb.sh; then

0 commit comments

Comments
 (0)