Skip to content

Commit b655451

Browse files
committed
Backport community build to PHP-8.0 branch
It doesn't make sense to keep it on azure because it will be run for the PHP-8.0 branch on nightly anyway, as the workflow is triggered on the master branch which will then invoke it for each branch.
1 parent a9c66f0 commit b655451

File tree

4 files changed

+100
-187
lines changed

4 files changed

+100
-187
lines changed

.github/workflows/nightly.yml

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

azure/apt.yml

-47
This file was deleted.

azure/community_job.yml

-73
This file was deleted.

azure/configure.yml

-67
This file was deleted.

0 commit comments

Comments
 (0)