forked from graphhopper/graphhopper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (52 loc) · 2.52 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
language: java
os: linux
dist: xenial
env:
global:
- GPG_EXECUTABLE=gpg
# TODO move this into the travis settings
- secure: "j6a61/qnfFcSjx5XxmxO2hqBOwtVx5HWrD1+4Atl7WG/pRKz9+jSga1Y7oDAFb2SIl8S65kDmPQB/vC8aHxUDj/Wizjxnxn1FhPqoe9yO6Ztft+984FKFyvj7s6tsBJKcehGec+chTOwZQpH4oI4rU6IlepDHnGLHiOd0Iviryg="
- secure: "GiFr+v2lTQk/sTQB7CYjju1/mupS8LSJupmizLqY454utiZkabDMBOZQnF9ukpy7WhveB9hKQyEKf9iP2w7HSYEjgvogT26vZ5f2MeLnR4SWvqEtf/WBvvh+W+k/rb2f6YgitkB4Jlxn2izemBEDuKplGJphzGW41lf8XZ2IxVI="
jobs:
include:
- name: JDK8
env: JDK='8/ga' # for backward compatibility and release
# avoid default dependency command for maven, 'true' means 'return true' and continue
install: true
# store them into travis via https://dracoblue.net/dev/uploading-snapshots-and-releases-to-maven-central-with-travis/
# gpg --export-secret-keys <keyID> | base64 -w 0
# gpg --export-ownertrust | base64 -w 0
before_install:
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
- wget -q "https://api.adoptium.net/v3/binary/latest/$JDK/linux/x64/jdk/hotspot/normal/eclipse" -O java.tar.gz
- tar xzf java.tar.gz
- export JAVA_HOME=$(ls -d $PWD/jdk*); echo $JAVA_HOME
# Undo `_JAVA_OPTIONS` environment variable; see https://github.com/travis-ci/travis-ci/issues/8408
before_script:
- _JAVA_OPTIONS=
- "mvn --version"
- "if [ -z \"$API_KEY\" ]; then API_KEY=78da6e9a-273e-43d1-bdda-8f24e007a1fa; fi" # change in GraphHopperWebIT too
script:
- "mvn -Dkey=$API_KEY clean install -B"
after_success:
# often spotbugs etc take long to be compatible with a future JDK version so skip them
- if [ "$SKIP_EXT_TESTS" != "true" ]; then
mvn checkstyle:check forbiddenapis:check;
fi
# if tagged deploy then release to maven central or deploy snapshot artifacts to sonatype
- if [ "$JDK" == "8/ga" ] && [ "$TRAVIS_TAG" != "" ]; then
echo "release to maven central";
mvn versions:set -DnewVersion=$TRAVIS_TAG -DgenerateBackupPoms=false;
mvn deploy -P release --settings core/files/settings.xml -DskipTests=true -B;
elif [ "$JDK" == "8/ga" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
mvn deploy --settings core/files/settings.xml -DskipTests=true -B;
else
echo "Not deploying artifacts for $TRAVIS_BRANCH";
fi
notifications:
email:
- $EMAIL
cache:
directories:
- $HOME/.m2