Skip to content

Commit 2f22106

Browse files
committed
refactorings+fixes
1 parent a5c307a commit 2f22106

File tree

15 files changed

+151
-22
lines changed

15 files changed

+151
-22
lines changed

.github/workflows/buildx.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ name: buildx-qemu-experimental-build
77
# Expecting: upstream "postgres" docker images for OS/ARCH=platforms
88
# [ check https://hub.docker.com/_/postgres/tags ]
99
#
10-
# Comments: 2022-09-07 ( with QEMU 7.00 )
10+
# Comments: 2022-09-07 ( with QEMU 7.0 )
1111
# 'linux/arm64' Postgres JIT is not working; ( SET JIT=OFF under the alpine test )
12+
# 'linux/ppc64le' Postgres JIT is not working; ( SET JIT=OFF under the alpine test )
1213
# 'linux/arm/v7' - debian: Unable to locate package postgresql-??-postgis-3;
1314
# 'linux/arm/v6' - debian: Unable to locate package postgresql-??-postgis-3;
1415
# 'linux/s390x' [alpine|debian] failed test.

10-3.2/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ ENV POSTGIS_MAJOR 3
66
ENV POSTGIS_VERSION 3.2.3+dfsg-1.pgdg110+1
77

88
RUN apt-get update \
9+
# buildx debug info
10+
&& uname -a && uname -m && lscpu \
11+
\
912
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
1013
&& apt-get install -y --no-install-recommends \
1114
# ca-certificates: for accessing remote raster files;

10-3.2/alpine/Dockerfile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,30 @@ RUN set -eux \
9090
&& make -j$(nproc) \
9191
&& make install \
9292
\
93+
# buildx platform check for debug.
94+
&& uname -a && uname -m && cat /proc/cpuinfo \
95+
\
9396
# regress check
9497
&& mkdir /tempdb \
9598
&& chown -R postgres:postgres /tempdb \
9699
&& su postgres -c 'pg_ctl -D /tempdb init' \
97-
&& su postgres -c 'pg_ctl -D /tempdb start' \
100+
\
101+
# QEMU7.0/BUILDX - JIT workaround
102+
&& if [ "aarch64 ppc64le" =~ "$(uname -m)" ] && [ "10" != "10" ]; then \
103+
set -eux \
104+
# for the buildx/qemu workflow
105+
# with (aarch64 ppc64le) and PG>10 .. we are testing with JIT=OFF to avoid QEMU7.0/BUILDX error
106+
&& echo "WARNING: JIT=OFF testing (aarch64 ppc64le)!" \
107+
&& su postgres -c 'pg_ctl -o "--jit=off" -D /tempdb start' \
108+
&& su postgres -c 'psql -c "SHOW JIT;"' \
109+
; \
110+
else \
111+
set -eux \
112+
# default test .. no problem expected.
113+
&& su postgres -c 'pg_ctl -D /tempdb start' \
114+
; \
115+
fi \
116+
\
98117
&& cd regress \
99118
&& make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \
100119
#&& make -j$(nproc) check RUNTESTFLAGS=--dumprestore PGUSER=postgres \

11-3.3/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ ENV POSTGIS_MAJOR 3
66
ENV POSTGIS_VERSION 3.3.1+dfsg-2.pgdg110+1
77

88
RUN apt-get update \
9+
# buildx debug info
10+
&& uname -a && uname -m && lscpu \
11+
\
912
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
1013
&& apt-get install -y --no-install-recommends \
1114
# ca-certificates: for accessing remote raster files;

11-3.3/alpine/Dockerfile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,30 @@ RUN set -eux \
9090
&& make -j$(nproc) \
9191
&& make install \
9292
\
93+
# buildx platform check for debug.
94+
&& uname -a && uname -m && cat /proc/cpuinfo \
95+
\
9396
# regress check
9497
&& mkdir /tempdb \
9598
&& chown -R postgres:postgres /tempdb \
9699
&& su postgres -c 'pg_ctl -D /tempdb init' \
97-
&& su postgres -c 'pg_ctl -D /tempdb start' \
100+
\
101+
# QEMU7.0/BUILDX - JIT workaround
102+
&& if [ "aarch64 ppc64le" =~ "$(uname -m)" ] && [ "11" != "10" ]; then \
103+
set -eux \
104+
# for the buildx/qemu workflow
105+
# with (aarch64 ppc64le) and PG>10 .. we are testing with JIT=OFF to avoid QEMU7.0/BUILDX error
106+
&& echo "WARNING: JIT=OFF testing (aarch64 ppc64le)!" \
107+
&& su postgres -c 'pg_ctl -o "--jit=off" -D /tempdb start' \
108+
&& su postgres -c 'psql -c "SHOW JIT;"' \
109+
; \
110+
else \
111+
set -eux \
112+
# default test .. no problem expected.
113+
&& su postgres -c 'pg_ctl -D /tempdb start' \
114+
; \
115+
fi \
116+
\
98117
&& cd regress \
99118
&& make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \
100119
#&& make -j$(nproc) check RUNTESTFLAGS=--dumprestore PGUSER=postgres \

12-3.3/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ ENV POSTGIS_MAJOR 3
66
ENV POSTGIS_VERSION 3.3.1+dfsg-2.pgdg110+1
77

88
RUN apt-get update \
9+
# buildx debug info
10+
&& uname -a && uname -m && lscpu \
11+
\
912
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
1013
&& apt-get install -y --no-install-recommends \
1114
# ca-certificates: for accessing remote raster files;

12-3.3/alpine/Dockerfile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,30 @@ RUN set -eux \
9090
&& make -j$(nproc) \
9191
&& make install \
9292
\
93+
# buildx platform check for debug.
94+
&& uname -a && uname -m && cat /proc/cpuinfo \
95+
\
9396
# regress check
9497
&& mkdir /tempdb \
9598
&& chown -R postgres:postgres /tempdb \
9699
&& su postgres -c 'pg_ctl -D /tempdb init' \
97-
&& su postgres -c 'pg_ctl -D /tempdb start' \
100+
\
101+
# QEMU7.0/BUILDX - JIT workaround
102+
&& if [ "aarch64 ppc64le" =~ "$(uname -m)" ] && [ "12" != "10" ]; then \
103+
set -eux \
104+
# for the buildx/qemu workflow
105+
# with (aarch64 ppc64le) and PG>10 .. we are testing with JIT=OFF to avoid QEMU7.0/BUILDX error
106+
&& echo "WARNING: JIT=OFF testing (aarch64 ppc64le)!" \
107+
&& su postgres -c 'pg_ctl -o "--jit=off" -D /tempdb start' \
108+
&& su postgres -c 'psql -c "SHOW JIT;"' \
109+
; \
110+
else \
111+
set -eux \
112+
# default test .. no problem expected.
113+
&& su postgres -c 'pg_ctl -D /tempdb start' \
114+
; \
115+
fi \
116+
\
98117
&& cd regress \
99118
&& make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \
100119
#&& make -j$(nproc) check RUNTESTFLAGS=--dumprestore PGUSER=postgres \

13-3.3/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ ENV POSTGIS_MAJOR 3
66
ENV POSTGIS_VERSION 3.3.1+dfsg-2.pgdg110+1
77

88
RUN apt-get update \
9+
# buildx debug info
10+
&& uname -a && uname -m && lscpu \
11+
\
912
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
1013
&& apt-get install -y --no-install-recommends \
1114
# ca-certificates: for accessing remote raster files;

13-3.3/alpine/Dockerfile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,30 @@ RUN set -eux \
9090
&& make -j$(nproc) \
9191
&& make install \
9292
\
93+
# buildx platform check for debug.
94+
&& uname -a && uname -m && cat /proc/cpuinfo \
95+
\
9396
# regress check
9497
&& mkdir /tempdb \
9598
&& chown -R postgres:postgres /tempdb \
9699
&& su postgres -c 'pg_ctl -D /tempdb init' \
97-
&& su postgres -c 'pg_ctl -D /tempdb start' \
100+
\
101+
# QEMU7.0/BUILDX - JIT workaround
102+
&& if [ "aarch64 ppc64le" =~ "$(uname -m)" ] && [ "13" != "10" ]; then \
103+
set -eux \
104+
# for the buildx/qemu workflow
105+
# with (aarch64 ppc64le) and PG>10 .. we are testing with JIT=OFF to avoid QEMU7.0/BUILDX error
106+
&& echo "WARNING: JIT=OFF testing (aarch64 ppc64le)!" \
107+
&& su postgres -c 'pg_ctl -o "--jit=off" -D /tempdb start' \
108+
&& su postgres -c 'psql -c "SHOW JIT;"' \
109+
; \
110+
else \
111+
set -eux \
112+
# default test .. no problem expected.
113+
&& su postgres -c 'pg_ctl -D /tempdb start' \
114+
; \
115+
fi \
116+
\
98117
&& cd regress \
99118
&& make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \
100119
#&& make -j$(nproc) check RUNTESTFLAGS=--dumprestore PGUSER=postgres \

14-3.3/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ ENV POSTGIS_MAJOR 3
66
ENV POSTGIS_VERSION 3.3.1+dfsg-2.pgdg110+1
77

88
RUN apt-get update \
9+
# buildx debug info
10+
&& uname -a && uname -m && lscpu \
11+
\
912
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
1013
&& apt-get install -y --no-install-recommends \
1114
# ca-certificates: for accessing remote raster files;

0 commit comments

Comments
 (0)