File tree Expand file tree Collapse file tree 12 files changed +148
-22
lines changed
extension/BuildPhpExtension/private Expand file tree Collapse file tree 12 files changed +148
-22
lines changed Original file line number Diff line number Diff line change 19
19
matrix :
20
20
arch : [x64, x86]
21
21
ts : [nts, ts]
22
- runs-on : ${{ (inputs.php-version > '8.4' || inputs.php-version=='master') && ' windows-2022' || 'windows-2019' }}
22
+ runs-on : windows-2022
23
23
steps :
24
24
- name : Checkout
25
25
uses : actions/checkout@v4
Original file line number Diff line number Diff line change @@ -42,7 +42,13 @@ function Add-Vs {
42
42
43
43
if ($vsInst ) {
44
44
[string ]$channel = $vsInst.installationVersion.Split (' .' )[0 ]
45
- if ($vsInst.catalog.productId -match ' (Enterprise|Professional|Community)$' ) {
45
+ $productId = $null
46
+ if ($vsInst.catalog -and $vsInst.catalog.PSObject.Properties [' productId' ]) {
47
+ $productId = $vsInst.catalog.productId
48
+ } elseif ($vsInst.PSObject.Properties [' productId' ]) {
49
+ $productId = $vsInst.productId
50
+ }
51
+ if ($productId -match ' (Enterprise|Professional|Community)$' ) {
46
52
$exe = " vs_$ ( $Matches [1 ].ToLower()) .exe"
47
53
} else {
48
54
$exe = ' vs_buildtools.exe'
@@ -58,7 +64,7 @@ function Add-Vs {
58
64
-- quiet -- wait -- norestart -- nocache `
59
65
@componentArgs 2>&1 | ForEach-Object { Write-Host $_ }
60
66
} else {
61
- $channel = $VsVersion -replace ' / D' , ' '
67
+ $channel = $VsVersion -replace ' \ D' , ' '
62
68
$exe = ' vs_buildtools.exe'
63
69
$installerUrl = " https://aka.ms/vs/$channel /release/$exe "
64
70
$installerPath = Join-Path $env: TEMP $exe
Original file line number Diff line number Diff line change 64
64
# Private functions
65
65
' Add-BuildRequirements' ,
66
66
' Add-TestRequirements' ,
67
+ ' Add-Vs' ,
67
68
' Get-OciSdk' ,
68
69
' Get-PhpBuild' ,
69
70
' Get-PhpSdk' ,
70
71
' Get-PhpSrc' ,
71
72
' Get-PhpTestPack' ,
72
73
' Get-TestSettings' ,
73
74
' Get-TestsList'
75
+ ' Get-VsVersionHelper' ,
74
76
' Get-VsVersion' ,
75
77
' Set-PhpIniForTests'
76
78
Original file line number Diff line number Diff line change
1
+ cscript /nologo configure.js " --enable-snapshot-build" " --enable-debug-pack" " --disable-zts" " --enable-object-out-dir=../obj/" " --enable-com-dotnet=shared" " --without-analyzer" " --enable-pgi" %*
Original file line number Diff line number Diff line change
1
+ cscript /nologo configure.js " --enable-snapshot-build" " --enable-debug-pack" " --enable-object-out-dir=../obj/" " --enable-com-dotnet=shared" " --without-analyzer" " --enable-pgi" %*
Original file line number Diff line number Diff line change
1
+ cscript /nologo configure.js " --enable-snapshot-build" " --enable-debug-pack" " --disable-zts" " --enable-object-out-dir=../obj/" " --enable-com-dotnet=shared" " --without-analyzer" " --enable-pgi" %*
Original file line number Diff line number Diff line change
1
+ cscript /nologo configure.js " --enable-snapshot-build" " --enable-debug-pack" " --enable-object-out-dir=../obj/" " --enable-com-dotnet=shared" " --without-analyzer" " --enable-pgi" %*
Original file line number Diff line number Diff line change 1
1
{
2
- "7.0" : " vc14" ,
3
- "7.1" : " vc14" ,
4
- "7.2" : " vc15" ,
5
- "7.3" : " vc15" ,
6
- "7.4" : " vc15" ,
7
- "8.0" : " vs16" ,
8
- "8.1" : " vs16" ,
9
- "8.2" : " vs16" ,
10
- "8.3" : " vs16" ,
11
- "8.4" : " vs17" ,
12
- "master" : " vs17"
2
+ "php" : {
3
+ "7.1" : " vc14" ,
4
+ "7.2" : " vc15" ,
5
+ "7.3" : " vc15" ,
6
+ "7.4" : " vc15" ,
7
+ "8.0" : " vs16" ,
8
+ "8.1" : " vs16" ,
9
+ "8.2" : " vs16" ,
10
+ "8.3" : " vs16" ,
11
+ "8.4" : " vs17" ,
12
+ "master" : " vs17"
13
+ },
14
+ "vs" : {
15
+ "vc14" : {
16
+ "major" : 14 ,
17
+ "minorMin" : 0 ,
18
+ "minorMax" : 9 ,
19
+ "components" : [
20
+ " Microsoft.VisualStudio.Component.CoreBuildTools" ,
21
+ " Microsoft.VisualStudio.Component.VC.140" ,
22
+ " Microsoft.VisualStudio.Component.VC.ATL" ,
23
+ " Microsoft.VisualStudio.Component.Windows10SDK.19041"
24
+ ]
25
+ },
26
+ "vc15" : {
27
+ "major" : 14 ,
28
+ "minorMin" : 10 ,
29
+ "minorMax" : 19 ,
30
+ "components" : [
31
+ " Microsoft.VisualStudio.Component.CoreBuildTools" ,
32
+ " Microsoft.VisualStudio.Component.VC.v141.x86.x64" ,
33
+ " Microsoft.VisualStudio.Component.VC.ATL" ,
34
+ " Microsoft.VisualStudio.Component.Windows10SDK.19041"
35
+ ]
36
+ },
37
+ "vs16" : {
38
+ "major" : 14 ,
39
+ "minorMin" : 20 ,
40
+ "minorMax" : 29 ,
41
+ "components" : [
42
+ " Microsoft.VisualStudio.Component.CoreBuildTools" ,
43
+ " Microsoft.VisualStudio.ComponentGroup.VC.Tools.142.x86.x64" ,
44
+ " Microsoft.VisualStudio.Component.VC.ATL" ,
45
+ " Microsoft.VisualStudio.Component.Windows10SDK.19041"
46
+ ]
47
+ },
48
+ "vs17" : {
49
+ "major" : 14 ,
50
+ "minorMin" : 30 ,
51
+ "minorMax" : null ,
52
+ "components" : [
53
+ " Microsoft.VisualStudio.Component.CoreBuildTools" ,
54
+ " Microsoft.VisualStudio.Component.VC.Tools.x86.x64" ,
55
+ " Microsoft.VisualStudio.Component.VC.ATL" ,
56
+ " Microsoft.VisualStudio.Component.Windows10SDK.19041"
57
+ ]
58
+ }
59
+ }
13
60
}
Original file line number Diff line number Diff line change @@ -38,7 +38,13 @@ function Add-Vs {
38
38
39
39
if ($vsInst ) {
40
40
[string ]$channel = $vsInst.installationVersion.Split (' .' )[0 ]
41
- if ($vsInst.catalog.productId -match ' (Enterprise|Professional|Community)$' ) {
41
+ $productId = $null
42
+ if ($vsInst.catalog -and $vsInst.catalog.PSObject.Properties [' productId' ]) {
43
+ $productId = $vsInst.catalog.productId
44
+ } elseif ($vsInst.PSObject.Properties [' productId' ]) {
45
+ $productId = $vsInst.productId
46
+ }
47
+ if ($productId -match ' (Enterprise|Professional|Community)$' ) {
42
48
$exe = " vs_$ ( $Matches [1 ].ToLower()) .exe"
43
49
} else {
44
50
$exe = ' vs_buildtools.exe'
Original file line number Diff line number Diff line change @@ -17,9 +17,20 @@ function Get-VsVersion {
17
17
}
18
18
process {
19
19
$jsonContent = Get-Content - Path $jsonPath - Raw
20
- $versions = ConvertFrom-Json - InputObject $jsonContent
21
- if ($PhpVersion -eq ' master' ) { $key = ' master' ; } else { $key = $PhpVersion.Substring (0 , 3 ); }
22
- return $ ($versions .$key )
20
+ $VsConfig = ConvertFrom-Json - InputObject $jsonContent
21
+ if ($PhpVersion -eq ' master' ) { $majorMinor = ' master' ; } else { $majorMinor = $PhpVersion.Substring (0 , 3 ); }
22
+ $VsVersion = $ ($VsConfig.php .$majorMinor )
23
+ $selectedToolset = $null
24
+ try {
25
+ $selectedToolset = Get-VsVersionHelper - VsVersion $VsVersion - VsConfig $VsConfig
26
+ } catch {
27
+ Add-Vs - VsVersion $VsVersion - VsConfig $VsConfig
28
+ $selectedToolset = Get-VsVersionHelper - VsVersion $VsVersion - VsConfig $VsConfig
29
+ }
30
+ return [PSCustomObject ]@ {
31
+ vs = $VsVersion
32
+ toolset = $selectedToolset
33
+ }
23
34
}
24
35
end {
25
36
}
You can’t perform that action at this time.
0 commit comments