[release/v7.3.0-rc.1] Revert "Replace win7 runtime with win8 and remove APISets (#18304)" (#18376)

This commit is contained in:
github-actions[bot]
2022-10-25 10:34:32 -07:00
committed by GitHub
parent 081b014e8b
commit a5739b1739
20 changed files with 53 additions and 52 deletions
@@ -4,7 +4,7 @@ parameters:
- name: jobName
default: 'win_packaging'
- name: runtimePrefix
default: 'win81'
default: 'win7'
- name: architecture
default: 'x64'
- name: channel
+11 -11
View File
@@ -270,7 +270,7 @@ function Test-IsReleaseCandidate
return $false
}
$optimizedFddRegex = 'fxdependent-(linux|alpine|win|win81|osx)-(x64|x86|arm64|arm)'
$optimizedFddRegex = 'fxdependent-(linux|alpine|win|win7|osx)-(x64|x86|arm64|arm)'
function Start-PSBuild {
[CmdletBinding(DefaultParameterSetName="Default")]
@@ -315,8 +315,8 @@ function Start-PSBuild {
"osx-x64",
"win-arm",
"win-arm64",
"win81-x64",
"win81-x86")]
"win7-x64",
"win7-x86")]
[string]$Runtime,
[ValidateSet('Debug', 'Release', 'CodeCoverage', 'StaticAnalysis', '')] # We might need "Checked" as well
@@ -349,8 +349,8 @@ function Start-PSBuild {
}
if ($ForMinimalSize) {
if ($Runtime -and "linux-x64", "win81-x64", "osx-x64" -notcontains $Runtime) {
throw "Build for the minimal size is enabled only for following runtimes: 'linux-x64', 'win81-x64', 'osx-x64'"
if ($Runtime -and "linux-x64", "win7-x64", "osx-x64" -notcontains $Runtime) {
throw "Build for the minimal size is enabled only for following runtimes: 'linux-x64', 'win7-x64', 'osx-x64'"
}
}
@@ -528,7 +528,7 @@ Fix steps:
if ($Options.Runtime -notlike 'fxdependent*' -or $Options.Runtime -match $optimizedFddRegex) {
Write-Verbose "Building without shim" -Verbose
$sdkToUse = 'Microsoft.NET.Sdk'
if ($Options.Runtime -like 'win81-*' -and !$ForMinimalSize) {
if ($Options.Runtime -like 'win7-*' -and !$ForMinimalSize) {
## WPF/WinForm and the PowerShell GraphicalHost assemblies are included
## when 'Microsoft.NET.Sdk.WindowsDesktop' is used.
$sdkToUse = 'Microsoft.NET.Sdk.WindowsDesktop'
@@ -721,7 +721,7 @@ function Restore-PSPackage
}
else {
$sdkToUse = 'Microsoft.NET.Sdk'
if ($Options.Runtime -like 'win81-*' -and !$Options.ForMinimalSize) {
if ($Options.Runtime -like 'win7-*' -and !$Options.ForMinimalSize) {
$sdkToUse = 'Microsoft.NET.Sdk.WindowsDesktop'
}
}
@@ -836,8 +836,8 @@ function New-PSOptions {
"osx-x64",
"win-arm",
"win-arm64",
"win81-x64",
"win81-x86")]
"win7-x64",
"win7-x86")]
[string]$Runtime,
# Accept a path to the output directory
@@ -871,9 +871,9 @@ function New-PSOptions {
switch ($Platform) {
'Windows' {
# For x86 and x64 architectures, we use win81-x64 and win81-x86 RIDs.
# For x86 and x64 architectures, we use win7-x64 and win7-x86 RIDs.
# For arm and arm64 architectures, we use win-arm and win-arm64 RIDs.
$Platform = if ($Architecture[0] -eq 'x') { 'win81' } else { 'win' }
$Platform = if ($Architecture[0] -eq 'x') { 'win7' } else { 'win' }
$Runtime = "${Platform}-${Architecture}"
}
+1 -1
View File
@@ -7,7 +7,7 @@
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win81-x86;win81-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
</Project>
+1 -1
View File
@@ -8,7 +8,7 @@
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win81-x86;win81-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
</Project>
@@ -8,7 +8,7 @@
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<TieredCompilationQuickJitForLoops>true</TieredCompilationQuickJitForLoops>
<RuntimeIdentifiers>win81-x86;win81-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
<RootNamespace>Microsoft.PowerShell</RootNamespace>
<ApplicationManifest>..\..\assets\pwsh.manifest</ApplicationManifest>
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
+1
View File
@@ -5,6 +5,7 @@
<PropertyGroup>
<Description>PowerShell hosting SDK xUnit Tests</Description>
<AssemblyName>powershell-hosting-tests</AssemblyName>
<!--RuntimeIdentifiers>win7-x86;win7-x64;osx.10.13-x64;linux-x64</RuntimeIdentifiers-->
</PropertyGroup>
<PropertyGroup>
+5 -5
View File
@@ -63,17 +63,17 @@ Describe -Name "Windows EXE" -Fixture {
Context "$Channel-$Runtime" {
BeforeAll {
Write-Verbose "cr-$channel-$runtime" -Verbose
switch -regex ("$channel-$runtime") {
"preview-win\d*-x64" {
switch ("$channel-$runtime") {
"preview-win7-x64" {
$msiUpgradeCode = '39243d76-adaf-42b1-94fb-16ecf83237c8'
}
"stable-win\d*-x64" {
"stable-win7-x64" {
$msiUpgradeCode = '31ab5147-9a97-4452-8443-d9709f0516e1'
}
"preview-win\d*-x86" {
"preview-win7-x86" {
$msiUpgradeCode = '86abcfbd-1ccc-4a88-b8b2-0facfde29094'
}
"stable-win\d*-x86" {
"stable-win7-x86" {
$msiUpgradeCode = '1d00683b-0f84-4db8-a64f-2f98ad42fe06'
}
default {
+5 -5
View File
@@ -145,23 +145,23 @@ Describe -Name "Windows MSI" -Fixture {
$pwshPath = Join-Path $env:ProgramFiles -ChildPath "PowerShell"
$pwshx86Path = Join-Path ${env:ProgramFiles(x86)} -ChildPath "PowerShell"
switch -regex ("$channel-$runtime") {
"preview-win\d*-x64" {
switch ("$channel-$runtime") {
"preview-win7-x64" {
$versionPath = Join-Path -Path $pwshPath -ChildPath '7-preview'
$revisionRange = 0, 99
$msiUpgradeCode = '39243d76-adaf-42b1-94fb-16ecf83237c8'
}
"stable-win\d*-x64" {
"stable-win7-x64" {
$versionPath = Join-Path -Path $pwshPath -ChildPath '7'
$revisionRange = 500, 500
$msiUpgradeCode = '31ab5147-9a97-4452-8443-d9709f0516e1'
}
"preview-win\d*-x86" {
"preview-win7-x86" {
$versionPath = Join-Path -Path $pwshx86Path -ChildPath '7-preview'
$revisionRange = 0, 99
$msiUpgradeCode = '86abcfbd-1ccc-4a88-b8b2-0facfde29094'
}
"stable-win\d*-x86" {
"stable-win7-x86" {
$versionPath = Join-Path -Path $pwshx86Path -ChildPath '7'
$revisionRange = 500, 500
$msiUpgradeCode = '1d00683b-0f84-4db8-a64f-2f98ad42fe06'
@@ -167,7 +167,7 @@ Describe "Default enablement of Experimental Features" -Tags CI {
It "On stable builds, Experimental Features are not enabled" -Skip:($isPreview) {
foreach ($expFeature in Get-ExperimentalFeature)
{
# In CI, pwsh that is running tests (with $PSHOME like D:\a\1\s\src\powershell-win-core\bin\release\net7.0\win81-x64\publish)
# In CI, pwsh that is running tests (with $PSHOME like D:\a\1\s\src\powershell-win-core\bin\release\net7.0\win7-x64\publish)
# is launched from another pwsh (with $PSHOME like C:\program files\powershell\7)
# resulting in combined PSModulePath which is used by Get-ExperimentalFeature to enum module-scoped exp.features from both pwsh locations.
# So we need to exclude parent's modules' exp.features from verification using filtering on $PSHOME.
@@ -184,7 +184,7 @@ Describe "Default enablement of Experimental Features" -Tags CI {
foreach ($expFeature in Get-ExperimentalFeature)
{
# In CI, pwsh that is running tests (with $PSHOME like D:\a\1\s\src\powershell-win-core\bin\release\net7.0\win81-x64\publish)
# In CI, pwsh that is running tests (with $PSHOME like D:\a\1\s\src\powershell-win-core\bin\release\net7.0\win7-x64\publish)
# is launched from another pwsh (with $PSHOME like C:\program files\powershell\7)
# resulting in combined PSModulePath which is used by Get-ExperimentalFeature to enum module-scoped exp.features from both pwsh locations.
# So we need to exclude parent's modules' exp.features from verification using filtering on $PSHOME.
+2 -2
View File
@@ -615,7 +615,7 @@ function Install-OpenCover
.Description
Invoke-OpenCover runs tests under OpenCover by executing tests on PowerShell located at $PowerShellExeDirectory.
.EXAMPLE
Invoke-OpenCover -TestPath $PWD/test/powershell -PowerShellExeDirectory $PWD/src/powershell-win-core/bin/CodeCoverage/7.0/win81-x64
Invoke-OpenCover -TestPath $PWD/test/powershell -PowerShellExeDirectory $PWD/src/powershell-win-core/bin/CodeCoverage/7.0/win7-x64
#>
function Invoke-OpenCover
{
@@ -624,7 +624,7 @@ function Invoke-OpenCover
[parameter()]$OutputLog = "$HOME/Documents/OpenCover.xml",
[parameter()]$TestPath = "${script:psRepoPath}/test/powershell",
[parameter()]$OpenCoverPath = "$HOME/OpenCover",
[parameter()]$PowerShellExeDirectory = "${script:psRepoPath}/src/powershell-win-core/bin/CodeCoverage/net7.0/win81-x64/publish",
[parameter()]$PowerShellExeDirectory = "${script:psRepoPath}/src/powershell-win-core/bin/CodeCoverage/net7.0/win7-x64/publish",
[parameter()]$PesterLogElevated = "$HOME/Documents/TestResultsElevated.xml",
[parameter()]$PesterLogUnelevated = "$HOME/Documents/TestResultsUnelevated.xml",
[parameter()]$PesterLogFormat = "NUnitXml",
+1 -1
View File
@@ -8,7 +8,7 @@
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win81-x86;win81-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
</Project>
+1 -1
View File
@@ -9,7 +9,7 @@
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win81-x86;win81-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -6,7 +6,7 @@
<Description>PowerShell xUnit Tests</Description>
<AssemblyName>powershell-tests</AssemblyName>
<GenerateProgramFile>true</GenerateProgramFile>
<RuntimeIdentifiers>win81-x86;win81-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup>
+1 -1
View File
@@ -467,7 +467,7 @@ function Get-ReleaseTag
function Invoke-CIFinish
{
param(
[string] $Runtime = 'win81-x64',
[string] $Runtime = 'win7-x64',
[string] $Channel = 'preview',
[Validateset('Build','Package')]
[string[]] $Stage = ('Build','Package')
+5 -5
View File
@@ -166,8 +166,8 @@ function Get-CGRegistrations {
"osx-x64",
"win-arm",
"win-arm64",
"win81-x64",
"win81-x86",
"win7-x64",
"win7-x86",
"modules")]
[string]$Runtime,
@@ -196,7 +196,7 @@ function Get-CGRegistrations {
$folder = $unixProjectName
$target = "$dotnetTargetName|$Runtime"
}
"win81-.*" {
"win7-.*" {
$sdkToUse = $winDesktopSdk
$folder = $windowsProjectName
$target = "$dotnetTargetNameWin7|$Runtime"
@@ -264,7 +264,7 @@ function Get-CGRegistrations {
$registrations = [System.Collections.Generic.Dictionary[string, Registration]]::new()
$lastCount = 0
$registrationChanged = $false
foreach ($runtime in "win81-x64", "linux-x64", "osx-x64", "alpine-x64", "win-arm", "linux-arm", "linux-arm64", "osx-arm64", "win-arm64", "win81-x86") {
foreach ($runtime in "win7-x64", "linux-x64", "osx-x64", "alpine-x64", "win-arm", "linux-arm", "linux-arm64", "osx-arm64", "win-arm64", "win7-x86") {
$registrationChanged = (Get-CGRegistrations -Runtime $runtime -RegistrationTable $registrations) -or $registrationChanged
$count = $registrations.Count
$newCount = $count - $lastCount
@@ -276,7 +276,7 @@ $newRegistrations = $registrations.Keys | Sort-Object | ForEach-Object { $regist
$count = $newRegistrations.Count
$newJson = @{
Registrations = $newRegistrations
Registrations = $newRegistrations
'$schema' = "https://json.schemastore.org/component-detection-manifest.json"
} | ConvertTo-Json -depth 99
+4 -4
View File
@@ -41,7 +41,7 @@ function Start-PSPackage {
[string[]]$Type,
# Generate windows downlevel package
[ValidateSet("win81-x86", "win81-x64", "win-arm", "win-arm64")]
[ValidateSet("win7-x86", "win7-x64", "win-arm", "win-arm64")]
[ValidateScript({$Environment.IsWindows})]
[string] $WindowsRuntime,
@@ -102,7 +102,7 @@ function Start-PSPackage {
}
if ($Environment.IsWindows) {
# Runtime will be one of win81-x64, win81-x86, "win-arm" and "win-arm64" on Windows.
# Runtime will be one of win7-x64, win7-x86, "win-arm" and "win-arm64" on Windows.
# Build the name suffix for universal win-plat packages.
switch ($Runtime) {
"win-arm" { $NameSuffix = "win-arm32" }
@@ -3200,7 +3200,7 @@ function New-MSIPatch
# This example shows how to produce a Debug-x64 installer for development purposes.
cd $RootPathOfPowerShellRepo
Import-Module .\build.psm1; Import-Module .\tools\packaging\packaging.psm1
New-MSIPackage -Verbose -ProductSourcePath '.\src\powershell-win-core\bin\Debug\net7.0\win81-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
New-MSIPackage -Verbose -ProductSourcePath '.\src\powershell-win-core\bin\Debug\net7.0\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
#>
function New-MSIPackage
{
@@ -3591,7 +3591,7 @@ function Start-MsiBuild {
# This example shows how to produce a Debug-x64 installer for development purposes.
cd $RootPathOfPowerShellRepo
Import-Module .\build.psm1; Import-Module .\tools\packaging\packaging.psm1
New-MSIXPackage -Verbose -ProductSourcePath '.\src\powershell-win-core\bin\Debug\net7.0\win81-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
New-MSIXPackage -Verbose -ProductSourcePath '.\src\powershell-win-core\bin\Debug\net7.0\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
#>
function New-MSIXPackage
{
@@ -11,8 +11,8 @@ param (
[string] $destination = "$env:WORKSPACE",
[ValidateSet("win81-x64", "win81-x86", "win-arm", "win-arm64", "fxdependent", "fxdependent-win-desktop")]
[string] $Runtime = 'win81-x64',
[ValidateSet("win7-x64", "win7-x86", "win-arm", "win-arm64", "fxdependent", "fxdependent-win-desktop")]
[string] $Runtime = 'win7-x64',
[switch] $ForMinimalSize,
@@ -35,8 +35,8 @@ jobs:
switch ($runtime)
{
win81-x64 { $packageName = "TestPackage-win-x64.zip" }
win81-x86 { $packageName = "TestPackage-win-x86.zip" }
win7-x64 { $packageName = "TestPackage-win-x64.zip" }
win7-x86 { $packageName = "TestPackage-win-x86.zip" }
win-arm64 { $packageName = "TestPackage-win-arm64.zip" }
linux-x64 { $packageName = "TestPackage-linux-x64.zip" }
linux-arm { $packageName = "TestPackage-linux-arm.zip" }
@@ -49,8 +49,8 @@ jobs:
Write-Host "##vso[artifact.upload containerfolder=testArtifacts;artifactname=testArtifacts]$(System.ArtifactsDirectory)/$packageName"
}
BuildTestPackage -runtime win81-x64
BuildTestPackage -runtime win81-x86
BuildTestPackage -runtime win7-x64
BuildTestPackage -runtime win7-x86
BuildTestPackage -runtime win-arm64
BuildTestPackage -runtime linux-x64
BuildTestPackage -runtime linux-arm
@@ -50,8 +50,8 @@ jobs:
$runtime = switch ($env:Architecture)
{
"x64" { "win81-x64" }
"x86" { "win81-x86" }
"x64" { "win7-x64" }
"x86" { "win7-x86" }
"arm" { "win-arm"}
"arm64" { "win-arm64" }
"fxdependent" { "fxdependent" }
@@ -239,8 +239,8 @@ jobs:
- pwsh: |
$runtime = switch ($env:Architecture)
{
"x64" { "win81-x64" }
"x86" { "win81-x86" }
"x64" { "win7-x64" }
"x86" { "win7-x86" }
"arm" { "win-arm"}
"arm64" { "win-arm64" }
"fxdependent" { "fxdependent" }