2022-12-04 04:49:52 +03:00
|
|
|
schedules:
|
|
|
|
- cron: "30 5 * * *"
|
|
|
|
displayName: 'Nightly build'
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- main
|
|
|
|
|
|
|
|
resources:
|
|
|
|
repositories:
|
|
|
|
- repository: self
|
|
|
|
type: git
|
|
|
|
ref: refs/heads/main
|
2022-12-04 05:56:45 +03:00
|
|
|
trigger: none
|
2022-12-04 04:49:52 +03:00
|
|
|
|
|
|
|
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: windows-2019
|
|
|
|
|
|
|
|
variables:
|
|
|
|
EXTRACTED_FOLDER: $(ExtractedFolder)
|
|
|
|
GDK_EDITION: $(GDKEditionNumber)
|
|
|
|
GDKEnableBWOI: true
|
|
|
|
GITHUB_PAT: $(GITHUBPUBLICTOKEN)
|
|
|
|
URL_FEED: $(ADOFeedURL)
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: BUILD_GDK
|
|
|
|
displayName: 'Microsoft Game Development Kit (GDK)'
|
|
|
|
timeoutInMinutes: 120
|
|
|
|
cancelTimeoutInMinutes: 1
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
fetchTags: false
|
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
displayName: 'Use NuGet'
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
# We have to use a nuget.config to provide the feed for the 'nuget install' option.
|
|
|
|
displayName: NuGet set package source to ADO feed
|
|
|
|
inputs:
|
|
|
|
command: custom
|
|
|
|
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile NuGet.config
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: Set nuget.config to single source
|
|
|
|
inputs:
|
|
|
|
targetType: inline
|
2022-12-04 05:09:56 +03:00
|
|
|
script: |
|
2022-12-04 04:49:52 +03:00
|
|
|
$file = '.\NuGet.Config'
|
|
|
|
$doc = [xml](Get-Content $file)
|
|
|
|
$newelement = $doc.CreateElement("clear")
|
|
|
|
$clearadd = $doc.configuration.packageSources.PrependChild($newelement)
|
|
|
|
$doc.OuterXml | Set-Content $file
|
|
|
|
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: NuGet install PGDK
|
|
|
|
inputs:
|
|
|
|
command: custom
|
|
|
|
arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\GDK
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: Set up Directory.Build.props
|
|
|
|
inputs:
|
|
|
|
SourceFolder: build
|
|
|
|
Contents: 'Directory.Build.props'
|
|
|
|
TargetFolder: $(Build.SourcesDirectory)
|
|
|
|
- task: MSBuild@1
|
|
|
|
displayName: Setup BWOI VCTargets
|
|
|
|
inputs:
|
|
|
|
solution: build/SetupBWOI.targets
|
|
|
|
msbuildVersion: 16.0
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: Build solution DirectXTK_GDK_2019 pcdbg
|
|
|
|
inputs:
|
|
|
|
solution: DirectXTK_GDK_2019.sln
|
|
|
|
vsVersion: 16.0
|
|
|
|
platform: Gaming.Desktop.x64
|
|
|
|
configuration: Debug
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: Build solution DirectXTK_GDK_2019 pcrel
|
|
|
|
inputs:
|
|
|
|
solution: DirectXTK_GDK_2019.sln
|
|
|
|
vsVersion: 16.0
|
|
|
|
platform: Gaming.Desktop.x64
|
|
|
|
configuration: Release
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
|
|
|
|
- job: BUILD_TESTS_GDK
|
|
|
|
displayName: 'Test Suite for Microsoft Game Development Kit (GDK)'
|
|
|
|
timeoutInMinutes: 120
|
|
|
|
cancelTimeoutInMinutes: 1
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
fetchTags: false
|
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: Fetch Tests
|
|
|
|
inputs:
|
|
|
|
script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/directxtktest.git Tests
|
|
|
|
workingDirectory: $(Build.SourcesDirectory)
|
|
|
|
failOnStderr: true
|
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
displayName: 'Use NuGet'
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: NuGet set package source to ADO feed
|
|
|
|
inputs:
|
|
|
|
command: custom
|
|
|
|
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile NuGet.config
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: Set nuget.config to single source
|
|
|
|
inputs:
|
|
|
|
targetType: inline
|
2022-12-04 05:09:56 +03:00
|
|
|
script: |
|
2022-12-04 04:49:52 +03:00
|
|
|
$file = '.\NuGet.Config'
|
|
|
|
$doc = [xml](Get-Content $file)
|
|
|
|
$newelement = $doc.CreateElement("clear")
|
|
|
|
$clearadd = $doc.configuration.packageSources.PrependChild($newelement)
|
|
|
|
$doc.OuterXml | Set-Content $file
|
|
|
|
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: NuGet install PGDK
|
|
|
|
inputs:
|
|
|
|
command: custom
|
|
|
|
arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\GDK
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: Set up Directory.Build.props
|
|
|
|
inputs:
|
|
|
|
SourceFolder: build
|
|
|
|
Contents: 'Directory.Build.props'
|
|
|
|
TargetFolder: $(Build.SourcesDirectory)
|
|
|
|
- task: MSBuild@1
|
|
|
|
displayName: Setup BWOI VCTargets
|
|
|
|
inputs:
|
|
|
|
solution: build/SetupBWOI.targets
|
|
|
|
msbuildVersion: 16.0
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: Build Tests pcdbg
|
|
|
|
inputs:
|
|
|
|
solution: '**\*GDK_2019*.sln'
|
|
|
|
vsVersion: 16.0
|
|
|
|
platform: Gaming.Desktop.x64
|
|
|
|
configuration: Debug
|
|
|
|
msbuildArchitecture: x64
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: Build Tests pcrel
|
|
|
|
inputs:
|
|
|
|
solution: '**\*GDK_2019*.sln'
|
|
|
|
vsVersion: 16.0
|
|
|
|
platform: Gaming.Desktop.x64
|
|
|
|
configuration: Release
|
|
|
|
msbuildArchitecture: x64
|