-
Notifications
You must be signed in to change notification settings - Fork 528
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
[build] fix nightly CI builds #5864
Conversation
The nightly TimeZone and System App tests are failing with: error XA0030: Building with JDK version `14.0.2` is not supported. Please install JDK version `11.0`. See https://aka.ms/xamarin/jdk9-errors Earlier in the log: JI_JAVA_HOME = /Users/runner/Library/Android/ ... warning XA5300: An exception occurred while validating the Java SDK installation in '/Users/runner/Library/Android/' that was found while searching the paths from '$JI_JAVA_HOME'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: Could not find required file `jar` within `/Users/runner/Library/Android/`; is this a valid JDK? Parameter name: homePath It turns out that `JI_JAVA_HOME` isn't quite right because of `setup-test-environment.yaml`'s default value for `jdkTestFolder`: jdkTestFolder: $(XA.Jdk11.Folder) `azure-pipelines-nightly.yaml` doesn't set `$(XA.Jdk11.Folder)`, and so `$JI_JAVA_HOME` would have an incorrect path: - script: echo "##vso[task.setvariable variable=JI_JAVA_HOME]$HOME/Library/Android/${{ parameters.jdkTestFolder }}" displayName: set JI_JAVA_HOME condition: and(succeeded(), eq(variables['agent.os'], 'Darwin')) Things were only working before, because xamarin-android-tools *used* to be able to locate the old Microsoft OpenJDK 1.8 and that code was removed.
Manual run of the nightly builds: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=4680254&view=results |
/cc @dellis1972 I think the latest
We can fix that in another PR. |
That error message might become more "interesting" once #5860 lands…? |
err what... that was working :( |
I'm noticing that my CI builds have fallen over due to this issue:
This is only on my azure devops pipeline, i have 3 local machines that can build the forms project perfectly. I'm not quite sure what I need to update, I had a look at your pipeline and it seems to be setting environment variables from a script task. I tried adding: - script: |
echo ##vso[task.setvariable variable=JI_JAVA_HOME]%USERPROFILE%\android-toolchain\$(XA.Jdk11.Folder)
displayName: set JI_JAVA_HOME To my task (obviously setting the variable to |
@Axemasta can you raise a new issue, and provide a bit more of the build log? |
The nightly TimeZone and System App tests are failing with:
Earlier in the log:
It turns out that
JI_JAVA_HOME
isn't quite right because ofsetup-test-environment.yaml
's default value forjdkTestFolder
:azure-pipelines-nightly.yaml
doesn't set$(XA.Jdk11.Folder)
, andso
$JI_JAVA_HOME
would have an incorrect path:Things were only working before, because xamarin-android-tools used
to be able to locate the old Microsoft OpenJDK 1.8 and that code was
removed.