File tree Expand file tree Collapse file tree 5 files changed +56
-4
lines changed Expand file tree Collapse file tree 5 files changed +56
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,9 @@ if not exist "%SDK_RUNNER%" (
43
43
exit /b 3
44
44
)
45
45
46
- cmd /c %SDK_RUNNER% -t .github\scripts\windows\build_task.bat
46
+ for /f " delims=" %%T in ('call .github\scripts\windows\find-vs-toolset.bat %PHP_BUILD_CRT% ') do set " VS_TOOLSET = %%T "
47
+ echo Got VS Toolset %VS_TOOLSET%
48
+ cmd /c %SDK_RUNNER% -s %VS_TOOLSET% -t .github\scripts\windows\build_task.bat
47
49
if %errorlevel% neq 0 exit /b 3
48
50
49
51
exit /b 0
Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
3
+ setlocal enabledelayedexpansion
4
+
5
+ if " %~1 " == " " (
6
+ echo ERROR: Usage: %~nx0 [vc14^ |vc15^ |vs16^ |vs17]
7
+ exit /b 1
8
+ )
9
+
10
+ set " toolsets_vc14 = 14.0"
11
+ set " toolsets_vc15 = "
12
+ set " toolsets_vs16 = "
13
+ set " toolsets_vs17 = "
14
+
15
+
16
+ for /f " usebackq tokens=*" %%I in (`vswhere.exe -latest -find " VC\Tools\MSVC" `) do set " MSVCDIR = %%I "
17
+
18
+ if not defined MSVCDIR (
19
+ echo ERROR: could not locate VC\Tools\MSVC
20
+ exit /b 1
21
+ )
22
+
23
+ for /f " delims=" %%D in ('dir /b /ad " %MSVCDIR% " ') do (
24
+ for /f " tokens=1,2 delims=." %%A in (" %%D " ) do (
25
+ set " maj = %%A " & set " min = %%B "
26
+ if " !maj! " == " 14" (
27
+ if !min! LEQ 9 (
28
+ set " toolsets_vc14 = %%D "
29
+ ) else if !min! LEQ 19 (
30
+ set " toolsets_vc15 = %%D "
31
+ ) else if !min! LEQ 29 (
32
+ set " toolsets_vs16 = %%D "
33
+ ) else (
34
+ set " toolsets_vs17 = %%D "
35
+ )
36
+ )
37
+ )
38
+ )
39
+
40
+ set " KEY = %~1 "
41
+ set " VAR = toolsets_%KEY% "
42
+ call set " RESULT = %% %VAR% %% "
43
+ if defined RESULT (
44
+ echo %RESULT%
45
+ exit /b 0
46
+ ) else (
47
+ echo ERROR: no toolset found for %KEY%
48
+ exit /b 1
49
+ )
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ if not exist "%SDK_RUNNER%" (
11
11
exit /b 3
12
12
)
13
13
14
- cmd /c %SDK_RUNNER% -t .github\scripts\windows\test_task.bat
14
+ for /f " delims=" %%T in ('call .github\scripts\windows\find-vs-toolset.bat %PHP_BUILD_CRT% ') do set " VS_TOOLSET = %%T "
15
+ cmd /c %SDK_RUNNER% -s %VS_TOOLSET% -t .github\scripts\windows\test_task.bat
15
16
if %errorlevel% neq 0 exit /b 3
16
17
17
18
exit /b 0
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ jobs:
147
147
WINDOWS :
148
148
if : github.repository == 'php/php-src' || github.event_name == 'pull_request'
149
149
name : WINDOWS_X64_ZTS
150
- runs-on : windows-2019
150
+ runs-on : windows-2022
151
151
env :
152
152
PHP_BUILD_CACHE_BASE_DIR : C:\build-cache
153
153
PHP_BUILD_OBJ_DIR : C:\obj
Original file line number Diff line number Diff line change 58
58
ubuntu_version : ${{
59
59
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
60
60
|| '22.04' }}
61
- windows_version : ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9) && '2022' || '2019' }}
61
+ windows_version : ' 2022'
62
62
skip_laravel : ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
63
63
skip_symfony : ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
64
64
skip_wordpress : ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
You can’t perform that action at this time.
0 commit comments