Skip to content

Commit be8f0fd

Browse files
ci: build the PostgreSQL extension against the runner's PostgreSQL
1 parent 70cfbe4 commit be8f0fd

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ jobs:
185185
# is slow and is not one of the checks a merge waits for.
186186
native-pg:
187187
runs-on: ubuntu-latest
188-
env:
189-
PG: "16"
190188
defaults:
191189
run:
192190
working-directory: native/pg
@@ -196,9 +194,12 @@ jobs:
196194
with:
197195
toolchain: stable
198196
components: clippy, rustfmt
199-
- name: PostgreSQL headers, and leave to install an extension
197+
- name: Headers for the runner's own PostgreSQL, and leave to install an extension
200198
run: |
201-
sudo apt-get update
199+
PG=$(ls /usr/lib/postgresql | sort -n | tail -1)
200+
echo "PG=$PG" >> "$GITHUB_ENV"
201+
# The runner's PostgreSQL comes from PGDG, so its headers must too.
202+
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
202203
sudo apt-get install -y "postgresql-server-dev-$PG" libclang-dev
203204
sudo chmod -R a+rwX "$(pg_config --pkglibdir)" "$(pg_config --sharedir)/extension"
204205
- run: cargo install cargo-pgrx --version 0.19.3 --locked

0 commit comments

Comments
 (0)