[skip ci] Add nightly job for x64 Windows with ASan enabled

It seems reasonable to have an ASan job on Windows, especially to be
able to check Windows specific code.  Since the tests may take about
70 minutes, it doesn't make sense to add these for pushes, but for a
nightly job that should be okay.

Closes GH-17087.
This commit is contained in:
Christoph M. Becker 2024-12-09 00:01:37 +01:00
parent e5b4743d38
commit 85731e8830
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
3 changed files with 14 additions and 2 deletions

View file

@ -30,6 +30,7 @@ if %errorlevel% neq 0 exit /b 3
if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts 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 "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS%
if "%ASAN%" equ "1" set ADD_CONF=%ADD_CONF% --enable-sanitizer --enable-debug-pack
set CFLAGS=/W1 /WX /w14013 set CFLAGS=/W1 /WX /w14013

View file

@ -133,9 +133,11 @@ for %%i in (ldap) do (
set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe
if "%ASAN%" equ "1" set ASAN_OPTS=--asan
mkdir c:\tests_tmp mkdir c:\tests_tmp
nmake test TESTS="%OPCACHE_OPTS% -g FAIL,BORK,LEAK,XLEAK --no-progress -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%" nmake test TESTS="%OPCACHE_OPTS% -g FAIL,BORK,LEAK,XLEAK %ASAN_OPTS% --no-progress -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%"
set EXIT_CODE=%errorlevel% set EXIT_CODE=%errorlevel%

View file

@ -963,10 +963,18 @@ jobs:
- x64: true - x64: true
zts: true zts: true
opcache: true opcache: true
asan: false
- x64: false - x64: false
zts: false zts: false
opcache: false opcache: false
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" asan: false
- x64: true
zts: true
opcache: true
asan: true
branch: 'master'
timeout: 120
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}"
runs-on: windows-${{ inputs.windows_version }} runs-on: windows-${{ inputs.windows_version }}
env: env:
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
@ -979,6 +987,7 @@ jobs:
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}" INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
PARALLEL: -j2 PARALLEL: -j2
OPCACHE: "${{ matrix.opcache && '1' || '0' }}" OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
ASAN: "${{ matrix.asan && '1' || '0' }}"
steps: steps:
- name: git config - name: git config
run: git config --global core.autocrlf false && git config --global core.eol lf run: git config --global core.autocrlf false && git config --global core.eol lf