2019-07-15 20:55:24 +03:00
|
|
|
resources:
|
2019-01-15 01:28:52 +03:00
|
|
|
- repo: self
|
|
|
|
clean: true
|
|
|
|
|
2019-03-26 23:48:39 +03:00
|
|
|
pool:
|
2021-10-28 08:39:41 +03:00
|
|
|
vmImage: 'windows-latest'
|
2019-03-26 23:48:39 +03:00
|
|
|
|
2021-11-03 23:59:16 +03:00
|
|
|
variables:
|
|
|
|
SamplesBin: SamplesBin
|
2022-03-01 00:43:26 +03:00
|
|
|
WINDOWS_WINMD: C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.19041.0\Windows.winmd
|
|
|
|
WindowsTargetPlatformVersion: 10.0.19041.0
|
2021-11-03 23:59:16 +03:00
|
|
|
|
2019-03-13 20:39:49 +03:00
|
|
|
# CI trigger
|
2019-02-01 03:19:30 +03:00
|
|
|
trigger:
|
2021-10-30 01:43:45 +03:00
|
|
|
batch: true
|
2019-02-01 03:19:30 +03:00
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
paths:
|
2019-03-13 20:39:49 +03:00
|
|
|
exclude:
|
|
|
|
- Tools
|
|
|
|
|
2021-11-03 23:59:16 +03:00
|
|
|
jobs:
|
2021-11-04 01:09:30 +03:00
|
|
|
- job: Public_Samples_Build
|
2021-11-03 23:59:16 +03:00
|
|
|
timeoutInMinutes: 90
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
maxParallel: 8
|
|
|
|
matrix:
|
|
|
|
Release_x64:
|
|
|
|
BuildPlatform: x64
|
|
|
|
BuildConfiguration: Release
|
|
|
|
Debug_x64:
|
|
|
|
BuildPlatform: x64
|
|
|
|
BuildConfiguration: Debug
|
|
|
|
Release_x86:
|
|
|
|
BuildPlatform: x86
|
|
|
|
BuildConfiguration: Release
|
|
|
|
Debug_x86:
|
|
|
|
BuildPlatform: x86
|
|
|
|
BuildConfiguration: Debug
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'Clone Git Submodules'
|
|
|
|
inputs:
|
|
|
|
targetType: inline
|
|
|
|
script: git submodule update --init --recursive
|
|
|
|
|
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
displayName: 'Install NuGet 5.11.0'
|
|
|
|
inputs:
|
|
|
|
versionSpec: '5.11.0'
|
|
|
|
|
2021-12-01 21:41:17 +03:00
|
|
|
- task: PowerShell@2
|
2022-02-10 01:34:36 +03:00
|
|
|
displayName: 'Install the win 10 sdk v19041 if necessary'
|
2021-12-01 21:41:17 +03:00
|
|
|
inputs:
|
|
|
|
targetType: inline
|
2022-02-10 01:34:36 +03:00
|
|
|
script: choco install windows-sdk-10-version-2004-all -y
|
2021-11-24 19:50:54 +03:00
|
|
|
|
2021-12-01 21:41:17 +03:00
|
|
|
- task: PowerShell@1
|
|
|
|
displayName: OpenCV - Configure CMake
|
|
|
|
inputs:
|
|
|
|
scriptName: external/tools/CMakeConfigureOpenCV.ps1
|
|
|
|
workingDirectory: $(System.ArtifactsDirectory)
|
|
|
|
arguments: >
|
|
|
|
-Architecture $(BuildPlatform)
|
2021-11-24 19:50:54 +03:00
|
|
|
|
2021-12-01 21:41:17 +03:00
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'OpenCV - Build'
|
|
|
|
inputs:
|
|
|
|
solution: 'build/external/opencv/cmake_config/$(BuildPlatform)/OpenCV.sln"'
|
2023-01-19 04:26:45 +03:00
|
|
|
vsVersion: "17.0"
|
2021-12-01 21:41:17 +03:00
|
|
|
msbuildArgs: '/p:Configuration=$(BuildConfiguration) /t:Build /p:LinkIncremental=false /p:DebugSymbols=false /p:DebugType=None'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
createLogFile: true
|
|
|
|
condition: succeededOrFailed()
|
2021-11-03 23:59:16 +03:00
|
|
|
|
2021-12-01 21:41:17 +03:00
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'OpenCV - Install'
|
|
|
|
inputs:
|
|
|
|
solution: 'build/external/opencv/cmake_config/$(BuildPlatform)/INSTALL.vcxproj'
|
2023-01-19 04:26:45 +03:00
|
|
|
vsVersion: "17.0"
|
2021-12-01 21:41:17 +03:00
|
|
|
msbuildArgs: '/p:Configuration=$(BuildConfiguration) /p:LinkIncremental=false /p:DebugSymbols=false /p:DebugType=None'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
createLogFile: true
|
|
|
|
condition: succeededOrFailed()
|
2021-11-24 19:50:54 +03:00
|
|
|
|
2021-12-01 21:41:17 +03:00
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'Restore WinMLSamplesGalleryNative Nuget Packages'
|
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: |
|
|
|
|
$src_root_dir = $Env:BUILD_SOURCESDIRECTORY;
|
|
|
|
$solution_dir = [System.IO.Path]::Combine($src_root_dir, 'Samples', 'WinMLSamplesGallery')
|
|
|
|
$csproj = [System.IO.Path]::Combine($solution_dir, 'WinMLSamplesGalleryNative', 'WinMLSamplesGalleryNative.vcxproj')
|
|
|
|
nuget restore $csproj -SolutionDirectory $solution_dir
|
2021-11-24 19:50:54 +03:00
|
|
|
|
2021-12-01 21:41:17 +03:00
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Build WinMLSamplesGallery Debug'
|
|
|
|
inputs:
|
|
|
|
solution: 'Samples/WinMLSamplesGallery/WinMLSamplesGallery.sln'
|
2023-01-19 04:26:45 +03:00
|
|
|
vsVersion: "17.0"
|
2021-12-01 21:41:17 +03:00
|
|
|
msbuildArgs: '/p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
|
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
createLogFile: true
|
|
|
|
condition: and(succeededOrFailed(), eq(variables['BuildConfiguration'], 'Debug'))
|
2021-11-24 19:50:54 +03:00
|
|
|
|
2021-12-01 21:41:17 +03:00
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Build And Publish WinMLSamplesGallery Release'
|
|
|
|
inputs:
|
|
|
|
solution: 'Samples/WinMLSamplesGallery/WinMLSamplesGallery.sln'
|
2023-01-19 04:26:45 +03:00
|
|
|
vsVersion: "17.0"
|
2021-12-01 21:41:17 +03:00
|
|
|
msbuildArgs: '/p:UapAppxPackageBuildMode=SideloadOnly /p:AppxPackageSigningEnabled=false /p:AppxBundle=Always "/p:AppxBundlePlatforms=x86|x64|arm64" /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build,Publish'
|
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
createLogFile: true
|
|
|
|
condition: and(succeededOrFailed(), eq(variables['BuildConfiguration'], 'Release'))
|
2021-11-03 23:59:16 +03:00
|
|
|
|
2021-12-02 07:08:19 +03:00
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Build UI test solution Testing/**/SamplesTest.sln'
|
|
|
|
inputs:
|
|
|
|
solution: 'Testing/**/SamplesTest.sln'
|
2023-01-19 04:26:45 +03:00
|
|
|
vsVersion: "17.0"
|
2021-12-02 07:08:19 +03:00
|
|
|
msbuildArgs: '-v:diag /p:OutDir=$(System.DefaultWorkingDirectory)\bin\$(BuildPlatform)\$(BuildConfiguration)\SamplesTest\ /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
|
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
createLogFile: true
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Build MNIST-Tutorial-cs Sample'
|
|
|
|
inputs:
|
|
|
|
solution: 'Samples/MNIST/Tutorial/cs/mnist_demo.sln'
|
2023-01-19 04:26:45 +03:00
|
|
|
vsVersion: "17.0"
|
2021-12-02 07:08:19 +03:00
|
|
|
msbuildArgs: '-v:diag /p:OutDir=$(System.DefaultWorkingDirectory)\bin\$(BuildPlatform)\$(BuildConfiguration)\MNIST-Tutorial\ /p:AppxPackageSigningEnabled=false /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
|
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
createLogFile: true
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Build MNIST-UWP-cs Sample'
|
|
|
|
inputs:
|
|
|
|
solution: 'Samples/MNIST/UWP/cs/mnist_demo.sln'
|
2023-01-19 04:26:45 +03:00
|
|
|
vsVersion: "17.0"
|
2021-12-02 07:08:19 +03:00
|
|
|
msbuildArgs: '-v:diag /p:OutDir=$(System.DefaultWorkingDirectory)\bin\$(BuildPlatform)\$(BuildConfiguration)\MNIST-cs\ /p:AppxBundle=Never /p:AppxPackageSigningEnabled=false /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
|
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(BuildConfiguration)_NuGet'
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
createLogFile: true
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Build FNSCandyStyleTransfer-UWP-CS Sample'
|
|
|
|
inputs:
|
|
|
|
solution: Samples/FNSCandyStyleTransfer/UWP/CS/snapcandy.sln
|
2023-01-19 04:26:45 +03:00
|
|
|
vsVersion: "17.0"
|
2021-12-02 07:08:19 +03:00
|
|
|
msbuildArgs: '-v:diag /p:OutDir=$(System.DefaultWorkingDirectory)\bin\$(BuildPlatform)\$(BuildConfiguration)\FNSCandyStyleTransfer\ /p:AppxPackageSigningEnabled=false /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
|
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
createLogFile: true
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Build MNIST-UWP-cppcx Sample'
|
|
|
|
inputs:
|
|
|
|
solution: 'Samples/MNIST/UWP/cppcx/mnist_cppcx.sln'
|
2023-01-19 04:26:45 +03:00
|
|
|
vsVersion: "17.0"
|
2021-12-02 07:08:19 +03:00
|
|
|
msbuildArgs: '-v:diag /p:OutDir=$(System.DefaultWorkingDirectory)\bin\$(BuildPlatform)\$(BuildConfiguration)\MNIST-cppcx\ /p:AppxPackageSigningEnabled=false /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
|
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(BuildConfiguration)'
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
createLogFile: true
|
|
|
|
condition: succeededOrFailed()
|
2021-11-03 23:59:16 +03:00
|
|
|
|
2021-12-02 03:46:41 +03:00
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
|
|
|
targetFolder: '$(Build.ArtifactStagingDirectory)\$(BuildPlatform)\$(BuildConfiguration)\'
|
|
|
|
sourceFolder: 'Samples\WinMLSamplesGallery\WinMLSamplesGallery (Package)\bin\$(BuildPlatform)\$(BuildConfiguration)\'
|
|
|
|
Contents: |
|
|
|
|
**\SamplesTest\**
|
|
|
|
**\AppPackages\**
|
|
|
|
condition: succeededOrFailed()
|
2021-11-24 19:50:54 +03:00
|
|
|
|
2021-12-02 05:51:06 +03:00
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
|
|
|
targetFolder: '$(Build.ArtifactStagingDirectory)\$(BuildPlatform)\$(BuildConfiguration)\'
|
|
|
|
sourceFolder: 'Samples\WinMLSamplesGallery\WinMLSamplesGallery (Package)\bin\$(BuildPlatform)\$(BuildConfiguration)\'
|
|
|
|
Contents: |
|
|
|
|
?(AdapterSelection|CustomOperator|CustomTensorization)**\*
|
|
|
|
SqueezeNetObjectDetection\*
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
2021-12-01 21:41:17 +03:00
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'Move App Packages'
|
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: 'mv Samples/WinMLSamplesGallery/"WinMLSamplesGallery (Package)"/AppPackages $(Build.ArtifactStagingDirectory)\$(BuildPlatform)\$(BuildConfiguration)\AppPackages'
|
|
|
|
condition: and(succeededOrFailed(), eq(variables['BuildConfiguration'], 'Release'))
|
2021-11-24 19:50:54 +03:00
|
|
|
|
2021-12-01 21:41:17 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish Artifact: Samples'
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
artifactName: WinMLPublicSamples
|
|
|
|
condition: succeededOrFailed()
|