Skip to content

Commit

Permalink
Use $(JAVA_HOME_17_arm64) environment variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpobst committed Jan 9, 2025
1 parent d928911 commit 4f4b189
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
configuration: $(XA.Build.Configuration)
xaSourcePath: $(System.DefaultWorkingDirectory)
jdkTestFolder: $(JAVA_HOME_17_X64)
jdkTestFolder:
remove_dotnet: false
dotnetVersion: $(DotNetSdkVersion)
dotnetQuality: $(DotNetSdkQuality)
Expand Down Expand Up @@ -33,6 +33,21 @@ steps:
displayName: set JI_JAVA_HOME to ${{ parameters.jdkTestFolder }}
condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT'))

# If an explicit Java SDK path wasn't provided, choose JDK-17 for the appropriate architecture
- pwsh: |
Write-Host "##vso[task.setvariable variable=JI_JAVA_HOME]$env:JAVA_HOME_17_X64"
displayName: set JI_JAVA_HOME to JAVA_HOME_17_X64
condition: and(succeeded(), eq(${{ parameters.jdkTestFolder }}, ''), eq(variables['agent.osarchitecture'], 'X64'))

- pwsh: |
Write-Host "##vso[task.setvariable variable=JI_JAVA_HOME]$env:JAVA_HOME_17_arm64"
displayName: set JI_JAVA_HOME to JAVA_HOME_17_arm64
condition: and(succeeded(), eq(${{ parameters.jdkTestFolder }}, ''), eq(variables['agent.osarchitecture'], 'ARM64'))

- script: |
echo $(JI_JAVA_HOME)
displayName: print JI_JAVA_HOME

# Install latest .NET
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion build-tools/automation/yaml-templates/variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ variables:
- name: WindowsToolchainPdbArtifactName
value: windows-toolchain-pdb
- name: ApkDiffToolVersion
value: 0.0.15
value: 0.0.17
- name: TestSlicerToolVersion
value: 0.1.0-alpha7
- name: BootsToolVersion
Expand Down

0 comments on commit 4f4b189

Please sign in to comment.