diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cdddacfbb..a4d4968e3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,13 +8,16 @@ variables: # Turn this Powershell console into a developer powershell console. # https://intellitect.com/enter-vsdevshell-powershell/ PWSH_DEV: | - $installPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationpath - $devShell = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find **\Microsoft.VisualStudio.DevShell.dll - Import-Module $devShell - Enter-VsDevShell -VsInstallPath $installPath -SkipAutomaticLocation -DevCmdArguments "-arch=amd64" + if ($env:Agent_OS -eq 'Windows_NT') { + $installPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationpath + $devShell = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find **\Microsoft.VisualStudio.DevShell.dll + Import-Module $devShell + Enter-VsDevShell -VsInstallPath $installPath -SkipAutomaticLocation -DevCmdArguments "-arch=amd64" + } RAKUDO_CHECKOUT_TYPE: master NQP_CHECKOUT_TYPE: "rev-$(Build.SourceVersion)-selfrepo" MOAR_CHECKOUT_TYPE: downstream + INSTALL_DIR: install stages: - stage: Test @@ -138,14 +141,15 @@ stages: # Build MoarVM - script: | - perl Configure.pl --prefix=../install $(MOAR_OPTIONS) - make install + perl Configure.pl --prefix=../$(INSTALL_DIR) $(MOAR_OPTIONS) + make -j2 install workingDirectory: '$(Pipeline.Workspace)/MoarVM' condition: and(succeeded(), ne( variables['Agent.OS'], 'Windows_NT' ), ne( variables['BACKEND'], 'JVM')) displayName: Build MoarVM - pwsh: | ${{ variables.PWSH_DEV }} - perl Configure.pl --prefix=..\install $(MOAR_OPTIONS) + perl Configure.pl --prefix=..\$(INSTALL_DIR) $(MOAR_OPTIONS) + set CL=/MP nmake install failOnStderr: false workingDirectory: '$(Pipeline.Workspace)/MoarVM' @@ -153,102 +157,49 @@ stages: displayName: Build MoarVM (Windows) # Build NQP - - script: | - perl Configure.pl --prefix=../install $(NQP_OPTIONS) - make install - workingDirectory: '$(Pipeline.Workspace)/nqp' - condition: and(succeeded(), ne( variables['Agent.OS'], 'Windows_NT' )) - displayName: Build NQP - pwsh: | ${{ variables.PWSH_DEV }} - perl Configure.pl --prefix=..\install $(NQP_OPTIONS) - nmake install - failOnStderr: false + perl Configure.pl --prefix=../$(INSTALL_DIR) $(NQP_OPTIONS) --make-install workingDirectory: '$(Pipeline.Workspace)/nqp' - condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' )) - displayName: Build NQP (Windows) + condition: succeeded() + displayName: Build NQP # Build Rakudo - - script: | - perl Configure.pl --prefix=../install $(RAKUDO_OPTIONS) - make install - workingDirectory: '$(Pipeline.Workspace)/rakudo' - condition: and(succeeded(), ne( variables['Agent.OS'], 'Windows_NT' )) - displayName: Build Rakudo - pwsh: | ${{ variables.PWSH_DEV }} - perl Configure.pl --prefix=..\install $(RAKUDO_OPTIONS) - nmake install - failOnStderr: false + perl Configure.pl --prefix=../$(INSTALL_DIR) $(RAKUDO_OPTIONS) --make-install workingDirectory: '$(Pipeline.Workspace)/rakudo' - condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' )) - displayName: Build Rakudo (Windows) + condition: succeeded() + displayName: Build Rakudo # TODO: Should use "install moved" instead of "install-moved". But `prove` currently fails with an executable path that contains a space. - - script: mv install install-moved + - pwsh: | + mv $(INSTALL_DIR) $(INSTALL_DIR)-moved + echo "##vso[task.setvariable variable=INSTALL_DIR]$(INSTALL_DIR)-moved" workingDirectory: $(Pipeline.Workspace) - condition: and(succeeded(), eq( variables['RELOCATABLE'], 'yes' ), ne( variables['Agent.OS'], 'Windows_NT' ) ) + condition: and(succeeded(), eq( variables['RELOCATABLE'], 'yes' ) ) displayName: Move installation - - pwsh: mv install install-moved - workingDirectory: $(Pipeline.Workspace) - condition: and(succeeded(), eq( variables['RELOCATABLE'], 'yes' ), eq( variables['Agent.OS'], 'Windows_NT' ) ) - displayName: Move installation (Windows) # Test NQP - - script: prove -j0 -r -e ../install/bin/nqp t/nqp t/hll t/qregex t/p5regex t/qast t/moar t/serialization t/nativecall t/concurrency + - script: prove -j2 -r -e ../$(INSTALL_DIR)/bin/nqp t/nqp t/hll t/qregex t/p5regex t/qast t/moar t/serialization t/nativecall t/concurrency workingDirectory: '$(Pipeline.Workspace)/nqp' - condition: and(succeeded(), ne( variables['RELOCATABLE'], 'yes' ), ne( variables['BACKEND'], 'JVM'), ne( variables['Agent.OS'], 'Windows_NT' ) ) + condition: and(succeeded(), ne( variables['BACKEND'], 'JVM') ) displayName: Test NQP - - pwsh: | - ${{ variables.PWSH_DEV }} - prove -j0 -r -e ..\install\bin\nqp t\nqp t\hll t\qregex t\p5regex t\qast t\moar t\serialization t\nativecall t\concurrency + - script: prove -j0 -r -e ../$(INSTALL_DIR)/bin/nqp t/nqp t/hll t/qregex t/p5regex t/qast t/jvm t/serialization t/nativecall workingDirectory: '$(Pipeline.Workspace)/nqp' - condition: and(succeeded(), ne( variables['RELOCATABLE'], 'yes' ), ne( variables['BACKEND'], 'JVM'), eq( variables['Agent.OS'], 'Windows_NT' ) ) - displayName: Test NQP (Windows) - - script: prove -j0 -r -e ../install/bin/nqp t/nqp t/hll t/qregex t/p5regex t/qast t/jvm t/serialization t/nativecall - workingDirectory: '$(Pipeline.Workspace)/nqp' - condition: and(succeeded(), ne( variables['RELOCATABLE'], 'yes' ), eq( variables['BACKEND'], 'JVM'), ne( variables['Agent.OS'], 'Windows_NT' ) ) + condition: and(succeeded(), eq( variables['BACKEND'], 'JVM') ) displayName: Test NQP (JVM) - - pwsh: | - ${{ variables.PWSH_DEV }} - prove -j0 -r -e ..\install\bin\nqp t\nqp t\hll t\qregex t\p5regex t\qast t\jvm t\serialization t\nativecall - workingDirectory: '$(Pipeline.Workspace)/nqp' - condition: and( False, succeeded(), ne( variables['RELOCATABLE'], 'yes' ), eq( variables['BACKEND'], 'JVM'), eq( variables['Agent.OS'], 'Windows_NT' ) ) - displayName: Test NQP (Windows, JVM) - - script: prove -j0 -r -e ../install-moved/bin/nqp t/nqp t/hll t/qregex t/p5regex t/qast t/moar t/serialization t/nativecall t/concurrency - workingDirectory: '$(Pipeline.Workspace)/nqp' - condition: and(succeeded(), eq( variables['RELOCATABLE'], 'yes' ), ne( variables['BACKEND'], 'JVM'), ne( variables['Agent.OS'], 'Windows_NT' ) ) - displayName: Test NQP (relocated) - - pwsh: | - ${{ variables.PWSH_DEV }} - prove -j0 -r -e ..\install-moved\bin\nqp t\nqp t\hll t\qregex t\p5regex t\qast t\moar t\serialization t\nativecall t\concurrency - workingDirectory: '$(Pipeline.Workspace)/nqp' - condition: and(succeeded(), eq( variables['RELOCATABLE'], 'yes' ), ne( variables['BACKEND'], 'JVM'), eq( variables['Agent.OS'], 'Windows_NT' ) ) - displayName: Test NQP (relocated, Windows) # Test Rakudo - - script: prove -e ../install/bin/perl6 -vlr t - workingDirectory: '$(Pipeline.Workspace)/rakudo' - condition: and(succeeded(), ne( variables['RELOCATABLE'], 'yes' ), ne( variables['BACKEND'], 'JVM'), ne( variables['Agent.OS'], 'Windows_NT' ) ) - displayName: Test Rakudo - pwsh: | ${{ variables.PWSH_DEV }} - prove -e ..\install\bin\perl6 -vlr t + $install_path = Resolve-Path ../$(INSTALL_DIR)/bin/ + prove -j2 -e "$($install_path.Path)raku" -vlr t workingDirectory: '$(Pipeline.Workspace)/rakudo' - condition: and(succeeded(), ne( variables['RELOCATABLE'], 'yes' ), ne( variables['BACKEND'], 'JVM'), eq( variables['Agent.OS'], 'Windows_NT' ) ) - displayName: Test Rakudo (Windows) - - script: prove -e ../install-moved/bin/perl6 -vlr t - workingDirectory: '$(Pipeline.Workspace)/rakudo' - condition: and(succeeded(), eq( variables['RELOCATABLE'], 'yes' ), ne( variables['BACKEND'], 'JVM'), ne( variables['Agent.OS'], 'Windows_NT' ) ) - displayName: Test Rakudo (relocated) - - pwsh: | - ${{ variables.PWSH_DEV }} - prove -e ..\install-moved\bin\perl6 -vlr t - workingDirectory: '$(Pipeline.Workspace)/rakudo' - condition: and(succeeded(), eq( variables['RELOCATABLE'], 'yes' ), ne( variables['BACKEND'], 'JVM'), eq( variables['Agent.OS'], 'Windows_NT' ) ) - displayName: Test Rakudo (relocated, Windows) + condition: and(succeeded(), ne( variables['BACKEND'], 'JVM') ) + displayName: Test Rakudo - - publish: $(Pipeline.Workspace)/install-moved + - publish: $(Pipeline.Workspace)/$(INSTALL_DIR) condition: and(succeeded(), eq( variables['RELOCATABLE'], 'yes' ), ne( variables['BACKEND'], 'JVM') ) displayName: Publish build artifact