Skip to content

Commit 85731e8

Browse files
committed
[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.
1 parent e5b4743 commit 85731e8

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.github/scripts/windows/build_task.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ 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 "%ASAN%" equ "1" set ADD_CONF=%ADD_CONF% --enable-sanitizer --enable-debug-pack
3334

3435
set CFLAGS=/W1 /WX /w14013
3536

.github/scripts/windows/test_task.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,11 @@ for %%i in (ldap) do (
133133

134134
set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe
135135

136+
if "%ASAN%" equ "1" set ASAN_OPTS=--asan
137+
136138
mkdir c:\tests_tmp
137139

138-
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%"
140+
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%"
139141

140142
set EXIT_CODE=%errorlevel%
141143

.github/workflows/nightly.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,10 +963,18 @@ jobs:
963963
- x64: true
964964
zts: true
965965
opcache: true
966+
asan: false
966967
- x64: false
967968
zts: false
968969
opcache: false
969-
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
970+
asan: false
971+
- x64: true
972+
zts: true
973+
opcache: true
974+
asan: true
975+
branch: 'master'
976+
timeout: 120
977+
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}"
970978
runs-on: windows-${{ inputs.windows_version }}
971979
env:
972980
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
@@ -979,6 +987,7 @@ jobs:
979987
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
980988
PARALLEL: -j2
981989
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
990+
ASAN: "${{ matrix.asan && '1' || '0' }}"
982991
steps:
983992
- name: git config
984993
run: git config --global core.autocrlf false && git config --global core.eol lf

0 commit comments

Comments
 (0)