Skip to content

Commit 8158a3d

Browse files
committed
rebase on php#21630
1 parent 26bd0c4 commit 8158a3d

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

.github/matrix.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,14 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
144144
$jobs['SOLARIS'] = true;
145145
}
146146
if ($all_jobs || !$no_jobs || $test_windows) {
147-
$jobs['WINDOWS']['matrix'] = $all_variations
148-
? ['include' => [
149-
['asan' => true, 'opcache' => true, 'x64' => true, 'zts' => true],
150-
['asan' => false, 'opcache' => false, 'x64' => false, 'zts' => false],
151-
]]
152-
: ['include' => [['asan' => false, 'opcache' => true, 'x64' => true, 'zts' => true]]];
147+
$matrix = [['asan' => true, 'opcache' => true, 'x64' => true, 'zts' => true]];
148+
if ($all_variations) {
149+
$matrix[] = ['asan' => false, 'opcache' => false, 'x64' => false, 'zts' => false];
150+
if (version_compare($php_version, '8.5', '>=')) {
151+
$matrix[] = ['asan' => false, 'opcache' => true, 'x64' => true, 'zts' => true, 'clang' => true];
152+
}
153+
}
154+
$jobs['WINDOWS']['matrix'] = ['include' => $matrix];
153155
$jobs['WINDOWS']['config'] = version_compare($php_version, '8.4', '>=')
154156
? ['vs_crt_version' => 'vs17']
155157
: ['vs_crt_version' => 'vs16'];

.github/scripts/windows/build_task.bat

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@ if %errorlevel% neq 0 exit /b 3
2626
if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts
2727
if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS%
2828
if "%ASAN%" equ "1" set ADD_CONF=%ADD_CONF% --enable-sanitizer --enable-debug-pack
29+
if "%CLANG_TOOLSET%" equ "1" set ADD_CONF=%ADD_CONF% --with-toolset=clang
2930

3031
rem C4018: comparison: signed/unsigned mismatch
3132
rem C4146: unary minus operator applied to unsigned type
3233
rem C4244: type conversion, possible loss of data
3334
rem C4267: 'size_t' type conversion, possible loss of data
34-
set CFLAGS=/W3 /WX /wd4018 /wd4146 /wd4244 /wd4267
35+
if "%CLANG_TOOLSET%" equ "1" (
36+
rem Clang is much stricter than MSVC, produces too many warnings that would fail the build with /WX
37+
set CFLAGS=/W3 /wd4018 /wd4146 /wd4244 /wd4267
38+
) else (
39+
set CFLAGS=/W3 /WX /wd4018 /wd4146 /wd4244 /wd4267
40+
)
3541

3642
cmd /c configure.bat ^
3743
--enable-snapshot-build ^

.github/workflows/test-suite.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ jobs:
935935
strategy:
936936
fail-fast: false
937937
matrix: ${{ fromJson(inputs.branch).jobs.WINDOWS.matrix }}
938-
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}"
938+
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}${{ matrix.clang && '_CLANG' || ''}}"
939939
runs-on: windows-2022
940940
env:
941941
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
@@ -949,6 +949,7 @@ jobs:
949949
PARALLEL: -j2
950950
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
951951
ASAN: "${{ matrix.asan && '1' || '0' }}"
952+
CLANG_TOOLSET: "${{ matrix.clang && '1' || '0' }}"
952953
steps:
953954
- name: git config
954955
run: git config --global core.autocrlf false && git config --global core.eol lf

0 commit comments

Comments
 (0)