This repository has been archived by the owner on Jul 6, 2022. It is now read-only.
forked from graphhopper/graphhopper
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.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
sudo: true
dist: trusty
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="
matrix:
include:
- jdk: openjdk8
- env: JDK='OpenJDK 11'
install: . ./install-jdk.sh -F 11 -C
- env: JDK='OpenJDK 12'
install: . ./install-jdk.sh -F 12 -C
# 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 https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh'
# avoid increase of memory via travis https://github.com/travis-ci/travis-ci/issues/8408
before_script:
- _JAVA_OPTIONS=
# 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 test verify checkstyle:check spotbugs:check forbiddenapis:check -B"
after_success:
# if tagged deploy then release to maven central or deploy snapshot artifacts to sonatype
- if [ "$TRAVIS_JDK_VERSION" == "openjdk8" ] && [ "$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 [ "$TRAVIS_JDK_VERSION" == "openjdk8" ] && [ "$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