Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
ololobus committed Jan 9, 2020
2 parents 2d3ea72 + 4c7549e commit df7612b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 11 additions & 6 deletions Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,28 @@ 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 \
apk --no-cache add cppcheck --repository http://dl-cdn.alpinelinux.org/alpine/v3.6/community; \
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
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df7612b

Please sign in to comment.