forked from eclipse-ee4j/eclipselink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
96 lines (84 loc) · 4.74 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
92
93
94
95
96
#
# Copyright (c) 2019, 2021 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
dist: xenial
branches:
except:
- /^[12].[0-6].*/
services:
- mysql
env:
global:
- ANT_HOME=$HOME/apache-ant-1.10.7
- M2_HOME=/usr/local/maven-3.6.3
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=build-distribution
jobs:
allow_failures:
- jdk: openjdk14
jdk:
- openjdk8
- openjdk11
- openjdk14
cache:
directories:
- .autoconf
- $HOME/.m2
- $HOME/extension.lib.external
before_install:
- wget https://dev.mysql.com/get/mysql-apt-config_0.8.17-1_all.deb
- sudo dpkg -i mysql-apt-config_0.8.17-1_all.deb
- sudo apt-get update -q
- sudo apt-get install -q -y --allow-unauthenticated -o Dpkg::Options::=--force-confnew mysql-server
- sudo systemctl restart mysql
- sudo mysql_upgrade
- mysql --version
- sudo mysql -u root -e "use mysql; ALTER USER 'root'@'localhost' IDENTIFIED BY 'root'; FLUSH PRIVILEGES;CREATE DATABASE IF NOT EXISTS ecltest;"
- sudo service mysql restart
- sudo mysql -u root -proot -e "SET GLOBAL log_bin_trust_function_creators = 1;"
install:
- mkdir $HOME/extension.lib.external || true
- wget -nc https://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar -O $HOME/extension.lib.external/junit-4.12.jar || true
- wget -nc https://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 https://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 https://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 https://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 https://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 https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.7-bin.tar.gz -O $HOME/extension.lib.external/apache-ant-1.10.7-bin.tar.gz || true
- wget -nc https://download.eclipse.org/eclipse/downloads/drops4/R-4.10-201812060815/eclipse-SDK-4.10-linux-gtk-x86_64.tar.gz -O $HOME/extension.lib.external/eclipse-SDK-4.10-linux-gtk-x86_64.tar.gz || true
- wget -nc https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.25/mysql-connector-java-8.0.25.jar -O $HOME/extension.lib.external/mysql-connector-java.jar || true
- tar -x -z -C $HOME -f $HOME/extension.lib.external/apache-ant-1.10.7-bin.tar.gz
- tar -x -z -C $HOME/extension.lib.external -f $HOME/extension.lib.external/eclipse-SDK-4.10-linux-gtk-x86_64.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=$HOME/extension.lib.external/mysql-connector-java.jar" >> $HOME/build.properties
- echo 'db.driver=com.mysql.cj.jdbc.Driver' >> $HOME/build.properties
- echo 'db.url=jdbc:mysql://localhost/ecltest?useSSL=false&allowPublicKeyRetrieval=true' >> $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 "eclipse.install.dir=$HOME/extension.lib.external/eclipse" >> $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
- echo 'RUNNING TESTS, BE PATIENT...'
- 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:"