Skip to content

Commit 728ba04

Browse files
marcelwgnkarkarl
authored andcommitted
Restructure pipeline
1 parent 981bf7a commit 728ba04

1 file changed

Lines changed: 72 additions & 117 deletions

File tree

azure-pipelines.yml

Lines changed: 72 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -17,120 +17,75 @@ variables:
1717
buildConfiguration: "Debug"
1818
appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'
1919

20-
stages:
21-
- stage: Build
22-
jobs:
23-
- job:
24-
displayName: Build
25-
steps:
26-
- task: NuGetToolInstaller@1
27-
displayName: Install NuGet 5.8.0
28-
inputs:
29-
versionSpec: 5.8.0
30-
31-
- task: NuGetCommand@2
32-
inputs:
33-
command: 'restore'
34-
restoreSolution: '**/*.sln'
35-
feedsToUse: 'config'
36-
nugetConfigPath: '$(System.DefaultWorkingDirectory)\nuget.config'
37-
38-
- task: MSBuild@1
39-
inputs:
40-
platform: 'x64'
41-
solution: '**/WinUIGallery.DesktopWap.Package.wapproj'
42-
configuration: '$(buildConfiguration)'
43-
msbuildArguments: '/t:build;_GenerateAppxPackage /p:Configuration=Debug;Platform="$(buildPlatform)";AppxBundle=Always;AppxBundlePlatforms="$(buildPlatform)";AppxPackageDir="$(appxPackageDir)";AppxPackageSigningEnabled=true;UapAppxPackageBuildMode=SideloadOnly'
44-
maximumCpuCount: true
45-
46-
- task: VSBuild@1
47-
inputs:
48-
platform: $(buildPlatform)
49-
solution: "$(solutionGallery)"
50-
configuration: "$(buildConfiguration)"
51-
msbuildArgs: '/p:PublishReadyToRun=false /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=SideloadOnly /p:AppxPackageSigningEnabled=true'
52-
53-
- task: NuGetCommand@2
54-
displayName: Restore packages
55-
inputs:
56-
restoreSolution: "$(solutionUITests)"
57-
58-
- task: VSBuild@1
59-
inputs:
60-
platform: "Any CPU"
61-
solution: "$(solutionUITests)"
62-
configuration: "$(buildConfiguration)"
63-
64-
- task: PublishPipelineArtifact@1
65-
inputs:
66-
targetPath: '$(System.DefaultWorkingDirectory)\UITests\bin\$(buildConfiguration)\net5.0'
67-
artifact: "uitests_$(buildConfiguration)_$(buildPlatform)"
68-
publishLocation: "pipeline"
69-
70-
- task: PublishPipelineArtifact@1
71-
inputs:
72-
targetPath: '$(Build.ArtifactStagingDirectory)\AppxPackages\'
73-
artifact: "appxbundles_$(buildConfiguration)_$(buildPlatform)"
74-
publishLocation: "pipeline"
75-
76-
- stage: Testing
77-
dependsOn: Build
78-
jobs:
79-
- job:
80-
displayName: Interaction tests
81-
steps:
82-
- task: NuGetToolInstaller@1
83-
displayName: Install NuGet 5.8.0
84-
inputs:
85-
versionSpec: 5.8.0
86-
87-
- task: NuGetCommand@2
88-
displayName: Restore packages
89-
inputs:
90-
restoreSolution: "$(solutionUITests)"
91-
92-
- task: DownloadPipelineArtifact@2
93-
inputs:
94-
buildType: "current"
95-
artifactName: "uitests_$(buildConfiguration)_$(buildPlatform)"
96-
targetPath: '$(System.DefaultWorkingDirectory)\artifacts\$(buildConfiguration)'
97-
98-
- task: DownloadPipelineArtifact@2
99-
inputs:
100-
buildType: "current"
101-
artifactName: "appxbundles_$(buildConfiguration)_$(buildPlatform)"
102-
targetPath: '$(System.DefaultWorkingDirectory)\appxbundles'
103-
104-
- task: PowerShell@2
105-
inputs:
106-
targetType: "inline"
107-
script: |
108-
# Find correct folder and run app install script.
109-
cd ./appxbundles
110-
111-
$AppBundle = Get-ChildItem -Filter WinUIGallery*Test -Name
112-
echo $AppBundle
113-
cd $AppBundle
114-
./Add-AppDevPackage.ps1 -Force
115-
errorActionPreference: "continue"
116-
failOnStderr: true
117-
workingDirectory: "$(System.DefaultWorkingDirectory)"
118-
119-
- task: Windows Application Driver@0
120-
inputs:
121-
OperationType: "Start"
122-
AgentResolution: "1080p"
123-
124-
- task: VSTest@2
125-
inputs:
126-
testSelector: "testAssemblies"
127-
testAssemblyVer2: |
128-
**\UITests.dll
129-
!**\*TestAdapter.dll
130-
!**\obj\**
131-
!**\ref\**
132-
searchFolder: "$(System.DefaultWorkingDirectory)"
133-
134-
- task: Windows Application Driver@0
135-
inputs:
136-
OperationType: "Stop"
20+
steps:
21+
- task: NuGetToolInstaller@1
22+
displayName: Install NuGet 5.8.0
23+
inputs:
24+
versionSpec: 5.8.0
25+
26+
- task: NuGetCommand@2
27+
inputs:
28+
command: 'restore'
29+
restoreSolution: '**/*.sln'
30+
feedsToUse: 'config'
31+
nugetConfigPath: '$(System.DefaultWorkingDirectory)\nuget.config'
32+
33+
- task: MSBuild@1
34+
inputs:
35+
platform: 'x64'
36+
solution: '**/WinUIGallery.DesktopWap.Package.wapproj'
37+
configuration: '$(buildConfiguration)'
38+
msbuildArguments: '/t:build;_GenerateAppxPackage /p:Configuration=Debug;Platform="$(buildPlatform)";AppxBundle=Always;AppxBundlePlatforms="$(buildPlatform)";AppxPackageDir="$(appxPackageDir)";AppxPackageSigningEnabled=true;UapAppxPackageBuildMode=SideloadOnly'
39+
maximumCpuCount: true
40+
41+
- task: VSBuild@1
42+
inputs:
43+
platform: $(buildPlatform)
44+
solution: "$(solutionGallery)"
45+
configuration: "$(buildConfiguration)"
46+
msbuildArgs: '/p:PublishReadyToRun=false /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=SideloadOnly /p:AppxPackageSigningEnabled=true'
47+
48+
- task: PowerShell@2
49+
inputs:
50+
targetType: "inline"
51+
script: |
52+
# Find correct folder and run app install script.
53+
cd ./appxbundles
54+
55+
$AppBundle = Get-ChildItem -Filter WinUIGallery*Test -Name
56+
echo $AppBundle
57+
cd $AppBundle
58+
./Add-AppDevPackage.ps1 -Force
59+
errorActionPreference: "continue"
60+
failOnStderr: true
61+
workingDirectory: "$(System.DefaultWorkingDirectory)"
62+
63+
- task: NuGetCommand@2
64+
displayName: Restore packages
65+
inputs:
66+
restoreSolution: "$(solutionUITests)"
67+
68+
- task: VSBuild@1
69+
inputs:
70+
platform: "Any CPU"
71+
solution: "$(solutionUITests)"
72+
configuration: "$(buildConfiguration)"
73+
74+
- task: Windows Application Driver@0
75+
inputs:
76+
OperationType: "Start"
77+
AgentResolution: "1080p"
78+
79+
- task: VSTest@2
80+
inputs:
81+
testSelector: "testAssemblies"
82+
testAssemblyVer2: |
83+
**\UITests.dll
84+
!**\*TestAdapter.dll
85+
!**\obj\**
86+
!**\ref\**
87+
searchFolder: "$(System.DefaultWorkingDirectory)"
88+
89+
- task: Windows Application Driver@0
90+
inputs:
91+
OperationType: "Stop"

0 commit comments

Comments
 (0)