-
Notifications
You must be signed in to change notification settings - Fork 131
/
azure-pipelines.yml
242 lines (224 loc) · 11.6 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
trigger:
- main
pr:
- main
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"
RAKUDO_CHECKOUT_TYPE: main
NQP_CHECKOUT_TYPE: "rev-$(Build.SourceVersion)-selfrepo"
MOAR_CHECKOUT_TYPE: downstream
stages:
- stage: Test
jobs:
# Keep the job and matrix entry names as short as possible as the webinterface
# leaves little space for the name.
- job: T
strategy:
matrix:
Win_MVM:
IMAGE_NAME: 'windows-2019'
RAKUDO_OPTIONS: ''
NQP_OPTIONS: '--backends=moar'
MOAR_OPTIONS: ''
Win_JVM:
IMAGE_NAME: 'windows-2019'
BACKEND: 'JVM'
MOAR_CHECKOUT_TYPE: 'none'
RAKUDO_OPTIONS: ''
NQP_OPTIONS: '--backends=jvm'
MOAR_OPTIONS: ''
Win_MVM_relocatable:
IMAGE_NAME: 'windows-2019'
RELOCATABLE: 'yes'
RAKUDO_OPTIONS: '--relocatable'
NQP_OPTIONS: '--backends=moar --relocatable'
MOAR_OPTIONS: '--relocatable'
Mac_MVM:
IMAGE_NAME: 'macOS-12'
RAKUDO_OPTIONS: ''
NQP_OPTIONS: '--backends=moar'
MOAR_OPTIONS: ''
Mac_JVM:
IMAGE_NAME: 'macOS-12'
BACKEND: 'JVM'
MOAR_CHECKOUT_TYPE: 'none'
RAKUDO_OPTIONS: ''
NQP_OPTIONS: '--backends=jvm'
MOAR_OPTIONS: ''
Mac_MVM_reloc:
IMAGE_NAME: 'macOS-12'
RELOCATABLE: 'yes'
RAKUDO_OPTIONS: '--relocatable'
NQP_OPTIONS: '--backends=moar --relocatable'
MOAR_OPTIONS: '--relocatable'
Lin_MVM:
IMAGE_NAME: 'ubuntu-20.04'
RAKUDO_OPTIONS: ''
NQP_OPTIONS: '--backends=moar'
MOAR_OPTIONS: ''
Lin_JVM:
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-20.04'
RELOCATABLE: 'yes'
RAKUDO_OPTIONS: '--relocatable'
NQP_OPTIONS: '--backends=moar --relocatable'
MOAR_OPTIONS: '--relocatable'
pool:
vmImage: $(IMAGE_NAME)
workspace:
clean: all
timeoutInMinutes: 180
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(succeeded(), eq( variables['BACKEND'], 'JVM'), ne( variables['Agent.OS'], 'Windows_NT' ) )
- 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)"
condition: and(succeeded(), eq( variables['BACKEND'], 'JVM'), eq( variables['Agent.OS'], 'Windows_NT' ) )
- checkout: self
path: selfrepo
displayName: Checkout script repo
- script: perl selfrepo/tools/build/checkout-repos-for-test.pl $(RAKUDO_CHECKOUT_TYPE) $(NQP_CHECKOUT_TYPE) $(MOAR_CHECKOUT_TYPE)
workingDirectory: $(Pipeline.Workspace)
condition: and(succeeded(), ne( variables['BACKEND'], 'JVM'))
displayName: Checkout repositories (MoarVM)
- script: perl selfrepo/tools/build/checkout-repos-for-test.pl $(RAKUDO_CHECKOUT_TYPE) $(NQP_CHECKOUT_TYPE) none
workingDirectory: $(Pipeline.Workspace)
condition: and(succeeded(), eq( variables['BACKEND'], 'JVM'))
displayName: Checkout repositories (JVM)
# Build MoarVM
- script: |
perl Configure.pl --prefix=../install $(MOAR_OPTIONS)
make 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)
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
workingDirectory: '$(Pipeline.Workspace)/nqp'
condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ))
displayName: Build NQP (Windows)
# 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
workingDirectory: '$(Pipeline.Workspace)/rakudo'
condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ))
displayName: Build Rakudo (Windows)
# 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
workingDirectory: $(Pipeline.Workspace)
condition: and(succeeded(), eq( variables['RELOCATABLE'], 'yes' ), ne( variables['Agent.OS'], 'Windows_NT' ) )
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
workingDirectory: '$(Pipeline.Workspace)/nqp'
condition: and(succeeded(), ne( variables['RELOCATABLE'], 'yes' ), ne( variables['BACKEND'], 'JVM'), ne( variables['Agent.OS'], 'Windows_NT' ) )
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
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' ) )
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
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)
- publish: $(Pipeline.Workspace)/install-moved
condition: and(succeeded(), eq( variables['RELOCATABLE'], 'yes' ), ne( variables['BACKEND'], 'JVM') )
displayName: Publish build artifact