@@ -200,3 +200,103 @@ jobs:
200
200
- name : Upload Test Coverage to Codecov.io
201
201
if : always()
202
202
run : bash <(curl -s https://codecov.io/bash)
203
+ COMMUNITY :
204
+ needs : GENERATE_MATRIX
205
+ if : ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
206
+ strategy :
207
+ fail-fast : false
208
+ matrix :
209
+ branch : ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
210
+ name : " ${{ matrix.branch.name }}_COMMUNITY"
211
+ runs-on : ubuntu-20.04
212
+ env :
213
+ UBSAN_OPTIONS : print_stacktrace=1
214
+ USE_ZEND_ALLOC : 0
215
+ USE_TRACKED_ALLOC : 1
216
+ steps :
217
+ - name : git checkout
218
+ uses : actions/checkout@v2
219
+ with :
220
+ ref : ${{ matrix.branch.ref }}
221
+ - name : apt
222
+ uses : ./.github/actions/apt-x64
223
+ - name : ./configure
224
+ uses : ./.github/actions/configure-x64
225
+ with :
226
+ configurationParameters : >-
227
+ --enable-debug
228
+ --enable-zts
229
+ --enable-address-sanitizer
230
+ --enable-undefined-sanitizer
231
+ CFLAGS='-DZEND_TRACK_ARENA_ALLOC -fno-sanitize-recover'
232
+ - name : make
233
+ run : make -j$(/usr/bin/nproc) >/dev/null
234
+ - name : make install
235
+ uses : ./.github/actions/install-linux
236
+ - name : Setup
237
+ run : |
238
+ sudo service mysql start
239
+ mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
240
+ mysql -uroot -proot -e "SET GLOBAL local_infile = true"
241
+ - name : Enable Opcache and JIT
242
+ run : |
243
+ echo zend_extension=opcache.so > /etc/php.d/opcache.ini
244
+ echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
245
+ echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
246
+ echo opcache.jit_buffer_size=1G >> /etc/php.d/opcache.ini
247
+ - name : Test Laravel
248
+ if : always()
249
+ run : |
250
+ git clone https://github.com/laravel/framework.git --branch=master --depth=1
251
+ cd framework
252
+ git rev-parse HEAD
253
+ php /usr/bin/composer install --no-progress --ignore-platform-reqs
254
+ # Hack to disable a test that hangs
255
+ php -r '$c = file_get_contents("tests/Filesystem/FilesystemTest.php"); $c = str_replace("*/\n public function testSharedGet()", "* @group skip\n */\n public function testSharedGet()", $c); file_put_contents("tests/Filesystem/FilesystemTest.php", $c);'
256
+ export ASAN_OPTIONS=exitcode=139
257
+ php vendor/bin/phpunit --exclude-group skip || EXIT_CODE=$?
258
+ if [ $EXIT_CODE -gt 128 ]; then
259
+ exit 1
260
+ fi
261
+ - name : Test Symfony
262
+ if : always()
263
+ run : |
264
+ git clone https://github.com/symfony/symfony.git --depth=1
265
+ cd symfony
266
+ git rev-parse HEAD
267
+ php /usr/bin/composer install --no-progress --ignore-platform-reqs
268
+ php ./phpunit install
269
+ # Test causes a heap-buffer-overflow but I cannot reproduce it locally...
270
+ php -r '$c = file_get_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php"); $c = str_replace("public function testSanitizeDeepNestedString()", "/** @group skip */\n public function testSanitizeDeepNestedString()", $c); file_put_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php", $c);'
271
+ # Buggy FFI test in Symfony, see https://github.com/symfony/symfony/issues/47668
272
+ php -r '$c = file_get_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php"); $c = str_replace("*/\n public function testCastNonTrailingCharPointer()", "* @group skip\n */\n public function testCastNonTrailingCharPointer()", $c); file_put_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php", $c);'
273
+ export ASAN_OPTIONS=exitcode=139
274
+ export SYMFONY_DEPRECATIONS_HELPER=max[total]=999
275
+ X=0
276
+ for component in $(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n'); do
277
+ php ./phpunit $component --exclude-group tty,benchmark,intl-data,transient --exclude-group skip || EXIT_CODE=$?
278
+ if [ $EXIT_CODE -gt 128 ]; then
279
+ X=1;
280
+ fi
281
+ done
282
+ exit $X
283
+ - name : Test PHPUnit
284
+ if : always()
285
+ run : |
286
+ git clone https://github.com/sebastianbergmann/phpunit.git --branch=main --depth=1
287
+ cd phpunit
288
+ git rev-parse HEAD
289
+ export ASAN_OPTIONS=exitcode=139
290
+ php /usr/bin/composer install --no-progress --ignore-platform-reqs
291
+ php ./phpunit || EXIT_CODE=$?
292
+ if [ $EXIT_CODE -gt 128 ]; then
293
+ exit 1
294
+ fi
295
+ - name : ' Symfony Preloading'
296
+ if : always()
297
+ run : |
298
+ php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs
299
+ cd symfony_demo
300
+ git rev-parse HEAD
301
+ sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php
302
+ php -d opcache.preload=var/cache/dev/App_KernelDevDebugContainer.preload.php public/index.php
0 commit comments