Skip to content

Commit

Permalink
Build pipeline updates (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn authored Sep 11, 2024
1 parent 78dde0f commit 8199402
Show file tree
Hide file tree
Showing 12 changed files with 95 additions and 68 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248929

name: 'Publish to NuGet.org'

on:
workflow_dispatch:
inputs:
enablepublish:
description: "Publish to nuget.org"
default: "on"

permissions:
contents: read

env:
DESKTOP_NUGET: directxtk_desktop_2019
WIN10_NUGET: directxtk_desktop_win10
UWP_NUGET: directxtk_uwp

jobs:
deploy:
runs-on: windows-latest
environment: production
steps:
- uses: nuget/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9 # v2

- name: 'Fetch XAudio2Redist from NuGet.org'
run: nuget install Microsoft.XAudio2.Redist -Source https://api.nuget.org/v3/index.json -OutputDirectory ${{ github.workspace }}

- name: 'Fetch NuGet package 1 from Release view'
run: nuget install ${{ env.DESKTOP_NUGET }} -Source %URL% -OutputDirectory ${{ github.workspace }}
env:
URL: ${{ vars.ADO_FEED_URL }}

- name: 'Fetch NuGet package 2 from Release view'
run: nuget install ${{ env.WIN10_NUGET }} -Source %URL% -OutputDirectory ${{ github.workspace }}
env:
URL: ${{ vars.ADO_FEED_URL }}

- name: 'Fetch NuGet package 3 from Release view'
run: nuget install ${{ env.UWP_NUGET }} -Source %URL% -OutputDirectory ${{ github.workspace }}
env:
URL: ${{ vars.ADO_FEED_URL }}

- name: 'Verify NuGet packages'
working-directory: ${{ github.workspace }}
run: for /R %1 in (directxtk*.nupkg) do nuget verify -All -Signatures -Verbosity quiet %1

- if: github.event.inputs.enablepublish == 'on'
name: 'Publish NuGet packages'
working-directory: ${{ github.workspace }}
run: for /R %1 in (directxtk*.nupkg) do nuget push %1 -Source https://api.nuget.org/v3/index.json -ApiKey %APIKEY% -SkipDuplicate
env:
APIKEY: ${{ secrets.NUGET_APIKEY }}
23 changes: 1 addition & 22 deletions build/DirectXTK-GitHub-CMake-Dev17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables:
Codeql.Enabled: false
VS_GENERATOR: 'Visual Studio 17 2022'
REDIST_DIR: $(xaudio2redist_DIR)
WIN10_SDK: '10.0.19041.0'
WIN11_SDK: '10.0.22000.0'

Expand Down Expand Up @@ -160,27 +159,7 @@ jobs:
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out8 -v
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
enabled: False
- task: NuGetCommand@2
displayName: Install Microsoft.XAudio2.Redist
enabled: False
inputs:
command: custom
arguments: install Microsoft.XAudio2.Redist -ExcludeVersion -OutputDirectory $(REDIST_DIR)
- task: CMake@1
displayName: 'CMake (ClangCl Win7): Config'
enabled: False
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out9 -DBUILD_XAUDIO_WIN7=ON -DBUILD_XAUDIO_WIN8=OFF -DBUILD_TOOLS=OFF -Dxaudio2redist_DIR=$(REDIST_DIR)\Microsoft.XAudio2.Redist'
- task: CMake@1
displayName: 'CMake (Build Win7): Build'
enabled: False
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out9 -v
# removed out9 case
- task: CMake@1
displayName: 'CMake (MSVC Spectre): Config x64'
inputs:
Expand Down
23 changes: 1 addition & 22 deletions build/DirectXTK-GitHub-CMake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables:
Codeql.Enabled: false
VS_GENERATOR: 'Visual Studio 16 2019'
REDIST_DIR: $(xaudio2redist_DIR)
WIN10_SDK: '10.0.19041.0'
WIN11_SDK: '10.0.22000.0'

Expand Down Expand Up @@ -160,27 +159,7 @@ jobs:
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out8 -v
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
enabled: False
- task: NuGetCommand@2
displayName: Install Microsoft.XAudio2.Redist
enabled: False
inputs:
command: custom
arguments: install Microsoft.XAudio2.Redist -ExcludeVersion -OutputDirectory $(REDIST_DIR)
- task: CMake@1
displayName: 'CMake (ClangCl Win7): Config'
enabled: False
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out9 -DBUILD_XAUDIO_WIN7=ON -DBUILD_XAUDIO_WIN8=OFF -DBUILD_TOOLS=OFF -Dxaudio2redist_DIR=$(REDIST_DIR)\Microsoft.XAudio2.Redist'
- task: CMake@1
displayName: 'CMake (Build Win7): Build'
enabled: False
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out9 -v
# removed out9 case
- task: CMake@1
displayName: 'CMake (MSVC Spectre): Config x64'
inputs:
Expand Down
2 changes: 2 additions & 0 deletions build/DirectXTK-GitHub-Dev17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet restore
inputs:
Expand Down
8 changes: 4 additions & 4 deletions build/DirectXTK-GitHub-GDK-Dev17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
Expand All @@ -84,6 +82,8 @@ jobs:
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet install PGDK
inputs:
Expand Down Expand Up @@ -130,8 +130,6 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
Expand All @@ -155,6 +153,8 @@ jobs:
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet install PGDK
inputs:
Expand Down
8 changes: 4 additions & 4 deletions build/DirectXTK-GitHub-GDK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
Expand All @@ -105,6 +103,8 @@ jobs:
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet install PGDK
inputs:
Expand Down Expand Up @@ -155,8 +155,6 @@ jobs:
failOnStderr: true
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
Expand All @@ -179,6 +177,8 @@ jobs:
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet install PGDK
inputs:
Expand Down
17 changes: 9 additions & 8 deletions build/DirectXTK-GitHub-SDK-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
Expand All @@ -70,6 +68,8 @@ jobs:
arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet Install WSDK x64
inputs:
Expand Down Expand Up @@ -226,8 +226,6 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
Expand All @@ -250,6 +248,8 @@ jobs:
arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet Install WSDK x64
inputs:
Expand Down Expand Up @@ -295,16 +295,15 @@ jobs:
platform: x64
configuration: Release

- job: UWP_BUILD_ARM_ARM64
displayName: 'Universal Windows Platform (UWP) for ARM/ARM64'
- job: UWP_BUILD_ARM64
displayName: 'Universal Windows Platform (UWP) for ARM64'
# Windows on ARM 32-bit is deprecated. https://learn.microsoft.com/windows/arm/arm32-to-arm64
steps:
- checkout: self
clean: true
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
Expand All @@ -327,6 +326,8 @@ jobs:
arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet Install WSDK arm64
inputs:
Expand Down
17 changes: 9 additions & 8 deletions build/DirectXTK-GitHub-SDK-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
Expand All @@ -70,6 +68,8 @@ jobs:
arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet Install WSDK x64
inputs:
Expand Down Expand Up @@ -226,8 +226,6 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
Expand All @@ -250,6 +248,8 @@ jobs:
arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet Install WSDK x64
inputs:
Expand Down Expand Up @@ -295,16 +295,15 @@ jobs:
platform: x64
configuration: Release

- job: UWP_BUILD_ARM_ARM64
displayName: 'Universal Windows Platform (UWP) for ARM/ARM64'
- job: UWP_BUILD_ARM64
displayName: 'Universal Windows Platform (UWP) for ARM64'
# Windows on ARM 32-bit is deprecated. https://learn.microsoft.com/windows/arm/arm32-to-arm64
steps:
- checkout: self
clean: true
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: '6.5.x'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
Expand All @@ -327,6 +326,8 @@ jobs:
arguments: sources add -Name xboxgdk-DirectXTK -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet Install WSDK arm64
inputs:
Expand Down
2 changes: 2 additions & 0 deletions build/DirectXTK-GitHub-Test-Dev17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ jobs:
failOnStderr: true
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet restore
inputs:
Expand Down
2 changes: 2 additions & 0 deletions build/DirectXTK-GitHub-Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ jobs:
failOnStderr: true
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet restore
inputs:
Expand Down
2 changes: 2 additions & 0 deletions build/DirectXTK-GitHub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet restore
inputs:
Expand Down
2 changes: 2 additions & 0 deletions build/DirectXTK-SDL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ jobs:
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NodeTool@0
displayName: 'NPM install'
inputs:
Expand Down

0 comments on commit 8199402

Please sign in to comment.