-
Notifications
You must be signed in to change notification settings - Fork 121
/
.travis.yml
56 lines (44 loc) · 1.29 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
language: java
dist: trusty
services: mysql
before_script:
# Import Database
- mysql -e 'CREATE DATABASE test;'
- mysql test < voj.sql
before_install:
# Download JDK installer
- wget https://github.com/sormuras/bach/raw/master/install-jdk.sh
# Fix path error on JNI headers
- sudo ln -nsf $JAVA_HOME/include/linux/jni_md.h $JAVA_HOME/include/jni_md.h
- sudo ln -nsf $JAVA_HOME/include/linux/jawt_md.h $JAVA_HOME/include/jawt_md.h
# Setup test environment for Linux
- cp judger/src/test/resources/voj-test-linux.properties judger/src/test/resources/voj-test.properties
# Find Maven Installation Path for root user
- sudo find / -name mvn
- export MVN_EXEC=`sudo find / -name mvn`
# Setup Maven for Oracle JDK 9
- export MAVEN_SKIP_RC=true
matrix:
fast_finish: true
include:
- env: JDK='Oracle JDK 8'
jdk: oraclejdk8
- env: JDK='Open JDK 8'
jdk: openjdk8
- env: JDK='Oracle JDK 11'
install: . ./install-jdk.sh -F 11 -L BCL
- env: JDK='Open JDK 11'
jdk: openjdk11
allow_failures:
- env: JDK='Oracle JDK 11'
script:
- echo PATH = ${PATH}
- echo JAVA_HOME = ${JAVA_HOME}
- java -version
- mvn test -f web/pom.xml
- sudo $MVN_EXEC test -f judger/pom.xml
after_script:
- mysql -e 'DROP DATABASE test;'
cache:
directories:
- $HOME/.m2