diff --git a/.travis.yml b/.travis.yml index bda82fff80..4bfcbc15e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,8 @@ sudo: false language: java before_script: - - test "x$XA" == 'x' || ./travis_install_dependencies.sh + - test "x$XA" == 'x' || ./.travis/travis_install_dependencies.sh + - test "x$PG_VERSION" != "xHEAD" || ./.travis/travis_install_head_postgres.sh - psql -U postgres -c "create user test with password 'test';" - psql -c 'create database test owner test;' -U postgres - echo "MAVEN_OPTS='-Xmx1g -Dgpg.skip=true'" > ~/.mavenrc @@ -25,7 +26,7 @@ script: - export JDK9_HOME=/usr/lib/jvm/java-9-oracle - test -d "${JDK9_HOME}" || export JDK9_HOME=$(jdk_switcher home oraclejdk8) - envsubst < toolchains.xml > ~/.m2/toolchains.xml - - ./travis_build.sh + - ./.travis/travis_build.sh # To avoid useless S3 cache updates (https://github.com/travis-ci/travis-ci/issues/1441#issuecomment-67607074) #- mkdir /tmp/cache-trick #- mv $HOME/.m2/repository/org/postgresql /tmp/cache-trick/ @@ -81,6 +82,9 @@ matrix: - COVERAGE=Y - MCENTRAL=Y - JDOC=Y + - jdk: oraclejdk8 + env: + - PG_VERSION=HEAD - jdk: openjdk7 addons: postgresql: "9.4" @@ -130,4 +134,4 @@ matrix: # Deploy snapshots to Maven Central after_success: - - "test $MCENTRAL == 'Y' && ./travis_deploy.sh" + - "test $MCENTRAL == 'Y' && ./.travis/travis_deploy.sh" diff --git a/travis_build.sh b/.travis/travis_build.sh similarity index 100% rename from travis_build.sh rename to .travis/travis_build.sh diff --git a/travis_deploy.sh b/.travis/travis_deploy.sh similarity index 100% rename from travis_deploy.sh rename to .travis/travis_deploy.sh diff --git a/travis_install_dependencies.sh b/.travis/travis_install_dependencies.sh similarity index 100% rename from travis_install_dependencies.sh rename to .travis/travis_install_dependencies.sh diff --git a/.travis/travis_install_head_postgres.sh b/.travis/travis_install_head_postgres.sh new file mode 100755 index 0000000000..f5b94cdefd --- /dev/null +++ b/.travis/travis_install_head_postgres.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -x -e + +git clone --depth=1 https://github.com/postgres/postgres.git +cd postgres + +PREFIX=$HOME/pg_head + +./configure --prefix=$PREFIX + +# Build PostgreSQL from source and start the DB +make && make install && $PREFIX/bin/pg_ctl -D $PREFIX/data initdb && $PREFIX/bin/pg_ctl -D $PREFIX/data -l postgres.log start