1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-08 14:00:05 +00:00
DirectXTex/build/DirectXTex-GitHub-GDK.yml

203 lines
5.6 KiB
YAML

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
# Builds the library with Xbox extensions using the Microsoft GDK.
# NOTE: We use x64 MSBuild for the GDK as the NuGets don't include 32-bit support to avoid cross-arch dependencies.
schedules:
- cron: "30 3 * * *"
displayName: 'Nightly build'
branches:
include:
- main
trigger:
branches:
include:
- main
paths:
exclude:
- README.md
- HISTORY.md
- SECURITY.md
- LICENSE
pr:
branches:
include:
- main
paths:
exclude:
- README.md
- HISTORY.md
- SECURITY.md
- LICENSE
drafts: false
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
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'
inputs:
versionSpec: '6.5.x'
- 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-DirectXTex -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: PowerShell@2
displayName: 'Set nuget.config to single source'
inputs:
targetType: inline
script: |
$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: NuGetCommand@2
displayName: NuGet install GDKX
inputs:
command: custom
arguments: install -prerelease Microsoft.GDK.Xbox.$(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 DirectXTex_GDK_2019 pcdbg
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Desktop.x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_2019 pcrel
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Desktop.x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_2019 xbdbg
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Xbox.XboxOne.x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_2019 xbrel
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Xbox.XboxOne.x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_2019 scardbg
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Xbox.Scarlett.x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_2019 scarrel
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Xbox.Scarlett.x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_2019 dbg
continueOnError: True
inputs:
solution: DirectXTex_GXDK_PC_2019.sln
vsVersion: 16.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_2019 rel
continueOnError: True
inputs:
solution: DirectXTex_GXDK_PC_2019.sln
vsVersion: 16.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_2019 scardbg
continueOnError: True
inputs:
solution: DirectXTex_GXDK_PC_2019.sln
vsVersion: 16.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug_Scarlett
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_2019 scarrel
continueOnError: True
inputs:
solution: DirectXTex_GXDK_PC_2019.sln
vsVersion: 16.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release_Scarlett
msbuildArchitecture: x64