Permalink
Browse files

chore: use mainly Trusty in Travis, reorder CI jobs, and jdk tests (#939

)

Travis is in the process of phasing out `dist: precise`, so it is time to update CI job configuration.
  • Loading branch information...
jorsol authored and vlsi committed Sep 19, 2017
1 parent 29f574a commit 646a868c0bc80def5fa62374e83b71d65fef9a14
Showing with 66 additions and 61 deletions.
  1. +55 −61 .travis.yml
  2. +11 −0 .travis/travis_install_zulu.sh
@@ -1,5 +1,6 @@
sudo: false
language: java
dist: trusty
before_script:
- export PG_DATADIR="/etc/postgresql/${PG_VERSION}/main"
@@ -13,23 +14,27 @@ before_script:
- echo "MAVEN_OPTS='-Xmx1g -Dgpg.skip=true'" > ~/.mavenrc
- test "x$PG_VERSION" == 'x' || test "x$NO_HSTORE" == 'xY' || psql test -c 'CREATE EXTENSION hstore;' -U postgres
- test "x$PG_VERSION" == 'x' || test "x$CREATE_PLPGSQL" == 'x' || createlang -U postgres plpgsql test
- if [[ "x$JDK" == *'x9'* ]]; then export JAVA_HOME=/usr/lib/jvm/zulu-9-amd64; export PATH=$JAVA_HOME/bin:$PATH; fi
env:
global:
- secure: "3HRd+UJQzXoxmBAiJ8SLFuYK8NvMVgIs0erfcPdgvtfFGTPkH3XMONfNr2VE2uz6qwUB5GWkVzvS4c9CPbnnft9QhyYeeUINiqQMN5+6AN5re3C2D7VQMm3NSB+T2R6zS/18UZW5tIoTJILgl5oRCQFI7RSpqhvZ8nqPxJ4gptI="
- secure: "VrNgbyKQi5HjSMZfkt/zwG+AHk1NW1b+f3Jo1ZH7DCqcgLApwvp4MNsw+XamqHxudjj3Z8+4bYBxG2H6zIOobIyYhBvxUwMq7HTjM4jH8m5phqvQIWZOzZzqguYNNS7JJQUpIMwR7wTuHqucVfMxljoSuXQbs+0BUxo4Eh+FScQ="
- secure: "NI+aqwRLLVt2feJdk/2ZEZnsaPyu+vOx8MahVxjz0UUVvRHVqxM5O1M0R53NJfEeIjflOzgZJwRLqgyl6dkdfjytRhaHWGptQdehV4cwNb+4epnn8WlpRzMac65zTQqnbGVtw9jissDQv6/Zl/+D+DMcU65BbFZkix40whILXG0="
before_install:
- ./.travis/travis_install_zulu.sh
- test -z "${ZULU_JDK}" || export JDK${ZULU_JDK}_HOME=/usr/lib/jvm/zulu-${ZULU_JDK}-amd64
script:
# make sure previous build artifacts are not used for subsequent builds
- rm -rf $HOME/.m2/repository/org/postgresql || true
- export JDK6_HOME=$(jdk_switcher home openjdk6)
- export JDK7_HOME=$(jdk_switcher home openjdk7)
- export JDK8_HOME=$(jdk_switcher home oraclejdk8)
- export JDK9_HOME=/usr/lib/jvm/zulu-9-amd64
- test -d "${JDK9_HOME}" || export JDK9_HOME=$(jdk_switcher home oraclejdk8)
- test -d "${JDK6_HOME}" || export JDK6_HOME=$(jdk_switcher home openjdk6)
- test -d "${JDK7_HOME}" || export JDK7_HOME=$(jdk_switcher home openjdk7)
- test -d "${JDK8_HOME}" || export JDK8_HOME=$(jdk_switcher home oraclejdk8)
- test -d "${JDK9_HOME}" || export JDK9_HOME=$(jdk_switcher home oraclejdk9)
- test -d "${JDK9_HOME}" || export JDK9_HOME=$(jdk_switcher home oraclejdk8) # JDK9 missing on precise, fallback to JDK8
- envsubst < toolchains.xml > ~/.m2/toolchains.xml
- test ${JDK} -eq 9 || jdk_switcher use oraclejdk8 # Run Maven with Java 8, build with Toolchains.
- ./.travis/travis_build.sh
- ./.travis/travis_check_postgres_health.sh
# To avoid useless S3 cache updates (https://github.com/travis-ci/travis-ci/issues/1441#issuecomment-67607074)
@@ -62,49 +67,57 @@ matrix:
- FEDORA_CI=Y
services:
- docker
- jdk: oraclejdk9
addons:
apt:
packages:
- oracle-java9-installer # Test with latest update
postgresql: "9.6"
env:
- PG_VERSION=9.6
- JDK=9
- jdk: oraclejdk8
sudo: required
dist: trusty
env:
- PG_VERSION=HEAD
- XA=true
- REPLICATION=Y
- COVERAGE=Y
- jdk: oraclejdk8
sudo: required
dist: trusty
addons:
postgresql: "9.6"
env:
- PG_VERSION=9.6
- ZULU_JDK=8
- XA=true
- REPLICATION=Y
- COVERAGE=Y
- MCENTRAL=Y
- JDOC=Y
- jdk: oraclejdk8
sudo: required
dist: trusty
addons:
postgresql: "9.5"
env:
- PG_VERSION=9.5
- XA=true
- REPLICATION=Y
- COVERAGE=Y
- jdk: oraclejdk8
sudo: required
addons:
postgresql: "9.4"
apt:
packages:
- oracle-java8-installer
sudo: required
dist: trusty
- oracle-java8-installer # Test with latest update
postgresql: "9.4"
env:
- PG_VERSION=9.4
- LATEST_JAVA_UPDATE=Y # Use Travis last Java update
- XA=true
- REPLICATION=Y
- COVERAGE=Y
- MCENTRAL=Y
- JDOC=Y
- jdk: oraclejdk8
sudo: required
dist: precise
env:
- PG_VERSION=8.4
- XA=true
@@ -123,85 +136,66 @@ matrix:
- jdk: oraclejdk8
sudo: required
dist: precise
env: # this has to match allow_failures above
env:
- PG_VERSION=8.2
- XA=true
- COVERAGE=Y
- NO_HSTORE=Y
- CREATE_PLPGSQL=Y
- jdk: # JDK9 EA Azul Zulu OpenJDK
sudo: required
dist: trusty
- jdk: oraclejdk8
addons:
postgresql: "9.6"
before_install:
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9
- sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main'
- sudo apt-get update -q
- sudo apt-get install zulu-9 -y
env:
- PG_VERSION=9.6
- JDK=9
- jdk: openjdk7
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- MCENTRAL=Y
- jdk: openjdk6
dist: precise # Trusty does not have Java 6, and installers no longer work
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- MCENTRAL=Y
- jdk: oraclejdk8
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- TEST_CLIENTS=Y
- jdk: oraclejdk8
addons:
postgresql: "9.4"
postgresql: "9.6"
env:
- PG_VERSION=9.4
- PG_VERSION=9.6
- QUERY_MODE=simple
- COVERAGE=Y
- ANORM_SBT=Y
- jdk: oraclejdk8
addons:
postgresql: "9.4"
postgresql: "9.6"
env:
- PG_VERSION=9.4
- PG_VERSION=9.6
- QUERY_MODE=extendedForPrepared
- COVERAGE=Y
- jdk: oraclejdk8
addons:
postgresql: "9.4"
postgresql: "9.5"
env:
- PG_VERSION=9.4
- PG_VERSION=9.5
- NO_WAFFLE_NO_OSGI=Y
- JDOC=Y
- jdk: openjdk7
sudo: required
addons:
postgresql: "9.4"
env:
- PG_VERSION=9.4
- ZULU_JDK=7
- MCENTRAL=Y
- jdk: openjdk7
sudo: required
addons:
postgresql: "9.3"
env:
- PG_VERSION=9.3
- COVERAGE=Y
- ZULU_JDK=7
- jdk: openjdk6
dist: precise # Trusty does not have Java 6, and installers no longer work
addons:
postgresql: "9.2"
sudo: required
env:
- PG_VERSION=9.2
- COVERAGE=Y
- jdk: oraclejdk8
sudo: required # to install PostgreSQL 9.1
addons:
postgresql: "9.1"
- ZULU_JDK=6
- MCENTRAL=Y
- jdk: openjdk6
sudo: required
env:
- PG_VERSION=9.1
- COVERAGE=Y
- ZULU_JDK=6
# Deploy snapshots to Maven Central
after_success:
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -o xtrace -o errexit
if [[ "${TRAVIS_SUDO}" == "true" && -n "${ZULU_JDK}" ]]
then
# Install OpenJDK Zulu from repository
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9
sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main'
sudo apt-get update -qq && sudo apt-get install zulu-${ZULU_JDK} -y
fi

0 comments on commit 646a868

Please sign in to comment.