scala / scala-dev

Scala 2 team issues. Not for user-facing bugs or directly actionable user-facing improvements. For build/test/infra and for longer-term planning and idea tracking. Our bug tracker is at https://github.com/scala/bug/issues
Apache License 2.0
130 stars 15 forks source link

change our CI (org-wide) to use AdoptOpenJDK #587

Closed SethTisue closed 4 years ago

SethTisue commented 5 years ago

@adriaanm I wrote down "create an Adopt OpenJDK ticket, assign it to myself, say I plan to do it in January" but now I can't remember what this meant exactly... was it to add AdoptOpenJDK to our scala/scala CI matrix, or the community build, or what? if you can't remember either I can review the team meeting video and find out

adriaanm commented 5 years ago

it was originally about standardizing on adoptopenjdk hotspot on travis ci (installed using jabba), but in the mean time we're no longer sure because they have not yet been able to license the TCK

SethTisue commented 5 years ago

okay, we'll do nothing for now, and re-sync with others at Lightbend on this in January or whenever. it's mainly downstream projects (Akka, Play, etc) where it might really matter actually, so we can wait and follow their lead.

SethTisue commented 5 years ago

note to self, since I already forgot once: the issue is that Oracle OpenJDK, which we're currently using on our own machines and on Jenkins and Travis, will eventually stop receiving security updates. that's the reason we will ultimately want to be using AdoptOpenJDK (or something)

dwijnand commented 5 years ago

Setting up Travis CI to use AdoptOpenJDK is quite simple:

before_install: curl -Ls https://git.io/jabba | bash && . ~/.jabba/jabba.sh
install: jabba install adopt@1.8.202-08 && jabba use "$_" && java -version

An example of a matrix using v8 and v11, with v11 being allowed to fail:

before_install: curl -Ls https://git.io/jabba | bash && . ~/.jabba/jabba.sh
install: jabba install "$TRAVIS_JDK" && jabba use "$_" && java -version

env:
  - TRAVIS_JDK=adopt@1.8.202-08
  - TRAVIS_JDK=adopt@1.11.0-2

matrix:
  fast_finish: true
  allow_failures:
    - env: TRAVIS_JDK=adopt@1.11.0-2 # not fully supported but allows problem discovery

And don't forget to cache the installed jdks:

cache:
  directories:
    - $HOME/.jabba/jdk
SethTisue commented 5 years ago

@eed3si9n is working on this

eed3si9n commented 5 years ago
SethTisue commented 4 years ago

I think this is done, or done enough to close the ticket anyway, any missing repo would be a very obscure one, I think. all the modules repos are using https://github.com/scala/scala-dev/blob/scala-dev/travis/default.yml. the community build is on AdoptOpenJDK (for 11+ anyway, not sure about 8, but whatevs)