diff --git a/.travis.yml b/.travis.yml index 01be4b526..e2e72f804 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,36 @@ language: java +os: linux +jdk: oraclejdk8 + +env: + - SBT_TEST_CMD="validate" + - SBT_TEST_CMD="++2.12.2 ^^1.0.0-M6 validate" + - SBT_TEST_CMD="validateUniversal" + - SBT_TEST_CMD="++2.12.2 ^^1.0.0-M6 validateUniversal" + - SBT_TEST_CMD="validateJar" + - SBT_TEST_CMD="++2.12.2 ^^1.0.0-M6 validateJar" + - SBT_TEST_CMD="validateBash" + - SBT_TEST_CMD="++2.12.2 ^^1.0.0-M6 validateBash" + - SBT_TEST_CMD="validateAsh" + - SBT_TEST_CMD="++2.12.2 ^^1.0.0-M6 validateAsh" + - SBT_TEST_CMD="validateRpm" + - SBT_TEST_CMD="++2.12.2 ^^1.0.0-M6 validateRpm" + - SBT_TEST_CMD="validateDebian" + - SBT_TEST_CMD="++2.12.2 ^^1.0.0-M6 validateDebian" + - SBT_TEST_CMD="validateDocker" + - SBT_TEST_CMD="++2.12.2 ^^1.0.0-M6 validateDocker" + - SBT_TEST_CMD="validateJdkPackager" + - SBT_TEST_CMD="++2.12.2 ^^1.0.0-M6 validateJdkPackager" before_install: - if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then brew update; brew install xz; fi -script: - - if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then - ./sbt "$SBT_VERSION_CMD validateOSX" ; - fi - - if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then - ./sbt "$SBT_VERSION_CMD validateLinux" ; - fi +script: ./sbt "$SBT_TEST_CMD" ; matrix: include: - - os: linux - env: SBT_VERSION_CMD="++2.10.6" - jdk: oraclejdk8 - - os: linux - env: SBT_VERSION_CMD="++2.12.2 ^^1.0.0-M6" - jdk: oraclejdk8 # oraclejdk8 is not yet available. # see https://github.com/travis-ci/travis-ci/issues/2316 - os: osx diff --git a/build.sbt b/build.sbt index 9972dfcd3..852982bfa 100644 --- a/build.sbt +++ b/build.sbt @@ -129,15 +129,20 @@ bintrayRepository := "sbt-plugin-releases" scalafmtConfig := Some(file(".scalafmt.conf")) // ci commands -addCommandAlias( - "validate", - "; update ; test ; set scriptedBufferLog := false ; scripted jdkpackager/test-package-minimal jdkpackager/test-package-mappings" -) -addCommandAlias("validateUnix", "scripted universal/* jar/* bash/* ash/*") - -addCommandAlias("validateOSX", "; validate ; validateUnix") -addCommandAlias( - "validateLinux", - "; validate ; validateUnix ; scripted rpm/* debian/* docker/staging docker/entrypoint docker/ports docker/volumes" -) -addCommandAlias("validateWindows", ";test-only * -- -n windows;scripted universal/dist universal/stage windows/*") +addCommandAlias("validate", "; clean ; update ; test") + +// List all scripted test separately to schedule them in different travis-ci jobs. +// Travis-CI has hard timeouts for jobs, so we run them in smaller jobs as the scripted +// tests take quite some time to run. +// Ultimatley we should run only those tests that are necessary for a change +addCommandAlias("validateUniversal", "scripted universal/*") +addCommandAlias("validateJar", "scripted jar/*") +addCommandAlias("validateBash", "scripted bash/*") +addCommandAlias("validateAsh", "scripted ash/*") +addCommandAlias("validateRpm", "scripted rpm/*") +addCommandAlias("validateDebian", "scripted debian/*") +addCommandAlias("validateDocker", "scripted docker/*") +addCommandAlias("validateJdkPackager", "scripted docker/*") + +// TODO check the cygwin scripted tests and run them on appveyor +addCommandAlias("validateWindows", "; test-only * -- -n windows;scripted universal/dist universal/stage windows/*")