forked from eclipse-ee4j/eclipselink
-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
91 lines (81 loc) · 4.55 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#
# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0,
# or the Eclipse Distribution License v. 1.0 which is available at
# http://www.eclipse.org/org/documents/edl-v10.php.
#
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
#
language: java
sudo: required
branches:
except:
- /^[12].[0-6].*/
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- libmysql-java
- mysql-server
- mysql-client
env:
global:
- ANT_HOME=$HOME/apache-ant-1.10.5
- M2_HOME=/usr/local/maven-3.5.2
matrix:
- TEST_TARGET=test-core
- TEST_TARGET=test-jpa22
- TEST_TARGET=test-moxy
- TEST_TARGET=test-sdo
- TEST_TARGET="test-jpa-jse test-ext test-jpql test-wdf test-jpars test-dbws test-dbws-builder test-osgi"
- TEST_TARGET=test-lrg-server
- TEST_TARGET=build-distribution
jdk:
- oraclejdk8
- openjdk10
cache:
directories:
- .autoconf
- $HOME/.m2
- $HOME/extension.lib.external
before_install:
- sudo mysql_upgrade
- sudo mysql -u root -e "use mysql; update user set authentication_string=PASSWORD('root') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;CREATE DATABASE IF NOT EXISTS ecltest;"
- sudo service mysql restart
install:
- mkdir $HOME/extension.lib.external || true
- wget -nc http://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar -O $HOME/extension.lib.external/junit-4.12.jar || true
- wget -nc http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar -O $HOME/extension.lib.external/hamcrest-core-1.3.jar || true
- wget -nc http://repo1.maven.org/maven2/org/jmockit/jmockit/1.35/jmockit-1.35.jar -O $HOME/extension.lib.external/jmockit-1.35.jar || true
- wget -nc http://repo1.maven.org/maven2/org/hibernate/validator/hibernate-validator/6.0.7.Final/hibernate-validator-6.0.7.Final.jar -O $HOME/extension.lib.external/hibernate-validator-6.0.7.Final.jar || true
- wget -nc http://repo1.maven.org/maven2/org/jboss/logging/jboss-logging/3.3.0.Final/jboss-logging-3.3.0.Final.jar -O $HOME/extension.lib.external/jboss-logging-3.3.0.Final.jar || true
- wget -nc http://repo1.maven.org/maven2/org/glassfish/javax.el/3.0.1-b08/javax.el-3.0.1-b08.jar -O $HOME/extension.lib.external/javax.el-3.0.1-b08.jar || true
- wget -nc http://repo1.maven.org/maven2/com/fasterxml/classmate/1.3.1/classmate-1.3.1.jar -O $HOME/extension.lib.external/classmate-1.3.1.jar || true
- wget -nc http://apache.belnet.be/ant/binaries/apache-ant-1.10.5-bin.tar.gz -O $HOME/extension.lib.external/apache-ant-1.10.5-bin.tar.gz || true
- wget -nc http://download.jboss.org/wildfly/14.0.1.Final/wildfly-14.0.1.Final.tar.gz -O $HOME/extension.lib.external/wildfly-14.0.1.Final.tar.gz || true
- tar -x -z -C $HOME -f $HOME/extension.lib.external/apache-ant-1.10.5-bin.tar.gz
before_script:
- env | sort
- echo "extensions.depend.dir=$HOME/extension.lib.external" >> $HOME/build.properties
- echo "junit.lib=$HOME/extension.lib.external/junit-4.12.jar:$HOME/extension.lib.external/hamcrest-core-1.3.jar" >> $HOME/build.properties
- echo 'jdbc.driver.jar=/usr/share/java/mysql.jar' >> $HOME/build.properties
- echo 'db.driver=com.mysql.jdbc.Driver' >> $HOME/build.properties
- echo 'db.url=jdbc:mysql://localhost/ecltest?useSSL=false' >> $HOME/build.properties
- echo 'db.user=root' >> $HOME/build.properties
- echo 'db.pwd=root' >> $HOME/build.properties
- echo 'db.platform=org.eclipse.persistence.platform.database.MySQLPlatform' >> $HOME/build.properties
- echo 'server.name=wildfly' >> $HOME/build.properties
- echo "wildfly.home=$HOME/wildfly-14.0.1.Final" >> $HOME/build.properties
- echo 'wildfly.config=standalone-full.xml' >> $HOME/build.properties
- if [[ $JAVA_HOME == *openjdk10 ]]; then openssl x509 -in <(openssl s_client -connect oss.sonatype.org:443 -prexit 2>/dev/null) -out ~/example.crt; sudo keytool -importcert -file ~/example.crt -alias example -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit -noprompt; fi
script:
- cat $HOME/build.properties
- $ANT_HOME/bin/ant -f antbuild.xml build -Dfail.on.error=true
- echo 'RUNNING TESTS, BE PATIENT...'
- if [ "$TEST_TARGET" == "test-lrg-server" ]; then tar -x -z -C $HOME -f $HOME/extension.lib.external/wildfly-14.0.1.Final.tar.gz; fi
- set -o pipefail
- $ANT_HOME/bin/ant -f antbuild.xml -Dtest.fail.fast=true -Dfail.on.error=true $TEST_TARGET | grep -E "\] Running |\] Tests run:"