-
-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathstage-test-msi.yml
More file actions
75 lines (65 loc) · 2.23 KB
/
stage-test-msi.yml
File metadata and controls
75 lines (65 loc) · 2.23 KB
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
parameters:
DoFreethreaded: false
jobs:
- job: Test_MSI
displayName: Test MSI
pool:
vmImage: windows-2022
workspace:
clean: all
variables:
${{ if eq(parameters.DoFreethreaded, 'true') }}:
IncludeFreethreadedOpt: Include_freethreaded=1
${{ else }}:
IncludeFreethreadedOpt: ''
strategy:
matrix:
win32_User:
ExeMatch: 'python-[\dabrc.]+\.exe'
Logs: $(Build.ArtifactStagingDirectory)\logs\win32_User
InstallAllUsers: 0
win32_Machine:
ExeMatch: 'python-[\dabrc.]+\.exe'
Logs: $(Build.ArtifactStagingDirectory)\logs\win32_Machine
InstallAllUsers: 1
amd64_User:
ExeMatch: 'python-[\dabrc.]+-amd64\.exe'
Logs: $(Build.ArtifactStagingDirectory)\logs\amd64_User
InstallAllUsers: 0
amd64_Machine:
ExeMatch: 'python-[\dabrc.]+-amd64\.exe'
Logs: $(Build.ArtifactStagingDirectory)\logs\amd64_Machine
InstallAllUsers: 1
steps:
- checkout: self
- task: DownloadPipelineArtifact@1
displayName: 'Download artifact: msi'
inputs:
artifactName: msi
targetPath: $(Build.BinariesDirectory)\msi
- powershell: |
$p = (gci -r *.exe | ?{ $_.Name -match '$(ExeMatch)' } | select -First 1)
Write-Host "##vso[task.setvariable variable=SetupExe]$($p.FullName)"
Write-Host "##vso[task.setvariable variable=SetupExeName]$($p.Name)"
displayName: 'Find installer executable'
workingDirectory: $(Build.BinariesDirectory)\msi
- powershell: >
docker run --rm
-v ('{0}:C:\msi' -f (Split-Path -Parent "$(SetupExe)"))
-v ('{0}:C:\scripts' -f (gi windows-release))
-v ('{0}:C:\Python' -f (mkdir "$(Build.BinariesDirectory)\tmp" -Force))
-v ('{0}:C:\logs' -f (mkdir "$(Logs)" -Force))
-e InstallAllUsers
-e IncludeFreethreadedOpt
-e SkipTests
-e SkipTkTests
mcr.microsoft.com/windows/servercore:ltsc2022
powershell C:\scripts\test-msi.ps1 "C:\msi\$(SetupExeName)"
displayName: 'Run installer tests'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: logs'
condition: true
continueOnError: true
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\logs'
ArtifactName: msi_testlogs