Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,18 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
$jobs['SOLARIS'] = true;
}
if ($all_jobs || !$no_jobs || $test_windows) {
$jobs['WINDOWS']['matrix'] = $all_variations
? ['include' => [
$windows_include = $all_variations
? [
['asan' => true, 'opcache' => true, 'x64' => true, 'zts' => true],
['asan' => false, 'opcache' => false, 'x64' => false, 'zts' => false],
]]
: ['include' => [['asan' => false, 'opcache' => true, 'x64' => true, 'zts' => true]]];
]
: [
['asan' => false, 'opcache' => true, 'x64' => true, 'zts' => true],
];
if ($all_variations || $test_windows) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To stay consistent with the other jobs, this should be enabled only with $all_variations but not with $test_windows.

Copy link
Copy Markdown
Contributor Author

@henderkes henderkes Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like there to be a simple path to testing windows+clang. Generally every change affecting Windows should work on both MSVC and Clang. Would you be open to a different label instead?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the intention of the label? To run the Window+Clang build only without running the other Windows builds?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about it again, a new label doesn't make sense. I just believe Clang should always be tested and eventually become the default. It's just producing so much faster binaries.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Please make the changes as suggested for now. We can reconsider enabling it by-default if they become the default. I doubt Clang builds on Windows are in wide use atm. If you push with the suggested changes, the job should run.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I see that you already made this change. I'll see how we should proceed.

Copy link
Copy Markdown
Contributor Author

@henderkes henderkes Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already done as suggested

if the windows team doesn't want to switch to clang for 8.6 yet, we might ship clang builds with FrankenPHP as an alternative build. If it were 10% performance there'd be no reason, but +60-90% faster is just hard to ignore. No enhancement we could ever do to FrankenPHP itself could offer that much extra performance

$windows_include[] = ['asan' => false, 'opcache' => true, 'x64' => true, 'zts' => true, 'clang' => true];
}
$jobs['WINDOWS']['matrix'] = ['include' => $windows_include];
$jobs['WINDOWS']['config'] = version_compare($php_version, '8.4', '>=')
? ['vs_crt_version' => 'vs17']
: ['vs_crt_version' => 'vs16'];
Expand Down
4 changes: 4 additions & 0 deletions .github/scripts/windows/build_task.bat
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ if %errorlevel% neq 0 exit /b 3

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

rem Some undefined behavior is reported on 32-bit, this should be fixed
if "%PLATFORM%" == "x86" (
set CFLAGS=/W1
) else if "%CLANG_TOOLSET%" equ "1" (
rem Clang is much stricter than MSVC, produces too many warnings that would fail the build with /WX
set CFLAGS=/W1
) else (
set CFLAGS=/W1 /WX
)
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ jobs:
strategy:
fail-fast: false
matrix: ${{ fromJson(inputs.branch).jobs.WINDOWS.matrix }}
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}"
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}${{ matrix.clang && '_CLANG' || ''}}"
runs-on: windows-2022
env:
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
Expand All @@ -949,6 +949,7 @@ jobs:
PARALLEL: -j2
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
ASAN: "${{ matrix.asan && '1' || '0' }}"
CLANG_TOOLSET: "${{ matrix.clang && '1' || '0' }}"
steps:
- name: git config
run: git config --global core.autocrlf false && git config --global core.eol lf
Expand Down
Loading