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