Skip to content

Commit

Permalink
Partially fix building the JVM in AzureCI
Browse files Browse the repository at this point in the history
Installation still fails with a different error.

Windows has a maximum PATH variable length of 2048 (depending on
how it's accessed). The length of PATH in AzureCI is already
really tight. When building the JVM backend we run into the limit
when we add Java and the MS BuildTools to the path.
To work around this, we remove a bunch of stuff we won't need
from PATH.
  • Loading branch information
PatZim committed May 15, 2020
1 parent 799d627 commit adfa192
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions azure-pipelines.yml
Expand Up @@ -47,11 +47,11 @@ stages:
Windows_JVM:
IMAGE_NAME: 'windows-2019'
BACKEND: 'JVM'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp'
Windows_JVM_NQP_master:
IMAGE_NAME: 'windows-2019'
BACKEND: 'JVM'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp=master'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp=master'
Windows_MoarVM_relocatable:
IMAGE_NAME: 'windows-2019'
RELOCATABLE: 'yes'
Expand All @@ -69,11 +69,11 @@ stages:
MacOS_JVM:
IMAGE_NAME: 'macOS-10.15'
BACKEND: 'JVM'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp'
MacOS_JVM_NQP_master:
IMAGE_NAME: 'macOS-10.15'
BACKEND: 'JVM'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp=master'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp=master'
MacOS_MoarVM_relocatable:
IMAGE_NAME: 'macOS-10.15'
RELOCATABLE: 'yes'
Expand All @@ -91,11 +91,11 @@ stages:
Linux_JVM:
IMAGE_NAME: 'ubuntu-18.04'
BACKEND: 'JVM'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp'
Linux_JVM_NQP_master:
IMAGE_NAME: 'ubuntu-18.04'
BACKEND: 'JVM'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp=master'
RAKUDO_OPTIONS: '--backends=jvm --gen-nqp=master'
Linux_MoarVM_relocatable:
IMAGE_NAME: 'ubuntu-18.04'
RELOCATABLE: 'yes'
Expand All @@ -107,12 +107,24 @@ stages:
clean: all
steps:

- pwsh: |
# Windows has a maximum PATH variable length of 2048 (depending on
# how it's accessed). The length of PATH in AzureCI is already
# really tight. We'll run into the limit when we add Java and the
# MS BuildTools to the path.
# To work around this, we remove a bunch of stuff we won't need
# from PATH here.
$shortened_path = "$(PATH)" -replace ';[^;]*(SeleniumWebDrivers|SQL Server|Mercurial|Amazon|mysql|\\sbt\\|NSIS|Windows Performance Toolkit|php|Subversion)[^;]*(?=(;|$))', ''
echo "##vso[task.setvariable variable=PATH]$shortened_path"
displayName: "Shorten PATH on Windows"
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: |
echo "##vso[task.setvariable variable=JAVA_HOME]$(JAVA_HOME_11_X64)"
echo "##vso[task.setvariable variable=PATH]$(JAVA_HOME_11_X64)/bin:$(PATH)"
displayName: "Set java version (non-Windows)"
condition: and( eq( variables['BACKEND'], 'JVM'), ne( variables['Agent.OS'], 'Windows_NT' ) )
- script: |
- pwsh: |
echo "##vso[task.setvariable variable=JAVA_HOME]$(JAVA_HOME_11_X64)"
echo "##vso[task.setvariable variable=PATH]$(JAVA_HOME_11_X64)\bin;$(PATH)"
displayName: "Set java version (Windows)"
Expand Down

0 comments on commit adfa192

Please sign in to comment.