Skip to content

Commit

Permalink
Use separate folder for publishing redist files, not the nuget packag…
Browse files Browse the repository at this point in the history
…e cache (#4940)

* Remove publish of packages dir

Can't think of a good reason to publish the entire nuget cache, which adds 4GB and significant time

* publish redist files exclusively, not the entire nuget package cache

* missed redist path

* include TAEF in redist

* install TEAF from redist folder
  • Loading branch information
Scottj1s authored Dec 8, 2024
1 parent 0d7a920 commit 7b78272
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,30 @@ steps:
# Artifacts are uploaded via ob_outputDirectory where the each vPack Push jobs downloads from
# so the CopyFiles below are to move all the vPack files to the right locations
- task: CopyFiles@2
displayName: MoveToOutputDirectory
displayName: Stage BuildOutput for publish
condition: always()
inputs:
SourceFolder: '$(build.SourcesDirectory)\BuildOutput'
TargetFolder: '$(ob_outputDirectory)'

- task: CopyFiles@2
displayName: MoveToOutputDirectory
displayName: Stage redist files for publish
condition: always()
inputs:
SourceFolder: '$(build.SourcesDirectory)\redist'
TargetFolder: '$(ob_outputDirectory)\redist'

- task: CopyFiles@2
displayName: Stage TAEF files for publish
condition: always()
inputs:
SourceFolder: '$(build.SourcesDirectory)\packages'
TargetFolder: '$(ob_outputDirectory)\packages'
Contents: Microsoft.Taef.*\**
TargetFolder: '$(ob_outputDirectory)\redist'

- ${{ if not( parameters.IsOneBranch ) }}:
- task: PublishBuildArtifacts@1
condition: always()
inputs:
PathtoPublish: '$(ob_outputDirectory)'
artifactName: '$(ob_artifactBaseName)'
artifactName: '$(ob_artifactBaseName)'
11 changes: 6 additions & 5 deletions build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ steps:
targetPath: '$(Build.SourcesDirectory)\BuildOutput'

- task: CopyFiles@2
displayName: Download published redist files
inputs:
SourceFolder: '$(Build.SourcesDirectory)\BuildOutput\packages'
TargetFolder: '$(Build.SourcesDirectory)\packages'
SourceFolder: '$(Build.SourcesDirectory)\BuildOutput\redist'
TargetFolder: '$(Build.SourcesDirectory)\redist'

- task: powerShell@2
displayName: 'Enable developer mode'
Expand Down Expand Up @@ -72,22 +73,22 @@ steps:
inputs:
targetType: 'inline'
script: |
$(Build.SourcesDirectory)\packages\dotnet-windowsdesktop-runtime-installer.exe /quiet /install /norestart
$(Build.SourcesDirectory)\redist\dotnet-windowsdesktop-runtime-installer.exe /quiet /install /norestart
- task: powerShell@2
displayName: 'Install VCLibs.Desktop'
inputs:
targetType: 'inline'
script: |
$package = "$(Build.SourcesDirectory)\packages\Microsoft.VCLibs.${{ parameters.buildPlatform }}.14.00.Desktop.appx"
$package = "$(Build.SourcesDirectory)\redist\Microsoft.VCLibs.${{ parameters.buildPlatform }}.14.00.Desktop.appx"
Add-AppxPackage $package -ErrorAction SilentlyContinue
- task: powerShell@2
displayName: 'Install vc_redist'
inputs:
targetType: 'inline'
script: |
$(Build.SourcesDirectory)\packages\vc_redist.${{ parameters.buildPlatform }}.exe /quiet /install /norestart
$(Build.SourcesDirectory)\redist\vc_redist.${{ parameters.buildPlatform }}.exe /quiet /install /norestart
- task: powershell@2
displayName: 'Run TE.Service'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,23 @@ steps:
inputs:
targetType: filePath
filePath: '$(Build.SourcesDirectory)\build\scripts\DownloadDotNetRuntimeInstaller.ps1'
arguments: -Platform "$(buildPlatform)" -OutputDirectory "$(build.SourcesDirectory)\packages"
arguments: -Platform "$(buildPlatform)" -OutputDirectory "$(build.SourcesDirectory)\redist"
- task: PowerShell@2
displayName: 'Download vcredist installer'
condition: or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64'), eq(variables['buildPlatform'], 'arm64'))
inputs:
targetType: filePath
filePath: '$(Build.SourcesDirectory)\build\scripts\DownloadVCRedistInstaller.ps1'
arguments: -Platform "$(buildPlatform)" -OutputDirectory "$(build.SourcesDirectory)\packages"
arguments: -Platform "$(buildPlatform)" -OutputDirectory "$(build.SourcesDirectory)\redist"
- task: PowerShell@2
displayName: 'Download desktop bridge CRT'
condition: or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64'), eq(variables['buildPlatform'], 'arm64'))
inputs:
targetType: filePath
filePath: '$(Build.SourcesDirectory)\build\scripts\DownloadVCLibsDesktop.ps1'
arguments: -Platform "$(buildPlatform)" -OutputDirectory "$(build.SourcesDirectory)\packages"
arguments: -Platform "$(buildPlatform)" -OutputDirectory "$(build.SourcesDirectory)\redist"
- task: powershell@2
displayName: 'Create DynamicDependencies TerminalVelocity features'
Expand Down
2 changes: 1 addition & 1 deletion tools/DevCheck/DevCheck.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ function Install-TAEFService
$cpu = Get-CpuArchitecture
$taef_version = Get-TAEFPackageVersion
$taef = "Microsoft.Taef.$($taef_version)"
$path = "$root\packages\$taef\build\Binaries\$cpu\Wex.Services.exe"
$path = "$root\redist\$taef\build\Binaries\$cpu\Wex.Services.exe"
if (-not(Test-Path -Path $path -PathType Leaf))
{
Write-Host "Install TAEF service...Not Found ($path)"
Expand Down

0 comments on commit 7b78272

Please sign in to comment.