Skip to content

Commit

Permalink
Install required clang-11 and llvm-11. (#451)
Browse files Browse the repository at this point in the history
Fix PostGIS image with install specified `clang-11` and `llvm-11` 

Update to new `docker compose` for running tests.
 - code taken from openmaptiles/openmaptiles#1497 (thanks @wcedmisten)
  • Loading branch information
TomPohys authored Jan 4, 2025
1 parent d241d44 commit 2fc80ed
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ DOCKER_OPTS ?= -i --rm -u $$(id -u $${USER}):$$(id -g $${USER})
# Optionally pass in extra parameters to the docker build command
DOCKER_BUILD_EXTRAS ?=

# https://github.com/openmaptiles/openmaptiles/pull/1497
# Support newer `docker compose` syntax in addition to `docker-compose`
ifeq (, $(shell which docker-compose))
DOCKER_COMPOSE_COMMAND := docker compose
$(info Using docker compose V2 (docker compose))
else
DOCKER_COMPOSE_COMMAND := docker-compose
$(info Using docker compose V1 (docker-compose))
endif

ifneq ($(strip $(NO_REFRESH)),)
$(info Skipping docker image refresh)
else
Expand Down Expand Up @@ -108,9 +118,9 @@ build-sql-tests: prepare build-docker
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
@echo " Running Postgres SQL tests"
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
docker-compose --file tests/sql/docker-compose.yml rm -f && \
timeout 180 docker-compose --file tests/sql/docker-compose.yml up --abort-on-container-exit && \
docker-compose --file tests/sql/docker-compose.yml rm -f
$(DOCKER_COMPOSE_COMMAND) --file tests/sql/docker-compose.yml rm -f && \
$(DOCKER_COMPOSE_COMMAND) --file tests/sql/docker-compose.yml up --abort-on-container-exit --wait-timeout 180 && \
$(DOCKER_COMPOSE_COMMAND) --file tests/sql/docker-compose.yml rm -f

.PHONY: build-bin-tests
build-bin-tests: prepare build-docker
Expand Down
4 changes: 2 additions & 2 deletions docker/postgis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ RUN set -eux ;\
postgresql-server-dev-$PG_MAJOR \
libkakasi2-dev \
libgdal-dev \
clang-11 \
llvm-11 \
;\
## Install specific GEOS version
#cd /opt/ ;\
Expand All @@ -50,8 +52,6 @@ RUN set -eux ;\
cd /opt/ ;\
git clone --quiet --depth 1 -b $PGSQL_GZIP_TAG $PGSQL_GZIP_REPO ;\
cd pgsql-gzip ;\
ln -s /usr/bin/clang-13 /usr/bin/clang-11 ;\
ln -s /usr/lib/llvm-13 /usr/lib/llvm-11 ;\
make ;\
make install ;\
rm -rf /opt/pgsql-gzip ;\
Expand Down

0 comments on commit 2fc80ed

Please sign in to comment.