@@ -40,112 +40,7 @@ concurrency:
40
40
cancel-in-progress : true
41
41
env :
42
42
CC : ccache gcc
43
- CXX : ccache g++
44
- jobs :
45
- LINUX_X64 :
46
- if : github.repository_owner == 'php' || github.event_name == 'pull_request'
47
- services :
48
- mysql :
49
- image : mysql:8
50
- ports :
51
- - 3306:3306
52
- env :
53
- MYSQL_DATABASE : test
54
- MYSQL_ROOT_PASSWORD : root
55
- postgres :
56
- image : postgres
57
- ports :
58
- - 5432:5432
59
- env :
60
- POSTGRES_USER : postgres
61
- POSTGRES_PASSWORD : postgres
62
- POSTGRES_DB : test
63
- firebird :
64
- image : jacobalberty/firebird
65
- ports :
66
- - 3050:3050
67
- env :
68
- ISC_PASSWORD : test
69
- FIREBIRD_DATABASE : test.fdb
70
- FIREBIRD_USER : test
71
- FIREBIRD_PASSWORD : test
72
- strategy :
73
- fail-fast : false
74
- matrix :
75
- include :
76
- - debug : false
77
- zts : false
78
- asan : false
79
- - debug : true
80
- zts : true
81
- asan : true
82
- name : " LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}"
83
- runs-on : ubuntu-22.04
84
- steps :
85
- - name : git checkout
86
- uses : actions/checkout@v4
87
- - name : apt
88
- uses : ./.github/actions/apt-x64
89
- - name : LLVM 16 (ASAN-only)
90
- if : ${{ matrix.asan }}
91
- run : |
92
- wget https://apt.llvm.org/llvm.sh
93
- chmod u+x llvm.sh
94
- sudo ./llvm.sh 16
95
- - name : System info
96
- run : |
97
- echo "::group::Show host CPU info"
98
- lscpu
99
- echo "::endgroup::"
100
- echo "::group::Show installed package versions"
101
- dpkg -l
102
- echo "::endgroup::"
103
- - name : Create MSSQL container
104
- if : ${{ !matrix.asan }}
105
- uses : ./.github/actions/setup-mssql
106
- - name : Setup Caddy server
107
- uses : ./.github/actions/setup-caddy
108
- - name : ccache
109
- uses : hendrikmuhs/ccache-action@v1.2
110
- with :
111
- # This duplicates the "job.name" expression above because
112
- # GitHub has no way to query the job name (github.job is the
113
- # job id, not the job name)
114
- key : " LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}-${{hashFiles('main/php_version.h')}}"
115
- append-timestamp : false
116
- - name : ./configure
117
- uses : ./.github/actions/configure-x64
118
- with :
119
- configurationParameters : >-
120
- --${{ matrix.debug && 'enable' || 'disable' }}-debug
121
- --${{ matrix.zts && 'enable' || 'disable' }}-zts
122
- ${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -fno-sanitize=pointer-overflow -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address -fno-sanitize=pointer-overflow" CC=clang-16 CXX=clang++-16' || '' }}
123
- skipSlow : ${{ matrix.asan }}
124
- - name : make
125
- run : make -j$(/usr/bin/nproc) >/dev/null
126
- - name : make install
127
- uses : ./.github/actions/install-linux
128
- - name : Setup
129
- if : ${{ !matrix.asan }}
130
- uses : ./.github/actions/setup-x64
131
- - name : Test
132
- if : matrix.asan == false
133
- uses : ./.github/actions/test-linux
134
- with :
135
- testArtifacts : ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
136
- - name : Test Tracing JIT
137
- uses : ./.github/actions/test-linux
138
- with :
139
- testArtifacts : ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}_Tracing JIT
140
- jitType : tracing
141
- runTestsParameters : >-
142
- -d zend_extension=opcache.so
143
- -d opcache.enable_cli=1
144
- ${{ matrix.asan && '--asan -x' || '' }}
145
- - name : Verify generated files are up to date
146
- if : ${{ !matrix.asan }}
147
- uses : ./.github/actions/verify-generated-files
148
- MACOS_DEBUG_NTS :
43
+ MACOS_DEBUG_ZTS :
149
44
if : github.repository_owner == 'php' || github.event_name == 'pull_request'
150
45
strategy :
151
46
fail-fast : false
155
50
arch : X64
156
51
- os : 14
157
52
arch : ARM64
158
- name : MACOS_${{ matrix.arch }}_DEBUG_NTS
53
+ name : MACOS_${{ matrix.arch }}_DEBUG_ZTS
159
54
runs-on : macos-${{ matrix.os }}
160
55
steps :
161
56
- name : git checkout
170
65
- name : ./configure
171
66
uses : ./.github/actions/configure-macos
172
67
with :
173
- configurationParameters : --enable-debug --disable -zts
68
+ configurationParameters : --enable-debug --enable -zts
174
69
- name : make
175
70
run : |-
176
71
export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
@@ -187,130 +82,3 @@ jobs:
187
82
-d opcache.enable_cli=1
188
83
- name : Verify generated files are up to date
189
84
uses : ./.github/actions/verify-generated-files
190
- WINDOWS :
191
- if : github.repository_owner == 'php' || github.event_name == 'pull_request'
192
- name : WINDOWS_X64_ZTS
193
- runs-on : windows-2019
194
- env :
195
- PHP_BUILD_CACHE_BASE_DIR : C:\build-cache
196
- PHP_BUILD_OBJ_DIR : C:\obj
197
- PHP_BUILD_CACHE_SDK_DIR : C:\build-cache\sdk
198
- PHP_BUILD_SDK_BRANCH : php_downloads_server_migration_v1
199
- PHP_BUILD_CRT : vs16
200
- PLATFORM : x64
201
- THREAD_SAFE : " 1"
202
- INTRINSICS : AVX2
203
- PARALLEL : -j2
204
- OPCACHE : " 1"
205
- steps :
206
- - name : git config
207
- run : git config --global core.autocrlf false && git config --global core.eol lf
208
- - name : git checkout
209
- uses : actions/checkout@v4
210
- - name : Setup
211
- uses : ./.github/actions/setup-windows
212
- - name : Build
213
- run : .github/scripts/windows/build.bat
214
- - name : Test
215
- run : .github/scripts/windows/test.bat
216
- BENCHMARKING :
217
- name : BENCHMARKING
218
- if : github.repository_owner == 'php' || github.event_name == 'pull_request'
219
- runs-on : ubuntu-22.04
220
- steps :
221
- - name : git checkout
222
- uses : actions/checkout@v4
223
- with :
224
- fetch-depth : 0
225
- - name : apt
226
- run : |
227
- set -x
228
- sudo apt-get update
229
- sudo apt-get install \
230
- bison \
231
- libgmp-dev \
232
- libonig-dev \
233
- libsqlite3-dev \
234
- openssl \
235
- re2c \
236
- valgrind
237
- - name : ccache
238
- uses : hendrikmuhs/ccache-action@v1.2
239
- with :
240
- key : " ${{github.job}}-${{hashFiles('main/php_version.h')}}"
241
- append-timestamp : false
242
- - name : ./configure
243
- run : |
244
- set -x
245
- ./buildconf --force
246
- ./configure \
247
- --disable-debug \
248
- --enable-mbstring \
249
- --enable-opcache \
250
- --enable-option-checking=fatal \
251
- --enable-sockets \
252
- --enable-werror \
253
- --prefix=/usr \
254
- --with-config-file-scan-dir=/etc/php.d \
255
- --with-gmp \
256
- --with-mysqli=mysqlnd \
257
- --with-openssl \
258
- --with-pdo-sqlite \
259
- --with-valgrind
260
- - name : make
261
- run : make -j$(/usr/bin/nproc) >/dev/null
262
- - name : make install
263
- run : |
264
- set -x
265
- sudo make install
266
- sudo mkdir -p /etc/php.d
267
- sudo chmod 777 /etc/php.d
268
- echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
269
- echo zend_extension=opcache.so >> /etc/php.d/opcache.ini
270
- echo opcache.enable=1 >> /etc/php.d/opcache.ini
271
- echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
272
- - name : Setup
273
- run : |
274
- git config --global user.name "Benchmark"
275
- git config --global user.email "benchmark@php.net"
276
- sudo service mysql start
277
- mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS wordpress"
278
- mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;"
279
- mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;"
280
- - name : git checkout benchmarking-data
281
- uses : actions/checkout@v4
282
- with :
283
- repository : php/benchmarking-data
284
- ssh-key : ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }}
285
- path : benchmark/repos/data
286
- - name : Benchmark
287
- run : php benchmark/benchmark.php true
288
- - name : Store result
289
- if : github.event_name == 'push'
290
- run : |
291
- set -x
292
- cd benchmark/repos/data
293
- git pull --autostash
294
- if [ -e ".git/MERGE_HEAD" ]; then
295
- echo "Merging, can't proceed"
296
- exit 1
297
- fi
298
- git add .
299
- if git diff --cached --quiet; then
300
- exit 0
301
- fi
302
- git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}"
303
- git push
304
- - name : Show diff
305
- if : github.event_name == 'pull_request'
306
- run : |-
307
- set -x
308
- php benchmark/generate_diff.php \
309
- ${{ github.sha }} \
310
- $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
311
- > $GITHUB_STEP_SUMMARY
312
- - uses : actions/upload-artifact@v4
313
- with :
314
- name : profiles
315
- path : ${{ github.workspace }}/benchmark/profiles
316
- retention-days : 30
0 commit comments