@@ -0,0 +1,67 @@ |
|
|
|
1 |
+jobs: |
|
2 |
+- job: Prebuild |
|
3 |
+displayName: Pre-build checks |
|
4 |
+ |
|
5 |
+pool: |
|
6 |
+vmImage: ubuntu-16.04 |
|
7 |
+ |
|
8 |
+steps: |
|
9 |
+ - template: ./prebuild-checks.yml |
|
10 |
+ |
|
11 |
+ |
|
12 |
+- job: Windows_Appx_Tests |
|
13 |
+displayName: Windows Appx Tests |
|
14 |
+dependsOn: Prebuild |
|
15 |
+condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true')) |
|
16 |
+ |
|
17 |
+pool: |
|
18 |
+vmImage: vs2017-win2016 |
|
19 |
+ |
|
20 |
+strategy: |
|
21 |
+matrix: |
|
22 |
+win64: |
|
23 |
+arch: amd64 |
|
24 |
+buildOpt: '-p x64' |
|
25 |
+testRunTitle: '$(Build.SourceBranchName)-win64-appx' |
|
26 |
+testRunPlatform: win64 |
|
27 |
+maxParallel: 2 |
|
28 |
+ |
|
29 |
+steps: |
|
30 |
+ - checkout: self |
|
31 |
+clean: true |
|
32 |
+fetchDepth: 5 |
|
33 |
+ |
|
34 |
+ - powershell: | |
|
35 |
+ # Relocate build outputs outside of source directory to make cleaning faster |
|
36 |
+ Write-Host '##vso[task.setvariable variable=Py_IntDir]$(Build.BinariesDirectory)\obj' |
|
37 |
+ # UNDONE: Do not build to a different directory because of broken tests |
|
38 |
+ Write-Host '##vso[task.setvariable variable=Py_OutDir]$(Build.SourcesDirectory)\PCbuild' |
|
39 |
+ Write-Host '##vso[task.setvariable variable=EXTERNAL_DIR]$(Build.BinariesDirectory)\externals' |
|
40 |
+ displayName: Update build locations |
|
41 |
+ |
|
42 |
+ - script: PCbuild\build.bat -e $(buildOpt) |
|
43 |
+displayName: 'Build CPython' |
|
44 |
+env: |
|
45 |
+IncludeUwp: true |
|
46 |
+ |
|
47 |
+ - script: python.bat PC\layout -vv -s "$(Build.SourcesDirectory)" -b "$(Py_OutDir)\$(arch)" -t "$(Py_IntDir)\layout-tmp-$(arch)" --copy "$(Py_IntDir)\layout-$(arch)" --precompile --preset-appx --include-tests |
|
48 |
+displayName: 'Create APPX layout' |
|
49 |
+ |
|
50 |
+ - script: .\python.exe -m test.pythoninfo |
|
51 |
+workingDirectory: (PyIntDir)layout−(Py_IntDir)\layout-(PyIntDir)layout−(arch) |
|
52 |
+displayName: 'Display build info' |
|
53 |
+ |
|
54 |
+ - script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results.xml" --tempdir "$(Py_IntDir)\tmp-$(arch)" |
|
55 |
+workingDirectory: (PyIntDir)layout−(Py_IntDir)\layout-(PyIntDir)layout−(arch) |
|
56 |
+displayName: 'Tests' |
|
57 |
+env: |
|
58 |
+PREFIX: (PyIntDir)layout−(Py_IntDir)\layout-(PyIntDir)layout−(arch) |
|
59 |
+ |
|
60 |
+ - task: PublishTestResults@2 |
|
61 |
+displayName: 'Publish Test Results' |
|
62 |
+inputs: |
|
63 |
+testResultsFiles: '$(Build.BinariesDirectory)\test-results.xml' |
|
64 |
+mergeTestResults: true |
|
65 |
+testRunTitle: $(testRunTitle) |
|
66 |
+platform: $(testRunPlatform) |
|
67 |
+condition: succeededOrFailed() |