From 98aca7ffcbf282b2885ad4b9c433927a5ac0e78b Mon Sep 17 00:00:00 2001 From: Martin Grigorov Date: Mon, 4 Jan 2021 04:41:14 +0200 Subject: [PATCH] Add a TravisCI job to build and test on ARM64 (#2539) --- .travis.yml | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 34d38c2c..b82c4833 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: trusty +dist: bionic notifications: email: @@ -9,23 +9,38 @@ notifications: language: java -jdk: - - oraclejdk8 - matrix: include: # On OSX, run with default JDK only. # - os: osx - # On Linux, run with specific JDKs only. - - os: linux - env: CUSTOM_JDK="oraclejdk8" - + # On Linux we install latest OpenJDK 1.8 from Ubuntu repositories + - name: Linux x86_64 + arch: amd64 + - name: Linux aarch64 + arch: arm64 + +cache: + directories: + - $HOME/.m2/repository + before_install: + - lscpu - echo 'MAVEN_OPTS="$MAVEN_OPTS -Xmx1024m -XX:MaxPermSize=512m -XX:+BytecodeVerificationLocal"' >> ~/.mavenrc - cat ~/.mavenrc - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export JAVA_HOME=$(/usr/libexec/java_home); fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then jdk_switcher use "$CUSTOM_JDK"; fi +install: | + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + sudo apt update + sudo apt install -y openjdk-8-jdk maven + export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-${TRAVIS_CPU_ARCH}/" + export PATH="$JAVA_HOME/bin:/usr/share/maven/bin:$PATH" + fi + +before_script: + - java -version + - mvn -version + script: - travis_retry mvn -B clean apache-rat:check - travis_retry mvn -B package jacoco:report coveralls:report -- GitLab