File: azure-pipelines.yml

package info (click to toggle)
moarvm 2020.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 18,652 kB
  • sloc: ansic: 268,178; perl: 8,186; python: 1,316; makefile: 768; sh: 287
file content (245 lines) | stat: -rw-r--r-- 10,707 bytes parent folder | download
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
242
243
244
245
trigger:
- master

pr:
- master

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: master
  NQP_CHECKOUT_TYPE: master
  MOAR_CHECKOUT_TYPE: "rev-$(Build.SourceVersion)-selfrepo"

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_MVM_relocatable:
           IMAGE_NAME: 'windows-2019'
           RELOCATABLE: 'yes'
           RAKUDO_OPTIONS: '--relocatable'
           NQP_OPTIONS: '--backends=moar --relocatable'
           MOAR_OPTIONS: '--relocatable'

         Mac_MVM:
           IMAGE_NAME: 'macOS-10.15'
           RAKUDO_OPTIONS: ''
           NQP_OPTIONS: '--backends=moar'
           MOAR_OPTIONS: ''
         Mac_MVM_reloc:
           IMAGE_NAME: 'macOS-10.15'
           RELOCATABLE: 'yes'
           RAKUDO_OPTIONS: '--relocatable'
           NQP_OPTIONS: '--backends=moar --relocatable'
           MOAR_OPTIONS: '--relocatable'

         Lin_MVM:
           IMAGE_NAME: 'ubuntu-18.04'
           RAKUDO_OPTIONS: ''
           NQP_OPTIONS: '--backends=moar'
           MOAR_OPTIONS: ''
         Lin_MVM_reloc:
           IMAGE_NAME: 'ubuntu-18.04'
           RELOCATABLE: 'yes'
           RAKUDO_OPTIONS: '--relocatable'
           NQP_OPTIONS: '--backends=moar --relocatable'
           MOAR_OPTIONS: '--relocatable'

         MVM_gcc_njit:
           IMAGE_NAME: 'ubuntu-18.04'
           NQP_OPTIONS: '--backends=moar'
           MOAR_OPTIONS: '--no-jit --cc=gcc'
         MVM_gcc:
           IMAGE_NAME: 'ubuntu-18.04'
           NQP_OPTIONS: '--backends=moar'
           MOAR_OPTIONS: '--cc=gcc'
         MVM_clang_njit:
           IMAGE_NAME: 'ubuntu-18.04'
           NQP_OPTIONS: '--backends=moar'
           MOAR_OPTIONS: '--no-jit --cc=clang'
         MVM_clang:
           IMAGE_NAME: 'ubuntu-18.04'
           NQP_OPTIONS: '--backends=moar'
           MOAR_OPTIONS: '--cc=clang'
         MVM_gcc_njit_libffi:
           IMAGE_NAME: 'ubuntu-18.04'
           NQP_OPTIONS: '--backends=moar'
           MOAR_OPTIONS: '--has-libffi --no-jit --cc=gcc'
         MVM_gcc_libffi:
           IMAGE_NAME: 'ubuntu-18.04'
           NQP_OPTIONS: '--backends=moar'
           MOAR_OPTIONS: '--has-libffi --cc=gcc'
         MVM_clang_njit_libffi:
           IMAGE_NAME: 'ubuntu-18.04'
           NQP_OPTIONS: '--backends=moar'
           MOAR_OPTIONS: '--has-libffi --no-jit --cc=clang'
         MVM_clang_libffi:
           IMAGE_NAME: 'ubuntu-18.04'
           NQP_OPTIONS: '--backends=moar'
           MOAR_OPTIONS: '--has-libffi --cc=clang'
         MVM_coverage:
           IMAGE_NAME: 'ubuntu-18.04'
           NQP_OPTIONS: '--backends=moar'
           MOAR_OPTIONS: '--compiler=clang --coverage --optimize=0 --debug=3 --cc=clang'
           COVERAGE: 1
           USE_CLANG_LATEST: 1

      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: sudo apt-get install libzstd-dev
          condition: eq( variables['Agent.OS'], 'Linux' )
          displayName: Install libzstd-dev

        - 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)
          displayName: Checkout repositories

        # Build MoarVM
        - script: |
            perl Configure.pl --prefix=../install $(MOAR_OPTIONS)
            make install
          workingDirectory: '$(Pipeline.Workspace)/MoarVM'
          condition: ne( variables['Agent.OS'], 'Windows_NT' )
          displayName: Build MoarVM
        - pwsh: |
            ${{ variables.PWSH_DEV }}
            perl Configure.pl --prefix=..\install $(MOAR_OPTIONS)
            nmake install
          failOnStderr: false
          workingDirectory: '$(Pipeline.Workspace)/MoarVM'
          condition: eq( variables['Agent.OS'], 'Windows_NT' )
          displayName: Build MoarVM (Windows)

        # Build NQP
        - script: |
            perl Configure.pl --prefix=../install $(NQP_OPTIONS)
            make install
          workingDirectory: '$(Pipeline.Workspace)/nqp'
          condition: 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: 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: 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: 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( eq( variables['RELOCATABLE'], 'yes' ), ne( variables['Agent.OS'], 'Windows_NT' ) )
          displayName: Move installation
        - pwsh: mv install install-moved
          workingDirectory: $(Pipeline.Workspace)
          condition: and( 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( ne( variables['RELOCATABLE'], 'yes' ), 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( ne( variables['RELOCATABLE'], 'yes' ), eq( variables['Agent.OS'], 'Windows_NT' ) )
          displayName: Test NQP (Windows)
        - 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( eq( variables['RELOCATABLE'], 'yes' ), 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( eq( variables['RELOCATABLE'], 'yes' ), 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( ne( variables['RELOCATABLE'], 'yes' ), 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( ne( variables['RELOCATABLE'], 'yes' ), 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( eq( variables['RELOCATABLE'], 'yes' ), 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( eq( variables['RELOCATABLE'], 'yes' ), eq( variables['Agent.OS'], 'Windows_NT' ) )
          displayName: Test Rakudo (relocated, Windows)

        - publish: $(Pipeline.Workspace)/install-moved
          condition: eq( variables['RELOCATABLE'], 'yes' )
          displayName: Publish build artifact

        - script: |
            git clone --depth 1 'https://github.com/samcv/MoarVM-cover.git' &&
            cp -v MoarVM-cover/html-cover.sh . &&
            cp -v MoarVM-cover/nqp-profile ../nqp/ &&
            cp -v MoarVM-cover/merge-profraw.sh ../nqp/ &&
            ./html-cover.sh 2
          condition: eq( variables['COVERAGE'], 'yes' )