Skip to content

Commit 32838e2

Browse files
committed
Fix image building
1 parent a9f0b2d commit 32838e2

2 files changed

Lines changed: 17 additions & 13 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
1818

1919
- name: Set up QEMU
20-
uses: docker/setup-qemu-action@v3
20+
uses: docker/setup-qemu-action@v4
2121

2222
- name: Set up Docker Buildx
23-
uses: docker/setup-buildx-action@v3
23+
uses: docker/setup-buildx-action@v4
2424

2525
- name: Login to DockerHub
26-
uses: docker/login-action@v3
26+
uses: docker/login-action@v4
2727
with:
2828
username: ${{ secrets.DOCKERHUB_USERNAME }}
2929
password: ${{ secrets.DOCKERHUB_TOKEN }}
3030

3131
- name: Docker meta
3232
id: meta
33-
uses: docker/metadata-action@v5
33+
uses: docker/metadata-action@v6
3434
with:
3535
images: |
3636
creowave/postgres
@@ -51,7 +51,7 @@ jobs:
5151
echo "timescaledb_version=$TIMESCALEDB_VERSION" >> $GITHUB_OUTPUT
5252
5353
- name: Build and push Docker image
54-
uses: docker/build-push-action@v5
54+
uses: docker/build-push-action@v7
5555
with:
5656
context: .
5757
file: ./Dockerfile

Dockerfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ RUN apk add --no-cache --virtual .postgis-fetch-deps \
2929
proj-dev \
3030
proj-util \
3131
sfcgal-dev \
32-
llvm-dev \
3332
clang \
33+
llvm \
3434
autoconf \
3535
automake \
3636
cunit-dev \
@@ -57,9 +57,13 @@ RUN apk add --no-cache --virtual .postgis-fetch-deps \
5757
protobuf-c \
5858
ca-certificates
5959

60-
# Symlink clang and llvm-lto to ensure compatibility with PostGIS build scripts
61-
RUN ln -s /usr/bin/clang /usr/bin/clang-19 \
62-
&& mkdir -p /usr/lib/llvm19/bin && ln -s /usr/bin/llvm-lto /usr/lib/llvm19/bin/llvm-lto
60+
# Create symlinks matching the LLVM paths hardcoded in PostgreSQL's PGXS build system
61+
RUN PGXS_CLANG=$(grep '^CLANG' /usr/local/lib/postgresql/pgxs/src/Makefile.global | sed 's/.*= *//') \
62+
&& PGXS_LLVM_BINPATH=$(grep '^LLVM_BINPATH' /usr/local/lib/postgresql/pgxs/src/Makefile.global | sed 's/.*= *//') \
63+
&& echo "PGXS expects CLANG=${PGXS_CLANG}, LLVM_BINPATH=${PGXS_LLVM_BINPATH}" \
64+
&& ln -sf /usr/bin/clang "/usr/bin/${PGXS_CLANG}" \
65+
&& mkdir -p "${PGXS_LLVM_BINPATH}" \
66+
&& ln -sf /usr/bin/llvm-lto "${PGXS_LLVM_BINPATH}/llvm-lto"
6367

6468
# Download, verify and extract PostGIS source code
6569
RUN wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/${POSTGIS_VERSION}.tar.gz" \
@@ -72,14 +76,13 @@ RUN wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/${POSTGIS
7276
--strip-components 1 \
7377
&& rm postgis.tar.gz
7478

75-
# Build PostGIS - with Link Time Optimization (LTO) enabled
79+
# Build PostGIS
7680
RUN cd /usr/src/postgis \
7781
&& gettextize \
7882
&& ./autogen.sh \
7983
&& ./configure \
80-
--enable-lto \
8184
&& make -j$(nproc) \
82-
&& make install
85+
&& make install
8386

8487
# Cleanup
8588
RUN rm -rf /usr/src/postgis \
@@ -94,6 +97,7 @@ RUN apk add --no-cache --virtual .timescaledb-fetch-deps \
9497
git \
9598
&& apk add --no-cache --virtual .timescaledb-build-deps \
9699
openssl-dev \
100+
icu-dev \
97101
clang \
98102
gcc \
99103
cmake \

0 commit comments

Comments
 (0)