Skip to content

Commit 5d83cbe

Browse files
committed
add clang-cl to windows nightly CI
1 parent 486c09c commit 5d83cbe

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.github/matrix.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
148148
? ['include' => [
149149
['asan' => true, 'opcache' => true, 'x64' => true, 'zts' => true],
150150
['asan' => false, 'opcache' => false, 'x64' => false, 'zts' => false],
151+
['asan' => false, 'opcache' => true, 'x64' => true, 'zts' => true, 'clang' => true],
151152
]]
152153
: ['include' => [['asan' => false, 'opcache' => true, 'x64' => true, 'zts' => true]]];
153154
$jobs['WINDOWS']['config'] = version_compare($php_version, '8.4', '>=')

.github/scripts/windows/build_task.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@ if %errorlevel% neq 0 exit /b 3
3030

3131
if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts
3232
if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS%
33+
if "%CLANG_TOOLSET%" equ "1" set ADD_CONF=%ADD_CONF% --with-toolset=clang
3334

3435
rem Some undefined behavior is reported on 32-bit, this should be fixed
3536
if "%PLATFORM%" == "x86" (
3637
set CFLAGS=/W1
38+
) else if "%CLANG_TOOLSET%" equ "1" (
39+
rem Clang is much stricter than MSVC, produces too many warnings that would fail the build with /WX
40+
set CFLAGS=/W1
3741
) else (
3842
set CFLAGS=/W1 /WX
3943
)

.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)