Skip to content

Commit 679ec8b

Browse files
committed
attempt to test arm64 clang tailcall
1 parent 01d78ec commit 679ec8b

3 files changed

Lines changed: 23 additions & 6 deletions

File tree

.github/matrix.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
150150
$matrix[] = ['asan' => false, 'opcache' => false, 'x64' => false, 'zts' => false];
151151
if (version_compare($php_version, '8.5', '>=')) {
152152
$matrix[] = ['asan' => false, 'opcache' => true, 'x64' => true, 'zts' => true, 'clang' => true];
153+
$matrix[] = ['arm64' => true, 'asan' => false, 'opcache' => true, 'x64' => false, 'zts' => true, 'clang' => true];
153154
}
154155
}
155156
$jobs['WINDOWS']['matrix'] = ['include' => $matrix];

.github/scripts/windows/test_task.bat

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ if not exist "%DEPS_DIR%" (
1919
exit /b 3
2020
)
2121

22+
if "%PLATFORM%" == "arm64" goto skip_services
23+
2224
rem setup MySQL related exts
2325
set MYSQL_PWD=Password12!
2426
set MYSQL_TEST_PASSWD=%MYSQL_PWD%
@@ -123,6 +125,17 @@ cd %APPVEYOR_BUILD_FOLDER%
123125
rem prepare for com_dotnet
124126
nmake register_comtest
125127

128+
goto skip_services_end
129+
:skip_services
130+
131+
set PHP_BUILD_DIR=%PHP_BUILD_OBJ_DIR%\Release
132+
if "%THREAD_SAFE%" equ "1" set PHP_BUILD_DIR=%PHP_BUILD_DIR%_TS
133+
134+
rem prepare for OPcache
135+
if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=64M -d opcache.jit=tracing
136+
137+
:skip_services_end
138+
126139
mkdir %PHP_BUILD_DIR%\test_file_cache
127140
rem generate php.ini
128141
echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini
@@ -153,7 +166,9 @@ nmake test TESTS="%OPCACHE_OPTS% -g FAIL,BORK,LEAK,XLEAK %ASAN_OPTS% --no-progre
153166

154167
set EXIT_CODE=%errorlevel%
155168

156-
nmake unregister_comtest
157-
taskkill /f /im snmpd.exe
169+
if "%PLATFORM%" neq "arm64" (
170+
nmake unregister_comtest
171+
taskkill /f /im snmpd.exe
172+
)
158173

159174
exit /b %EXIT_CODE%

.github/workflows/test-suite.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -940,17 +940,17 @@ jobs:
940940
strategy:
941941
fail-fast: false
942942
matrix: ${{ fromJson(inputs.branch).jobs.WINDOWS.matrix }}
943-
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}${{ matrix.clang && '_CLANG' || ''}}"
944-
runs-on: windows-2022
943+
name: "WINDOWS_${{ matrix.arm64 && 'ARM64' || (matrix.x64 && 'X64' || 'X86') }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}${{ matrix.clang && '_CLANG' || ''}}"
944+
runs-on: ${{ matrix.arm64 && 'windows-11-arm' || 'windows-2022' }}
945945
env:
946946
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
947947
PHP_BUILD_OBJ_DIR: C:\obj
948948
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
949949
PHP_BUILD_SDK_BRANCH: php-sdk-2.5.0
950950
PHP_BUILD_CRT: ${{ fromJson(inputs.branch).jobs.WINDOWS.config.vs_crt_version }}
951-
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
951+
PLATFORM: ${{ matrix.arm64 && 'arm64' || (matrix.x64 && 'x64' || 'x86') }}
952952
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"
953-
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
953+
INTRINSICS: "${{ matrix.zts && !matrix.arm64 && 'AVX2' || '' }}"
954954
PARALLEL: -j2
955955
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
956956
ASAN: "${{ matrix.asan && '1' || '0' }}"
@@ -963,6 +963,7 @@ jobs:
963963
with:
964964
ref: ${{ fromJson(inputs.branch).ref }}
965965
- name: Setup
966+
if: ${{ !matrix.arm64 }}
966967
uses: ./.github/actions/setup-windows
967968
- name: Build
968969
run: .github/scripts/windows/build.bat

0 commit comments

Comments
 (0)