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