Re-enable and fix jdk6 travis tests

This commit is contained in:
Travis Burtrum 2018-09-25 23:35:44 -04:00
parent d63e719ce0
commit 6988a438ba
7 changed files with 33 additions and 20 deletions

View File

@ -46,20 +46,23 @@ script:
matrix: matrix:
include: include:
# - env: JDK='OpenJDK 6' - env: JDK='OpenJDK 6'
# addons: addons:
# apt: apt:
# packages: packages:
# - openjdk-6-jdk - openjdk-6-jdk
# script: - ca-certificates-java
# # java6 doesn't support ms-sql at all, and doesn't support h2 with ANY - openjdk-7-jre-headless
# - mvn -Dhttps.protocols=TLSv1.2 -B -pl '!test' clean install || travis_terminate 1; script:
# - mvn -B -pl test clean test -DjdbcMapper.databaseType=BIND --settings .travis-settings.xml -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1; # java6 doesn't support ms-sql at all, and doesn't support h2 with ANY
# - mvn -B -pl test clean test -DjdbcMapper.databaseType=BIND -DqueryMapper.databaseType=OPTIMAL --settings .travis-settings.xml -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1; - .travis/dl_java6_maven.sh
# - mvn -B -pl test clean test -DjdbcMapper.databaseType=ANY '-DjdbcUrl=jdbc:postgresql:test_db' || travis_terminate 1; - mvn --offline -B -pl '!test' clean install || travis_terminate 1;
# - mvn -B -pl test clean test -DjdbcMapper.databaseType=ORACLE --settings .travis-settings.xml -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND --settings .travis-settings.xml -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
# - mvn -B -pl test clean test -DjdbcMapper.databaseType=UNNEST '-DjdbcUrl=hsqldb' || travis_terminate 1; - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -DqueryMapper.databaseType=OPTIMAL --settings .travis-settings.xml -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
# jdk: openjdk6 - mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ANY '-DjdbcUrl=jdbc:postgresql:test_db' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ORACLE --settings .travis-settings.xml -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=UNNEST '-DjdbcUrl=hsqldb' || travis_terminate 1;
jdk: openjdk6
- env: JDK='OpenJDK 7' - env: JDK='OpenJDK 7'
jdk: openjdk7 jdk: openjdk7
script: script:
@ -98,7 +101,7 @@ install:
export CUSTOM_MVN_VERION="3.2.5"; export CUSTOM_MVN_VERION="3.2.5";
echo "Download Maven ${CUSTOM_MVN_VERION}...."; echo "Download Maven ${CUSTOM_MVN_VERION}....";
export M2_HOME=$HOME/.traviscache/apache-maven-${CUSTOM_MVN_VERION}; export M2_HOME=$HOME/.traviscache/apache-maven-${CUSTOM_MVN_VERION};
[ -d $M2_HOME ] || wget https://archive.apache.org/dist/maven/maven-3/${CUSTOM_MVN_VERION}/binaries/apache-maven-${CUSTOM_MVN_VERION}-bin.zip; [ -d $M2_HOME ] || wget -q https://archive.apache.org/dist/maven/maven-3/${CUSTOM_MVN_VERION}/binaries/apache-maven-${CUSTOM_MVN_VERION}-bin.zip;
[ -d $M2_HOME ] || unzip -qq apache-maven-${CUSTOM_MVN_VERION}-bin.zip; [ -d $M2_HOME ] || unzip -qq apache-maven-${CUSTOM_MVN_VERION}-bin.zip;
[ -d $M2_HOME ] || mv apache-maven-${CUSTOM_MVN_VERION} $M2_HOME; [ -d $M2_HOME ] || mv apache-maven-${CUSTOM_MVN_VERION} $M2_HOME;
export PATH=$M2_HOME/bin:$PATH; export PATH=$M2_HOME/bin:$PATH;
@ -109,6 +112,7 @@ after_success:
- if [ "${JDK}" == 'OpenJDK 8' ] || [ "${JDK}" == 'OpenJDK 6' ]; then - if [ "${JDK}" == 'OpenJDK 8' ] || [ "${JDK}" == 'OpenJDK 6' ]; then
mvn deploy --settings .travis-settings.xml -DskipTests=true -B || travis_terminate 1; mvn deploy --settings .travis-settings.xml -DskipTests=true -B || travis_terminate 1;
fi fi
- rm -rf $HOME/.m2/repository/com/moparisthebest/jdbcmapper
cache: cache:
directories: directories:

9
.travis/dl_java6_maven.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# maven central only supports TLS 1.2+ now, and java 6 does not, ouch, use java 7 to download them...
set -e
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 mvn -B -Dhttps.protocols=TLSv1.2 --settings .travis-settings.xml -P oracle clean install
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 mvn --offline -B clean
git checkout -- .
git clean -dxf
rm -rf ~/.m2/repository/com/moparisthebest/jdbcmapper

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
if [[ ! -f $HOME/.traviscache/oracle-xe-11.2.0-1.0.x86_64.rpm.zip ]] if [[ ! -f $HOME/.traviscache/oracle-xe-11.2.0-1.0.x86_64.rpm.zip ]]
then then
wget -O $HOME/.traviscache/oracle-xe-11.2.0-1.0.x86_64.rpm.zip "$ORACLE_XE_URL" wget -q -O $HOME/.traviscache/oracle-xe-11.2.0-1.0.x86_64.rpm.zip "$ORACLE_XE_URL"
fi fi

View File

@ -20,7 +20,7 @@
</build> </build>
<profiles> <profiles>
<profile> <profile>
<id>jdk16</id> <id>jdk6</id>
<activation> <activation>
<jdk>[1.6,1.8)</jdk> <jdk>[1.6,1.8)</jdk>
</activation> </activation>

View File

@ -47,7 +47,7 @@
</build> </build>
<profiles> <profiles>
<profile> <profile>
<id>jdk16</id> <id>jdk6</id>
<activation> <activation>
<jdk>[1.6,1.8)</jdk> <jdk>[1.6,1.8)</jdk>
</activation> </activation>

View File

@ -32,7 +32,7 @@
</build> </build>
<profiles> <profiles>
<profile> <profile>
<id>jdk16</id> <id>jdk6</id>
<activation> <activation>
<jdk>[1.6,1.8)</jdk> <jdk>[1.6,1.8)</jdk>
</activation> </activation>

View File

@ -111,7 +111,7 @@
</dependencies> </dependencies>
</profile> </profile>
<profile> <profile>
<id>jdk16</id> <id>jdk6</id>
<activation> <activation>
<jdk>[1.6,1.8)</jdk> <jdk>[1.6,1.8)</jdk>
</activation> </activation>