Skip to content

Commit

Permalink
Switch to AdoptOpenJDK 11.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Aug 8, 2020
1 parent b5fb6cd commit e345c1a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
language: java
jdk:
- openjdk11

services:
- docker

Expand All @@ -20,6 +16,7 @@ before_install:
- curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-`uname -s`-`uname -m` > /tmp/docker-compose
- chmod +x /tmp/docker-compose
- sudo mv /tmp/docker-compose /usr/local/bin
- ./ci/install-jdk.sh
- APP_VERSION=$([ -n "${TRAVIS_TAG}" ] && echo "${TRAVIS_TAG#*v}" || echo "${TRAVIS_BRANCH##*/}")
- DOCKER_IMAGE_VERSION=$([ -n "${TRAVIS_TAG}" ] && echo "${TRAVIS_TAG}" || echo "${TRAVIS_BRANCH##*/}")

Expand All @@ -32,7 +29,7 @@ install:

script:
- chmod +x gradlew && ./gradlew inttest --tests com.faforever.api.clan.ClanControllerTest
# - chmod +x gradlew && ./gradlew ${GRADLE_CLI_OPTS} build -Pversion=${APP_VERSION}
- chmod +x gradlew && ./gradlew ${GRADLE_CLI_OPTS} build -Pversion=${APP_VERSION}

after_success:
- ./gradlew ${GRADLE_CLI_OPTS} jacocoTestReport coveralls
Expand Down
16 changes: 16 additions & 0 deletions ci/installjdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

if test -d "~/$JDK"; then
echo "already installed"
exit 0
fi

mkdir -p ~/bin
url="https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh"
wget "$url" -P ~/bin/ || {
echo "${ANSI_RED}Could not acquire install-jdk.sh. Stopping build.${ANSI_RESET}" >/dev/stderr
exit 2
}
chmod +x ~/bin/install-jdk.sh
export JAVA_HOME="~/$JDK"
~/bin/install-jdk.sh --url "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz" --target "$JAVA_HOME" --workspace "$TRAVIS_HOME/.cache/install-jdk" --cacerts

0 comments on commit e345c1a

Please sign in to comment.