Skip to content
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

Simplify CI pipelines similarly to how was done for MoarVM #719

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 46 additions & 81 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -63,24 +66,36 @@ stages:
MOAR_OPTIONS: '--relocatable'

Lin_MVM:
IMAGE_NAME: 'ubuntu-18.04'
IMAGE_NAME: 'ubuntu-20.04'
RAKUDO_OPTIONS: ''
NQP_OPTIONS: '--backends=moar'
MOAR_OPTIONS: ''
Lin_JVM:
IMAGE_NAME: 'ubuntu-18.04'
IMAGE_NAME: 'ubuntu-20.04'
BACKEND: 'JVM'
MOAR_CHECKOUT_TYPE: 'none'
RAKUDO_OPTIONS: ''
NQP_OPTIONS: '--backends=jvm'
MOAR_OPTIONS: ''
Lin_MVM_reloc:
IMAGE_NAME: 'ubuntu-18.04'
IMAGE_NAME: 'ubuntu-20.04'
RELOCATABLE: 'yes'
RAKUDO_OPTIONS: '--relocatable'
NQP_OPTIONS: '--backends=moar --relocatable'
MOAR_OPTIONS: '--relocatable'

MVM_Ub_18:
IMAGE_NAME: 'ubuntu-18.04'
RAKUDO_OPTIONS: ''
NQP_OPTIONS: '--backends=moar'
MOAR_OPTIONS: ''

MVM_Ub_16:
IMAGE_NAME: 'ubuntu-16.04'
RAKUDO_OPTIONS: ''
NQP_OPTIONS: '--backends=moar'
MOAR_OPTIONS: ''

pool:
vmImage: $(IMAGE_NAME)
workspace:
Expand Down Expand Up @@ -126,117 +141,67 @@ 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'
condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ), ne( variables['BACKEND'], 'JVM'))
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
$install_path = Resolve-Path ../$(INSTALL_DIR)/bin/
prove -j0 -r -e "$($install_path)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