Skip to content

Import travis config from scala-dev #374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 10 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,28 @@
language: scala
version: ~> 1.0 # needed for imports

import: scala/scala-dev:travis/default.yml

# This sets $TRAVIS_JDK_VERSION which is used, in turn, to get a
# version of AdoptOpenJDK with the install-jdk.sh command.
jdk:
- openjdk8
- openjdk11
language: scala

scala:
- 0.20.0-RC1
- 2.12.10
- 2.13.1

env:
# The empty SCALAJS_VERSION will only compile for the JVM
- SCALAJS_VERSION=
- SCALAJS_VERSION=0.6.31
- SCALAJS_VERSION=1.0.0-M8
- SCALAJS_VERSION= ADOPTOPENJDK=8
- SCALAJS_VERSION=0.6.31 ADOPTOPENJDK=8
- SCALAJS_VERSION=1.0.0-M8 ADOPTOPENJDK=8
- SCALAJS_VERSION= ADOPTOPENJDK=11

matrix:
exclude:
- jdk: openjdk11
env: SCALAJS_VERSION=0.6.29
- jdk: openjdk11
env: SCALAJS_VERSION=1.0.0-M8
- scala: 0.20.0-RC1
env: SCALAJS_VERSION=0.6.31
env: SCALAJS_VERSION=0.6.31 ADOPTOPENJDK=8
- scala: 0.20.0-RC1
env: SCALAJS_VERSION=1.0.0-M8
env: SCALAJS_VERSION=1.0.0-M8 ADOPTOPENJDK=8

install:
- export JAVA_HOME=$HOME/$TRAVIS_JDK_VERSION
- install-jdk.sh --url "https://api.adoptopenjdk.net/v2/binary/releases/$TRAVIS_JDK_VERSION?openjdk_impl=hotspot&os=linux&arch=x64&release=latest&heap_size=normal&type=jdk" --target $JAVA_HOME
- export PATH=$JAVA_HOME/bin:$PATH
- java -Xmx32m -version
- git fetch --tags # get all tags for sbt-dynver

script: ./build.sh

before_cache:
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2/cache -name "ivydata-*.properties" | xargs rm
- rm -f $HOME/.ivy2/.sbt.ivy.lock
- find $HOME/.coursier -name "*.lock" | xargs rm
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt
- $HOME/.cache/coursier
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set -e

# For normal tags that are cross-built, we release on JDK 8 for Scala 2.x
isReleaseJob() {
if [[ "$TRAVIS_JDK_VERSION" == "openjdk8" && "$TRAVIS_SCALA_VERSION" =~ ^2\.1[234]\..*$ ]]; then
if [[ "$ADOPTOPENJDK" == "8" && "$TRAVIS_SCALA_VERSION" =~ ^2\.1[234]\..*$ ]]; then
true
else
false
Expand All @@ -25,7 +25,7 @@ isReleaseJob() {

# For tags that define a Scala version, we pick the jobs of one Scala version (2.13.x) to do the releases
isTagScalaReleaseJob() {
if [[ "$TRAVIS_JDK_VERSION" == "openjdk8" && "$TRAVIS_SCALA_VERSION" =~ ^2\.13\.[0-9]+$ ]]; then
if [[ "$ADOPTOPENJDK" == "8" && "$TRAVIS_SCALA_VERSION" =~ ^2\.13\.[0-9]+$ ]]; then
true
else
false
Expand All @@ -46,7 +46,7 @@ if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
tagScalaVer=$(echo $TRAVIS_TAG | sed s/[^#]*// | sed s/^#//)
if [[ "$tagScalaVer" == "" ]]; then
if ! isReleaseJob; then
echo "Not releasing on Java ${TRAVIS_JDK_VERSION#openjdk} with Scala $TRAVIS_SCALA_VERSION"
echo "Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION"
exit 0
fi
else
Expand Down