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