Skip to content

Commit f792b4e

Browse files
committed
Use $(JAVA_HOME_17_arm64) environment variable.
1 parent 0699d1f commit f792b4e

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

build-tools/automation/yaml-templates/setup-test-environment.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,21 @@ steps:
2727
jdkMajorVersion: ${{ parameters.jdkMajorVersion }}
2828
useAgentJdkPath: ${{ parameters.useAgentJdkPath }}
2929

30+
# If an explicit Java SDK path wasn't provided, choose JDK-17 for the appropriate architecture
31+
- pwsh: |
32+
Write-Host "##vso[task.setvariable variable=JI_JAVA_HOME]$env:JAVA_HOME_17_X64"
33+
displayName: set JI_JAVA_HOME to JAVA_HOME_17_X64
34+
condition: and(succeeded(), eq('${{ parameters.jdkTestFolder }}', ''), eq(variables['agent.osarchitecture'], 'X64'))
35+
36+
- pwsh: |
37+
Write-Host "##vso[task.setvariable variable=JI_JAVA_HOME]$env:JAVA_HOME_17_arm64"
38+
displayName: set JI_JAVA_HOME to JAVA_HOME_17_arm64
39+
condition: and(succeeded(), eq('${{ parameters.jdkTestFolder }}', ''), eq(variables['agent.osarchitecture'], 'ARM64'))
40+
41+
- script: |
42+
echo $(JI_JAVA_HOME)
43+
displayName: print JI_JAVA_HOME
44+
3045
# Install latest .NET
3146
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml
3247
parameters:

build-tools/automation/yaml-templates/variables.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ variables:
1414
- name: WindowsToolchainPdbArtifactName
1515
value: windows-toolchain-pdb
1616
- name: ApkDiffToolVersion
17-
value: 0.0.15
17+
value: 0.0.17
1818
- name: TestSlicerToolVersion
1919
value: 0.1.0-alpha7
2020
- name: BootsToolVersion

0 commit comments

Comments
 (0)