Skip to content

Commit 4f46878

Browse files
committed
build across pg versions
1 parent 2882c1b commit 4f46878

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

.github/workflows/deb-packager.yaml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,32 @@ on:
66
description: 'Tag'
77
required: true
88
default: ''
9-
PG:
10-
description: 'PG major version. Default: 16'
11-
required: false
12-
default: '16'
13-
PG_MIN:
14-
description: 'PG minor version. Default: 1'
15-
required: false
16-
default: '1'
179
TAG_GIT_REF:
1810
description: 'Tag git Ref (leave empty for same as Tag)'
1911
required: false
2012
default: ''
2113

2214
jobs:
2315
packager:
24-
runs-on: ${{ matrix.runs_on }}
16+
runs-on: ${{ matrix.platform.runs_on }}
2517

2618
strategy:
2719
fail-fast: false
2820
matrix:
29-
platform: [ amd64, arm64 ]
30-
include:
31-
- platform: amd64
21+
pg:
22+
- major: 15
23+
minor: 7
24+
- major: 16
25+
minor: 3
26+
platform:
27+
- type: amd64
3228
runs_on: ubuntu-latest
3329
rustflags: '-C target-feature=+avx2,+fma'
34-
- platform: arm64
30+
- type: arm64
3531
runs_on: cloud-image-runner-arm64
3632
rustflags: ''
3733

3834
env:
39-
PG_VER: ${{ github.event.inputs.PG }}
40-
PG_MIN_VER: ${{ github.event.inputs.PG_MIN }}
4135
PG_SRC_DIR: pgbuild
4236
PG_INSTALL_DIR: postgresql
4337
MAKE_JOBS: 6
@@ -57,10 +51,10 @@ jobs:
5751
run: |
5852
sudo apt-get install dpkg-dev debhelper build-essential
5953
60-
- name: Install PostgreSQL ${{ env.PG_VER }}
54+
- name: Install PostgreSQL ${{ matrix.pg.major }}
6155
uses: ./.github/actions/install-postgres
6256
with:
63-
pg-version: ${{ env.PG_VER }}.${{ env.PG_MIN_VER }}
57+
pg-version: ${{ matrix.pg.major }}.${{ matrix.pg.minor }}
6458
pg-src-dir: ~/${{ env.PG_SRC_DIR }}
6559
pg-install-dir: ~/${{ env.PG_INSTALL_DIR }}
6660

@@ -81,13 +75,13 @@ jobs:
8175
id: debbuild
8276
run: |
8377
export PATH=~/${{ env.PG_INSTALL_DIR }}/bin:$PATH
84-
(cd ${{ env.TAG_DIR }} && ${{ matrix.rustflags != '' && format('RUSTFLAGS="{0}"', matrix.rustflags) || '' }} make package)
85-
bash scripts/package-deb.sh "${{ env.TAG }}" "${PWD}/${{ env.TAG_DIR }}" "$RUNNER_OS" "${{ env.PG_VER }}"
78+
(cd ${{ env.TAG_DIR }} && ${{ matrix.platform.rustflags != '' && format('RUSTFLAGS="{0}"', matrix.platform.rustflags) || '' }} make package)
79+
bash scripts/package-deb.sh "${{ env.TAG }}" "${PWD}/${{ env.TAG_DIR }}" "$RUNNER_OS" "${{ matrix.pg.major }}"
8680
8781
# Use a GH artifact, then we can make use of the (quite limited) GH API https://docs.github.com/en/rest/actions/artifacts
8882
# The artifact will have a TTL of 90 days
8983
- name: Upload deb as Artifact
9084
uses: actions/upload-artifact@v4
9185
with:
92-
name: pgvectorscale-${{ env.TAG }}-pg${{ env.PG_VER }}-${{ matrix.platform }}
86+
name: pgvectorscale-${{ env.TAG }}-pg${{ matrix.pg.major }}-${{ matrix.platform.type }}
9387
path: pkgdump/pgvectorscale-*${{ env.TAG }}*.deb

0 commit comments

Comments
 (0)