diff --git a/.travis.yml b/.travis.yml index 4038ea8..ad1894c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,3 +23,5 @@ env: - PG_VERSION=10 CHECK_CODE=clang - PG_VERSION=10 CHECK_CODE=cppcheck - PG_VERSION=10 CHECK_CODE=false + - PG_VERSION=11 CHECK_CODE=false + - PG_VERSION=12 CHECK_CODE=false diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index 5e95748..eaf70c8 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -3,8 +3,9 @@ FROM postgres:${PG_VERSION}-alpine ENV LANG=C.UTF-8 PGDATA=/pg/data RUN if [ "${CHECK_CODE}" = "clang" ] ; then \ - echo 'http://dl-3.alpinelinux.org/alpine/edge/main' > /etc/apk/repositories; \ - apk --no-cache add clang-analyzer make musl-dev gcc; \ + # echo 'http://dl-3.alpinelinux.org/alpine/edge/main' > /etc/apk/repositories; \ + # Use alpine/v3.6/main instead of alpine/edge/main to fix version of clang to '8.*.*' + apk --no-cache add clang-analyzer make musl-dev gcc --repository http://dl-cdn.alpinelinux.org/alpine/v3.6/main; \ fi RUN if [ "${CHECK_CODE}" = "cppcheck" ] ; then \ @@ -12,14 +13,18 @@ RUN if [ "${CHECK_CODE}" = "cppcheck" ] ; then \ fi RUN if [ "${CHECK_CODE}" = "false" ] ; then \ - echo 'http://dl-3.alpinelinux.org/alpine/edge/main' > /etc/apk/repositories; \ - apk --no-cache add curl python3 gcc make musl-dev;\ + # echo 'http://dl-3.alpinelinux.org/alpine/edge/main' > /etc/apk/repositories; \ + # Use alpine/v3.6/main instead of alpine/edge/main to fix version of clang to '8.*.*' + # Install clang as well, since LLVM is enabled in PG_VERSION >= 11 by default + apk --no-cache add curl python3 gcc make musl-dev llvm clang clang-dev \ + --repository http://dl-cdn.alpinelinux.org/alpine/v3.6/community \ + --repository http://dl-cdn.alpinelinux.org/alpine/v3.6/main; \ fi -RUN mkdir -p /pg/data && \ +RUN mkdir -p ${PGDATA} && \ mkdir /pg/src && \ chown postgres:postgres ${PGDATA} && \ - chmod a+rwx /usr/local/lib/postgresql && \ + chmod -R a+rwx /usr/local/lib/postgresql && \ chmod a+rwx /usr/local/share/postgresql/extension ADD . /pg/src diff --git a/Makefile b/Makefile index b6f70ea..8cd4d9a 100644 --- a/Makefile +++ b/Makefile @@ -26,3 +26,12 @@ endif $(EXTENSION)--$(EXTVERSION).sql: setup.sql cat $^ > $@ + +# Prepare the package for PGXN submission +package: dist dist/$(EXTENSION)-$(EXTVERSION).zip + +dist: + mkdir -p dist + +dist/$(EXTENSION)-$(EXTVERSION).zip: + git archive --format zip --prefix=$(EXTENSION)-$(EXTVERSION)/ --output $@ master diff --git a/run_tests.sh b/run_tests.sh index 5e66bc9..f543fe1 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -48,7 +48,7 @@ make USE_PGXS=1 install status=$? if [ $status -ne 0 ]; then exit $status; fi -# add pg_pathman to shared_preload_libraries and restart cluster 'test' +# add pg_wait_sampling to shared_preload_libraries and restart cluster 'test' echo "shared_preload_libraries = 'pg_wait_sampling'" >> $PGDATA/postgresql.conf echo "port = 55435" >> $PGDATA/postgresql.conf pg_ctl start -l /tmp/postgres.log -w