mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Switch to windows-2022 in CI (#18927)
* Switch to windows-2022 in CI windows-2019 runner will be dropped by GitHub on 2025-06-30. * xfail test cases that fail on windows-2022
This commit is contained in:
parent
391bd2a48f
commit
6233dc6210
8 changed files with 65 additions and 4 deletions
4
.github/scripts/windows/build.bat
vendored
4
.github/scripts/windows/build.bat
vendored
|
@ -43,7 +43,9 @@ if not exist "%SDK_RUNNER%" (
|
|||
exit /b 3
|
||||
)
|
||||
|
||||
cmd /c %SDK_RUNNER% -t .github\scripts\windows\build_task.bat
|
||||
for /f "delims=" %%T in ('call .github\scripts\windows\find-vs-toolset.bat %PHP_BUILD_CRT%') do set "VS_TOOLSET=%%T"
|
||||
echo Got VS Toolset %VS_TOOLSET%
|
||||
cmd /c %SDK_RUNNER% -s %VS_TOOLSET% -t .github\scripts\windows\build_task.bat
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
exit /b 0
|
||||
|
|
49
.github/scripts/windows/find-vs-toolset.bat
vendored
Normal file
49
.github/scripts/windows/find-vs-toolset.bat
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
@echo off
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
if "%~1"=="" (
|
||||
echo ERROR: Usage: %~nx0 [vc14^|vc15^|vs16^|vs17]
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set "toolsets_vc14=14.0"
|
||||
set "toolsets_vc15="
|
||||
set "toolsets_vs16="
|
||||
set "toolsets_vs17="
|
||||
|
||||
|
||||
for /f "usebackq tokens=*" %%I in (`vswhere.exe -latest -find "VC\Tools\MSVC"`) do set "MSVCDIR=%%I"
|
||||
|
||||
if not defined MSVCDIR (
|
||||
echo ERROR: could not locate VC\Tools\MSVC
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
for /f "delims=" %%D in ('dir /b /ad "%MSVCDIR%"') do (
|
||||
for /f "tokens=1,2 delims=." %%A in ("%%D") do (
|
||||
set "maj=%%A" & set "min=%%B"
|
||||
if "!maj!"=="14" (
|
||||
if !min! LEQ 9 (
|
||||
set "toolsets_vc14=%%D"
|
||||
) else if !min! LEQ 19 (
|
||||
set "toolsets_vc15=%%D"
|
||||
) else if !min! LEQ 29 (
|
||||
set "toolsets_vs16=%%D"
|
||||
) else (
|
||||
set "toolsets_vs17=%%D"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
set "KEY=%~1"
|
||||
set "VAR=toolsets_%KEY%"
|
||||
call set "RESULT=%%%VAR%%%"
|
||||
if defined RESULT (
|
||||
echo %RESULT%
|
||||
exit /b 0
|
||||
) else (
|
||||
echo ERROR: no toolset found for %KEY%
|
||||
exit /b 1
|
||||
)
|
3
.github/scripts/windows/test.bat
vendored
3
.github/scripts/windows/test.bat
vendored
|
@ -11,7 +11,8 @@ if not exist "%SDK_RUNNER%" (
|
|||
exit /b 3
|
||||
)
|
||||
|
||||
cmd /c %SDK_RUNNER% -t .github\scripts\windows\test_task.bat
|
||||
for /f "delims=" %%T in ('call .github\scripts\windows\find-vs-toolset.bat %PHP_BUILD_CRT%') do set "VS_TOOLSET=%%T"
|
||||
cmd /c %SDK_RUNNER% -s %VS_TOOLSET% -t .github\scripts\windows\test_task.bat
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
exit /b 0
|
||||
|
|
2
.github/workflows/push.yml
vendored
2
.github/workflows/push.yml
vendored
|
@ -147,7 +147,7 @@ jobs:
|
|||
WINDOWS:
|
||||
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
|
||||
name: WINDOWS_X64_ZTS
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-2022
|
||||
env:
|
||||
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: C:\obj
|
||||
|
|
2
.github/workflows/root.yml
vendored
2
.github/workflows/root.yml
vendored
|
@ -58,7 +58,7 @@ jobs:
|
|||
ubuntu_version: ${{
|
||||
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
|
||||
|| '22.04' }}
|
||||
windows_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9) && '2022' || '2019' }}
|
||||
windows_version: '2022'
|
||||
skip_laravel: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
|
||||
skip_symfony: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
|
||||
skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
|
||||
|
|
|
@ -4,6 +4,9 @@ Bug #70258 (Segfault if do_resize fails to allocated memory)
|
|||
memory_limit=2M
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_OS_FAMILY === 'Windows') {
|
||||
die("xfail fails on Windows Server 2022 and newer.");
|
||||
}
|
||||
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
|
||||
if ($zend_mm_enabled === "0") {
|
||||
die("skip Zend MM disabled");
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state (packed array)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_OS_FAMILY === 'Windows') {
|
||||
die("xfail fails on Windows Server 2022 and newer.");
|
||||
}
|
||||
if (getenv("USE_ZEND_ALLOC") === "0") die("skip ZMM is disabled");
|
||||
?>
|
||||
--INI--
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state (not packed array)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_OS_FAMILY === 'Windows') {
|
||||
die("xfail fails on Windows Server 2022 and newer.");
|
||||
}
|
||||
if (getenv("USE_ZEND_ALLOC") === "0") die("skip ZMM is disabled");
|
||||
?>
|
||||
--INI--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue