In Travis-CI, test Maven and Gradle separately and concurrently

This should help identify cases where the Gradle build only works if
it runs before or after a Maven build.  It will also help us recognize
any Maven regressions accidentally introduced by our Gradle work.
This commit is contained in:
Ben Liblit 2017-12-19 10:56:41 -06:00
parent dec3b8f15b
commit ad60605fe8
9 changed files with 42 additions and 14 deletions

View File

@ -1,3 +1,4 @@
sudo: false
language: android
android:
components:
@ -11,22 +12,14 @@ addons:
before_install:
- echo $ANDROID_HOME
- git clone --depth=1 https://github.com/secure-software-engineering/DroidBench.git /tmp/DroidBench
- export M2_HOME=$HOME/apache-maven-3.5.0
- if [ ! -d $M2_HOME/bin ]; then curl https://archive.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz | tar zxf - -C $HOME; fi
- export PATH=$M2_HOME/bin:$PATH
install:
- mvn clean verify -DskipTests=true -B -q
- ./gradlew compileJava
script:
- xvfb ./gradlew build
- xvfb-run mvn clean install -B -q
- bash ./dependent-projects-trigger.sh $AUTH_TOKEN
- mvn javadoc:aggregate -B -q
- bash ./upload-javascript.sh $GH_TOKEN
- ./build-maven-jars.py "install -Dgpg.skip"
sudo: false
- source "travis/before-install-$BUILD_SYSTEM"
install: source "travis/install-$BUILD_SYSTEM"
script: source "travis/script-$BUILD_SYSTEM"
before_cache: source "travis/before-cache-$BUILD_SYSTEM"
cache:
directories:
- "$HOME/.gradle/caches"
- "$HOME/.gradle/wrapper"
- "$HOME/.m2"
- "$HOME/apache-maven-3.5.0"
- "$TRAVIS_BUILD_DIR/com.ibm.wala.core.testdata/ocaml/ocamljava-2.0-alpha1/lib"
@ -34,3 +27,6 @@ env:
global:
- secure: KcugjQYnBqeZ7XenZD5QY7jhekVPO0QpQyjDUteLytaokhyRK2g6eNvr/pPerN2uWUvsPwO18P9F+oOupge1cpPZf4cEY8RzLIromyUoRWd6JA0SKciUYdN2kSqnC4uZSJGXeGLoroyEEL4Q2sqimpkbIGxgxYtVniWgJULOyR4=
- secure: jacvGPYX4ugG/HgwJEEpWnllWsS/ipX+qRJ7qM5mbDYryeqsz0eiaxBxQ6IpDyj0v6O4DUi74lSQs/UxCWcUxvOn/5AweCZfoF1U8vt1xivanR4MbC2kr6rJ6ohICuJ4PHDS4IffncgaP3Y8cfExHq6+d0tbibYkjRIiMUGpSik=
matrix:
- BUILD_SYSTEM=gradle
- BUILD_SYSTEM=maven

View File

@ -0,0 +1,7 @@
# -*- mode: sh; sh-shell: sh -*-
caches="$HOME/.gradle/caches"
rm --force --recursive \
"$caches/modules-2/modules-2.lock" \
"$caches"/*/plugin-resolution

View File

View File

View File

@ -0,0 +1,9 @@
# -*- mode: sh; sh-shell: sh -*-
export M2_HOME=$HOME/apache-maven-3.5.0
if [ ! -d $M2_HOME/bin ]; then
curl https://archive.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz | tar zxf - -C $HOME
fi
export PATH=$M2_HOME/bin:$PATH

3
travis/install-gradle Normal file
View File

@ -0,0 +1,3 @@
# -*- mode: sh; sh-shell: sh -*-
./gradlew assemble

3
travis/install-maven Normal file
View File

@ -0,0 +1,3 @@
# -*- mode: sh; sh-shell: sh -*-
mvn clean verify -DskipTests=true -B -q

3
travis/script-gradle Normal file
View File

@ -0,0 +1,3 @@
# -*- mode: sh; sh-shell: sh -*-
xvfb-run ./gradlew check javadoc

7
travis/script-maven Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: sh; sh-shell: sh -*-
xvfb-run mvn clean install -B -q
bash ./dependent-projects-trigger.sh "$AUTH_TOKEN"
mvn javadoc:aggregate -B -q
bash ./upload-javascript.sh "$GH_TOKEN"
./build-maven-jars.py "install -Dgpg.skip"