8000 JDK selection: allow non-Adopt early access builds by SethTisue · Pull Request #780 · scala/scala-dev · GitHub
[go: up one dir, main page]

Skip to content

JDK selection: allow non-Adopt early access builds #780

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 privac 8000 y statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2021
Merged
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
JDK selection: allow non-Adopt early access builds
so e.g. at the moment ADOPTOPENJDK=17 will get us 17.ea.28-open
  • Loading branch information
SethTisue committed Jun 25, 2021
commit 1a7c0e6ce46f611686d38a0ae96ca51528352038
5 changes: 4 additions & 1 deletion travis/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ before_install:
echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config
source $HOME/.sdkman/bin/sdkman-init.sh
sdkJava=$(sdk list java | grep -o " $ADOPTOPENJDK\.[0-9\.]*hs-adpt" | head -1 | cut -c2-)
# if we didn't find AdoptOpenJDK, accept a non-Adopt early access build
if [[ -z $sdkJava ]]; then sdkJava=$(sdk list java | egrep -o " $ADOPTOPENJDK\\.ea.[0-9]+-open" | head -1 | cut -c2-); fi
if [[ -z $sdkJava ]]; then echo "no matching JDK found: $ADOPTOPENJDK"; travis_terminate 1; fi
sdk install java $sdkJava || true # install fails if it's already installed
sdk use java $sdkJava
unset JAVA_HOME
if [[ $ADOPTOPENJDK == 8 ]]; then versionPrefix="1\.8"; else versionPrefix=$ADOPTOPENJDK; fi
java -version
- java -version 2>&1 | grep 'AdoptOpenJDK.*[^0-9]'$versionPrefix'[^0-9]' || exit 1
- java -version 2>&1 | grep 'OpenJDK.*[^0-9]'$versionPrefix'[^0-9]' || exit 1
# Travis-CI has (as of March 2021, anyway) an outdated sbt-extras version,
# so overwrite it with a March 2021 version that works with sbt 1.4.8+
- |
Expand Down
0