FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Produce min-size package for arm64 architecture (#27646) · PowerShell/PowerShell@0f53100 · GitHub

Commit 0f53100

Browse files
authored
Produce min-size package for arm64 architecture (#27646)
1 parent 36cd02b commit 0f53100

9 files changed

Lines changed: 101 additions & 307 deletions

File tree

‎.pipelines/templates/linux-package-build.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ jobs:
136136
'rpm-fxdependent' { 'Signed-fxdependent-linux-x64', 'powershell*.rpm' }
137137
'rpm-fxdependent-arm64' { 'Signed-fxdependent-linux-arm64', 'powershell*.rpm' }
138138
'rpm' { 'Signed-linux-x64', 'powershell*.rpm' }
139-
'min-size' { 'Signed-linux-x64', 'powershell*.tar.gz' }
139+
'min-size-x64' { 'Signed-linux-x64', 'powershell*.tar.gz' }
140+
'min-size-arm64' { 'Signed-linux-arm64', 'powershell*.tar.gz' }
140141
}
141142
142143
$signedFilesPath = "$(Pipeline.Workspace)/CoOrdinatedBuildPipeline/${signedDrop}/${signedFolder}"
@@ -173,7 +174,7 @@ jobs:
173174
174175
Start-PSPackage -Type $packageType -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath
175176
176-
if ($LTS) {
177+
if ($LTS -and ($packageType -like 'deb*' -or $packageType -like 'rpm*')) {
177178
Write-Verbose -Message "LTS Release: $LTS" -Verbose
178179
Start-PSPackage -Type $packageType -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath -LTS
179180
}

‎.pipelines/templates/packaging/windows/package.yml‎

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ jobs:
6363
- download: CoOrdinatedBuildPipeline
6464
artifact: drop_windows_build_windows_${{ parameters.runtime }}_release
6565
displayName: Download signed artifacts
66-
condition: ${{ ne(parameters.runtime, 'minSize') }}
66+
condition: ${{ not(contains(parameters.runtime, 'minsize')) }}
6767

6868
- download: CoOrdinatedBuildPipeline
69-
artifact: drop_windows_build_windows_x64_${{ parameters.runtime }}
69+
artifact: drop_windows_build_windows_${{ parameters.runtime }}
7070
displayName: Download minsize signed artifacts
71-
condition: ${{ eq(parameters.runtime, 'minSize') }}
71+
condition: ${{ contains(parameters.runtime, 'minsize') }}
7272

7373
- pwsh: |
7474
Write-Verbose -Verbose "signed artifacts"
75-
Get-ChildItem "$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_${{ parameters.runtime }}_release" -Recurse
75+
Get-ChildItem "$(Pipeline.Workspace)\CoOrdinatedBuildPipeline" -Recurse
7676
displayName: 'Capture Downloaded Artifacts'
7777
# Diagnostics is not critical it passes every time it runs
7878
continueOnError: true
@@ -91,7 +91,8 @@ jobs:
9191
'arm64' { 'Signed-win-arm64' }
9292
'fxdependent' { 'Signed-fxdependent' }
9393
'fxdependentWinDesktop' { 'Signed-fxdependent-win-desktop' }
94-
'minsize' { 'Signed-win7-x64' }
94+
'x64_minsize' { 'Signed-win7-x64' }
95+
'arm64_minsize' { 'Signed-win-arm64' }
9596
}
9697
9798
Write-Verbose -Message "Init..." -Verbose
@@ -104,9 +105,9 @@ jobs:
104105
105106
Find-Dotnet
106107
107-
$signedFilesPath, $psoptionsFilePath = if ($env:RUNTIME -eq 'minsize') {
108-
"$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_x64_${runtime}\$signedFolder"
109-
"$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_x64_${runtime}\psoptions\psoptions.json"
108+
$signedFilesPath, $psoptionsFilePath = if ($runtime.Contains('minsize')) {
109+
"$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_${runtime}\$signedFolder"
110+
"$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_${runtime}\psoptions\psoptions.json"
110111
}
111112
else {
112113
"$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_${runtime}_release\$signedFolder"
@@ -157,7 +158,8 @@ jobs:
157158
'arm64' { 'win-arm64' }
158159
'fxdependent' { 'win7-x64' }
159160
'fxdependentWinDesktop' { 'win7-x64' }
160-
'minsize' { 'win7-x64' }
161+
'x64_minsize' { 'win7-x64' }
162+
'arm64_minsize' { 'win-arm64' }
161163
}
162164
163165
$packageTypes = switch ($runtime) {
@@ -166,7 +168,8 @@ jobs:
166168
'arm64' { @('zip', 'msix') }
167169
'fxdependent' { 'fxdependent' }
168170
'fxdependentWinDesktop' { 'fxdependent-win-desktop' }
169-
'minsize' { 'min-size' }
171+
'x64_minsize' { 'min-size-x64' }
172+
'arm64_minsize' { 'min-size-arm64' }
170173
}
171174
172175
if (-not (Test-Path $(ob_outputDirectory))) {
@@ -198,14 +201,15 @@ jobs:
198201
'arm64' { @('zip', 'msix') }
199202
'fxdependent' { 'fxdependent' }
200203
'fxdependentWinDesktop' { 'fxdependent-win-desktop' }
201-
'minsize' { 'min-size' }
204+
'x64_minsize' { 'min-size-x64' }
205+
'arm64_minsize' { 'min-size-arm64' }
202206
}
203207
204208
if (-not (Test-Path $(ob_outputDirectory))) {
205209
New-Item -ItemType Directory -Path $(ob_outputDirectory) -Force
206210
}
207211
208-
if ($packageTypes -contains 'zip' -or $packageTypes -contains 'fxdependent' -or $packageTypes -contains 'min-size' -or $packageTypes -contains 'fxdependent-win-desktop') {
212+
if ($packageTypes -contains 'zip' -or $packageTypes -like 'fxdependent*' -or $packageTypes -like 'min-size*') {
209213
$zipPkgNameFilter = "powershell-*.zip"
210214
$zipPkgPath = Get-ChildItem -Path $(Pipeline.Workspace) -Filter $zipPkgNameFilter -Recurse -File | Select-Object -ExpandProperty FullName
211215
Write-Verbose -Verbose "unsigned zipPkgPath: $zipPkgPath"

‎.pipelines/templates/packaging/windows/sign.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,15 @@ jobs:
8888
'arm64' { @('zip', 'msix') }
8989
'fxdependent' { 'fxdependent' }
9090
'fxdependentWinDesktop' { 'fxdependent-win-desktop' }
91-
'minsize' { 'min-size' }
91+
'x64_minsize' { 'min-size-x64' }
92+
'arm64_minsize' { 'min-size-arm64' }
9293
}
9394
9495
if (-not (Test-Path $(ob_outputDirectory))) {
9596
New-Item -ItemType Directory -Path $(ob_outputDirectory) -Force
9697
}
9798
98-
if ($packageTypes -contains 'zip' -or $packageTypes -contains 'fxdependent' -or $packageTypes -contains 'min-size' -or $packageTypes -contains 'fxdependent-win-desktop') {
99+
if ($packageTypes -contains 'zip' -or $packageTypes -like 'fxdependent*' -or $packageTypes -like 'min-size*') {
99100
$zipPkgNameFilter = "powershell-*.zip"
100101
$zipPkgPath = Get-ChildItem -Path $(Pipeline.Workspace) -Filter $zipPkgNameFilter -Recurse -File | Select-Object -ExpandProperty FullName
101102
Write-Verbose -Verbose "signed zipPkgPath: $zipPkgPath"

‎.pipelines/templates/stages/PowerShell-Coordinated_Packages-Stages.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ stages:
8181
JobName: 'linux_x64_minSize'
8282
BuildConfiguration: 'minSize'
8383

84+
- template: /.pipelines/templates/linux.yml@self
85+
parameters:
86+
Runtime: 'linux-arm64'
87+
JobName: 'linux_arm64_minSize'
88+
BuildConfiguration: 'minSize'
89+
8490
- template: /.pipelines/templates/linux.yml@self
8591
parameters:
8692
Runtime: 'linux-arm'
@@ -134,6 +140,11 @@ stages:
134140
Architecture: x64
135141
BuildConfiguration: minSize
136142
JobName: build_windows_x64_minSize_release
143+
- template: /.pipelines/templates/windows-hosted-build.yml@self
144+
parameters:
145+
Architecture: arm64
146+
BuildConfiguration: minSize
147+
JobName: build_windows_arm64_minSize_release
137148
- template: /.pipelines/templates/windows-hosted-build.yml@self
138149
parameters:
139150
Architecture: x86

‎.pipelines/templates/stages/PowerShell-Packages-Stages.yml‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ stages:
4646

4747
- template: /.pipelines/templates/packaging/windows/package.yml@self
4848
parameters:
49-
runtime: minsize
49+
runtime: x64_minsize
50+
51+
- template: /.pipelines/templates/packaging/windows/package.yml@self
52+
parameters:
53+
runtime: arm64_minsize
5054

5155
- stage: windows_package_sign
5256
displayName: 'Win Pkg Sign'
@@ -74,7 +78,11 @@ stages:
7478

7579
- template: /.pipelines/templates/packaging/windows/sign.yml@self
7680
parameters:
77-
runtime: minsize
81+
runtime: x64_minsize
82+
83+
- template: /.pipelines/templates/packaging/windows/sign.yml@self
84+
parameters:
85+
runtime: arm64_minsize
7886

7987
- stage: linux_package
8088
displayName: 'Linux Pkg+Sign'
@@ -161,8 +169,15 @@ stages:
161169
parameters:
162170
unsignedDrop: 'drop_linux_build_linux_x64_minSize'
163171
signedDrop: 'drop_linux_sign_linux_x64_minSize'
164-
packageType: min-size
165-
jobName: minSize
172+
packageType: min-size-x64
173+
jobName: minSize_x64
174+
175+
- template: /.pipelines/templates/linux-package-build.yml@self
176+
parameters:
177+
unsignedDrop: 'drop_linux_build_linux_arm64_minSize'
178+
signedDrop: 'drop_linux_sign_linux_arm64_minSize'
179+
packageType: min-size-arm64
180+
jobName: minSize_arm64
166181

167182
- stage: nupkg
168183
displayName: 'NuGet Pkg+Sign'

‎.pipelines/templates/uploadToAzure.yml‎

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ jobs:
5656
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
5757
displayName: Download deb package
5858

59+
- task: DownloadPipelineArtifact@2
60+
inputs:
61+
buildType: 'current'
62+
artifact: drop_linux_package_deb_arm64
63+
itemPattern: '**/*.deb'
64+
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
65+
displayName: Download deb arm64 package
66+
5967
- task: DownloadPipelineArtifact@2
6068
inputs:
6169
buildType: 'current'
@@ -83,10 +91,18 @@ jobs:
8391
- task: DownloadPipelineArtifact@2
8492
inputs:
8593
buildType: 'current'
86-
artifact: drop_linux_package_minSize
94+
artifact: drop_linux_package_minSize_x64
95+
itemPattern: '**/*.tar.gz'
96+
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
97+
displayName: Download linux minSize x64 package
98+
99+
- task: DownloadPipelineArtifact@2
100+
inputs:
101+
buildType: 'current'
102+
artifact: drop_linux_package_minSize_arm64
87103
itemPattern: '**/*.tar.gz'
88104
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
89-
displayName: Download linux minSize package
105+
displayName: Download linux minSize arm64 package
90106

91107
- task: DownloadPipelineArtifact@2
92108
inputs:
@@ -173,10 +189,18 @@ jobs:
173189
- task: DownloadPipelineArtifact@2
174190
inputs:
175191
buildType: 'current'
176-
artifact: drop_windows_package_package_win_minsize
192+
artifact: drop_windows_package_package_win_x64_minsize
193+
itemPattern: '**/*.zip'
194+
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
195+
displayName: Download windows x64 minsize packages
196+
197+
- task: DownloadPipelineArtifact@2
198+
inputs:
199+
buildType: 'current'
200+
artifact: drop_windows_package_package_win_arm64_minsize
177201
itemPattern: '**/*.zip'
178202
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
179-
displayName: Download windows minsize packages
203+
displayName: Download windows arm64 minsize packages
180204

181205
- task: DownloadPipelineArtifact@2
182206
inputs:

‎build.psm1‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ function Start-PSBuild {
463463
}
464464

465465
if ($ForMinimalSize) {
466-
if ($Runtime -and "linux-x64", "win7-x64", "osx-x64" -notcontains $Runtime) {
467-
throw "Build for the minimal size is enabled only for following runtimes: 'linux-x64', 'win7-x64', 'osx-x64'"
466+
if ($Runtime -and "linux-x64", "linux-arm64", "win7-x64", "win-arm64", "osx-x64", "osx-arm64" -notcontains $Runtime) {
467+
throw "Build for the minimal size is enabled only for following runtimes: 'linux-x64', 'linux-arm64', 'win7-x64', 'win-arm64', 'osx-x64', 'osx-arm64'"
468468
}
469469
}
470470

@@ -3192,7 +3192,7 @@ function Start-TypeGen
31923192

31933193
Push-Location "$PSScriptRoot/src/TypeCatalogGen"
31943194
try {
3195-
Start-NativeExecution { dotnet run ../System.Management.Automation/CoreCLR/CorePsTypeCatalog.cs $IncFileName }
3195+
Start-NativeExecution { dotnet run -- ../System.Management.Automation/CoreCLR/CorePsTypeCatalog.cs $IncFileName }
31963196
} finally {
31973197
Pop-Location
31983198
}

‎tools/packaging/packaging.psd1‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
CmdletsToExport = @()
99
FunctionsToExport = @(
1010
'Expand-PSSignedBuild'
11-
'Invoke-AzDevOpsLinuxPackageBuild'
12-
'Invoke-AzDevOpsLinuxPackageCreation'
1311
'New-DotnetSdkContainerFxdPackage'
1412
'Start-PrepForGlobalToolNupkg'
1513
'New-GlobalToolNupkgSource'

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL