Skip to content

Commit 078c7bc

Browse files
committed
Upgrade to trixie, set MAKEFLAGS, PGUSER
* Upgrade to `trixie-slim` * Set `PGUSER` to `postgres` in the `Dockerfile`, removing the need for users to remember to do it. * Set `MAKEFLAGS="-j $(nprocs)"` in `pgxn-build-test` and pass `-j $(nprocs)` in `pgrx-build-test` to shorten build runtimes
1 parent beb20f2 commit 078c7bc

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:bookworm-slim AS pgxn-config
1+
FROM debian:trixie-slim AS pgxn-config
22

33
ADD https://salsa.debian.org/postgresql/postgresql-common/-/raw/master/pgdg/apt.postgresql.org.sh /usr/local/bin/
44

@@ -36,6 +36,6 @@ RUN chmod +x /usr/local/bin/apt.postgresql.org.sh \
3636

3737
COPY bin/* /usr/local/bin/
3838

39-
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8 CARGO_HOME=/usr/share/cargo PGRX_HOME=/tmp/.pgrx RUSTUP_HOME=/usr/share/rustup PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/share/cargo/bin
39+
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8 PGUSER=postgres CARGO_HOME=/usr/share/cargo PGRX_HOME=/tmp/.pgrx RUSTUP_HOME=/usr/share/rustup PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/share/cargo/bin
4040
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
4141
CMD ["/bin/bash"]

bin/pg-build-test

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ set -eux
66

77
# set PROFILE to a default of -Werror, otherwise use the passed in value. Note
88
# the double dash is intentional.
9-
export PROFILE="${PROFILE:--Werror}"
9+
PROFILE="${PROFILE:--Werror}"
10+
MAKEFLAGS="-j $(nproc)"
11+
export PROFILE MAKEFLAGS
1012

1113
make all
1214
sudo make install
1315
status=0
14-
make installcheck PGUSER=postgres || status=$?
16+
make installcheck || status=$?
1517
[ $status != 0 ] && find . -name regression.diffs -exec cat {} +
1618
exit $status

bin/pgrx-build-test

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ exit unless $regress;
9292

9393
# Run installcheck.
9494
say "### Running installcheck for $package";
95-
run [qw(make installcheck PGUSER=postgres)] or do {
95+
my $nproc do {
96+
run [qw(nproc)], \undef, \my $out;
97+
chomp $out;
98+
$out || 1;
99+
};
100+
run [qw(make installcheck -j), $nproc] or do {
96101
my $exit_code = $? >> 8;
97102
# Try to find regression.diffs.
98103
run[qw(find . -name regression.diffs -exec cat {} +)];

test/pgxs/runtest.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ else
5252
# Make sure runtest.sh is included in the zip file.
5353
if [ ! -f "$prefix/runtest.sh" ]; then
5454
echo 'ERROR: Zip file does not contain runtests.sh but should'
55+
ls -lah "$prefix/"
5556
# shellcheck disable=SC2016
5657
echo ' Did pgxn-bundle use `git archive` instead of `zip`?'
5758
exit 2

0 commit comments

Comments
 (0)