PowerToys/.pipelines/ci/templates/build-powertoys-steps.yml

152 lines
4.3 KiB
YAML
Raw Normal View History

parameters:
additionalBuildArguments: ''
steps:
- checkout: self
2020-05-15 02:57:58 +08:00
fetchDepth: 1
submodules: true
clean: true
- task: NuGetToolInstaller@0
displayName: Ensure NuGet 5.8.0
inputs:
versionSpec: 5.8.0
#- template: .\..\..\..\restore-dependencies.yml
- task: VisualStudioTestPlatformInstaller@1
displayName: Ensure VSTest Platform
- task: NuGetCommand@2
2020-08-06 21:12:20 +08:00
displayName: Restore NuGet packages for PowerToys.sln
inputs:
command: restore
feedsToUse: config
configPath: NuGet.config
restoreSolution: PowerToys.sln
restoreDirectory: '$(Build.SourcesDirectory)\packages'
- task: VSBuild@1
2020-08-06 21:12:20 +08:00
displayName: 'Build PowerToys.sln'
inputs:
solution: '**\PowerToys.sln'
vsVersion: 16.0
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArgs: ${{ parameters.additionalBuildArguments }}
maximumCpuCount: true
- task: NuGetCommand@2
displayName: Restore NuGet packages for BugReportTool.sln
inputs:
command: restore
feedsToUse: config
configPath: NuGet.config
restoreSolution: tools\BugReportTool\BugReportTool.sln
restoreDirectory: '$(Build.SourcesDirectory)\tools\BugReportTool\packages'
- task: VSBuild@1
displayName: 'Build BugReportTool.sln'
inputs:
solution: '**\BugReportTool.sln'
vsVersion: 16.0
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArgs: ${{ parameters.additionalBuildArguments }}
maximumCpuCount: true
2020-08-06 21:12:20 +08:00
- task: NuGetCommand@2
displayName: Restore NuGet packages for PowerToysSetup.sln
inputs:
command: restore
feedsToUse: config
configPath: NuGet.config
restoreSolution: installer\PowerToysSetup.sln
restoreDirectory: '$(Build.SourcesDirectory)\installer\packages'
- task: VSBuild@1
displayName: 'Build PowerToysSetup.sln'
inputs:
solution: '**\installer\PowerToysSetup.sln'
vsVersion: 16.0
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArgs: ${{ parameters.additionalBuildArguments }}
maximumCpuCount: true
- task: NuGetCommand@2
displayName: Restore NuGet packages for PowerToysBootstrapper.sln
inputs:
command: restore
feedsToUse: config
configPath: NuGet.config
restoreSolution: installer\PowerToysBootstrapper\PowerToysBootstrapper.sln
restoreDirectory: '$(Build.SourcesDirectory)\installer\PowerToysBootstrapper\packages'
- task: VSBuild@1
displayName: 'Build PowerToysBootstrapper.sln'
inputs:
solution: '**\installer\PowerToysBootstrapper\PowerToysBootstrapper.sln'
vsVersion: 16.0
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArgs: ${{ parameters.additionalBuildArguments }}
maximumCpuCount: true
# directly not doing WinAppDriver testing
- task: VSTest@2
2021-03-16 23:29:20 +08:00
displayName: 'MS Tests'
inputs:
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
testSelector: 'testAssemblies'
testAssemblyVer2: |
2021-03-16 23:29:20 +08:00
**\UnitTests-SvgThumbnailProvider.dll
2021-01-04 22:25:41 +08:00
**\Microsoft.PowerToys.Settings.UI.UnitTests.dll
2021-03-16 23:29:20 +08:00
**\UnitTests-SvgPreviewHandler.dll
**\UnitTests-PreviewHandlerCommon.dll
**\PreviewPaneUnitTests.dll
**\Microsoft.PowerToys.Run.Plugin.Registry.UnitTests.dll
**\UnitTest-ColorPickerUI.dll
**\Microsoft.Interop.Tests.dll
!**\obj\**
2021-03-16 23:29:20 +08:00
- task: VSTest@2
2021-03-16 23:29:20 +08:00
displayName: 'XUnit Tests'
inputs:
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
testSelector: 'testAssemblies'
testAssemblyVer2: |
2021-01-04 22:25:41 +08:00
**\ImageResizer.Test.dll
!**\obj\**
2021-03-16 23:29:20 +08:00
- task: VSTest@2
displayName: 'NUnit Tests'
inputs:
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\Microsoft.Plugin.Folder.UnitTests.dll
**\Microsoft.Plugin.Program.UnitTests.dll
**\Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest.dll
**\Microsoft.Plugin.Uri.UnitTests.dll
**\Wox.Test.dll
**\Microsoft.PowerToys.Run.Plugin.System.UnitTests.dll
!**\obj\**
2021-01-04 22:25:41 +08:00
# Native dlls
- task: VSTest@2
2021-03-16 23:29:20 +08:00
displayName: 'Native Tests'
2021-01-04 22:25:41 +08:00
inputs:
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\KeyboardManagerTest.dll
**\UnitTests-CommonLib.dll
2020-12-14 20:10:10 +08:00
**\PowerRenameUnitTests.dll
2021-03-16 23:29:20 +08:00
**\powerpreviewTest.dll
!**\obj\**