Skip build steps that do not have exe packages (#23945)

This commit is contained in:
Aditya Patwardhan
2024-07-01 11:36:04 -07:00
committed by GitHub
parent 8c5a72522a
commit dbb17afcb2
2 changed files with 25 additions and 6 deletions
+11 -2
View File
@@ -205,7 +205,7 @@ jobs:
Write-Verbose -Verbose "exePath: $exePath"
$enginePath = Join-Path -Path '$(System.ArtifactsDirectory)\unsignedEngine' -ChildPath engine.exe
Expand-ExePackageEngine -ExePath $exePath -EnginePath $enginePath
Expand-ExePackageEngine -ExePath $exePath -EnginePath $enginePath -ProductTargetArchitecture $runtime
displayName: 'Make exe and expand package'
- task: onebranch.pipeline.signing@1
@@ -217,14 +217,23 @@ jobs:
search_root: '$(Pipeline.Workspace)'
- pwsh: |
$runtime = '$(Runtime)'
Write-Verbose -Verbose "runtime = '$(Runtime)'"
$repoRoot = "$env:REPOROOT"
Import-Module "$repoRoot\build.psm1"
Import-Module "$repoRoot\tools\packaging"
$noExeRuntimes = @('fxdependent', 'fxdependentWinDesktop', 'minsize')
if ($runtime -in $noExeRuntimes) {
Write-Verbose -Verbose "No EXE generated for $runtime"
return
}
$exePath = '$(exePath)'
$enginePath = Join-Path -Path '$(System.ArtifactsDirectory)\unsignedEngine' -ChildPath engine.exe
$enginePath | Get-AuthenticodeSignature | out-string | Write-Verbose -verbose
Compress-ExePackageEngine -ExePath $exePath -EnginePath $enginePath
Compress-ExePackageEngine -ExePath $exePath -EnginePath $enginePath -ProductTargetArchitecture $runtime
displayName: Compress signed exe package
- task: onebranch.pipeline.signing@1
+14 -4
View File
@@ -3598,7 +3598,12 @@ function Expand-ExePackageEngine {
# Location to put the expanded engine.
[Parameter(Mandatory = $true)]
[string]
$EnginePath
$EnginePath,
[Parameter(Mandatory = $true)]
[ValidateSet("x86", "x64", "arm64")]
[ValidateNotNullOrEmpty()]
[string] $ProductTargetArchitecture
)
<#
@@ -3606,7 +3611,7 @@ function Expand-ExePackageEngine {
insignia -ib TestInstaller.exe -o engine.exe
#>
$wixPaths = Get-WixPath
$wixPaths = Get-WixPath -IsProductArchitectureArm ($ProductTargetArchitecture -eq "arm64")
$resolvedExePath = (Resolve-Path -Path $ExePath).ProviderPath
$resolvedEnginePath = [System.IO.Path]::GetFullPath($EnginePath)
@@ -3628,7 +3633,12 @@ function Compress-ExePackageEngine {
# Location of the signed engine
[Parameter(Mandatory = $true)]
[string]
$EnginePath
$EnginePath,
[Parameter(Mandatory = $true)]
[ValidateSet("x86", "x64", "arm64")]
[ValidateNotNullOrEmpty()]
[string] $ProductTargetArchitecture
)
@@ -3637,7 +3647,7 @@ function Compress-ExePackageEngine {
insignia -ab engine.exe TestInstaller.exe -o TestInstaller.exe
#>
$wixPaths = Get-WixPath
$wixPaths = Get-WixPath -IsProductArchitectureArm ($ProductTargetArchitecture -eq "arm64")
$resolvedEnginePath = (Resolve-Path -Path $EnginePath).ProviderPath
$resolvedExePath = (Resolve-Path -Path $ExePath).ProviderPath