-
Notifications
You must be signed in to change notification settings - Fork 534
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
[ci] Add template for setting *JAVA_HOME vars #9671
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Testing nightly here https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10820447&view=results |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…ting against older JDK versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look ok to me. 👍
You might double check some of the failing nightly test lanes, just to make sure they don't say "error can't find JDK".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good if the nightly test failures are expected. It appears our nightly tests are already in bad shape so I don't know if there's any new issues.
steps: | ||
- pwsh: | | ||
$agentOS="$(Agent.OS)" | ||
$agentArch="$(Agent.OSArchitecture)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is likely a bug here because $(Agent.OSArchitecture)
will be ARM64
, the environment variable is JAVA_HOME_17_arm64
, and environment variable names are case sensitive on Mac/Linux. But I can fix this in my ARM64 PR since I can test it easier.
* main: [ci] Add template for setting JAVA_HOME vars (#9671) Bump com.android.tools.build:manifest-merger from 31.7.3 to 31.8.0 (#9678) Bump to dotnet/sdk@2dd591056f 10.0.100-alpha.1.25062.16 (#9679) Bump com.android.tools:r8 from 8.5.35 to 8.7.18 (#9677) Bump to dotnet/java-interop@4f06201 (#9676) Bump to dotnet/android-api-docs@492e524d (#9668) [build] Support JDK-21 (#9672)
Adds a
setup-jdk-variables.yaml
template to set theJAVA_HOME
andJI_JAVA_HOME
variables from a single script location.A new
JI_JAVA_HOME_DEFAULT
variable will also be set to point to acurrent JDK that can be used to run various Android SDK tools as needed.
Consolidating this logic should make it easier to update the default
JDK version we install and/or test against in the future.
Build jobs and some test jobs that run on custom agents will use the
default android-toolchain path that xaprepare installs into.
Most other test jobs will attempt to use the value of a preinstalled JDK
found at
$JAVA_HOME_$(JAVA_VERSION)_$(OS_ARCH)
if it is defined.