Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 6 additions & 62 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,66 +12,10 @@ trigger:
- UPGRADING.INTERNALS

jobs:
- template: azure/job.yml
- template: azure/community_job.yml
parameters:
configurationName: DEBUG_NTS
configurationParameters: '--enable-debug --disable-maintainer-zts'
- template: azure/job.yml
parameters:
configurationName: RELEASE_ZTS
configurationParameters: '--disable-debug --enable-maintainer-zts'
- template: azure/i386/job.yml
parameters:
configurationName: I386_DEBUG_ZTS
configurationParameters: '--enable-debug --enable-maintainer-zts'
- template: azure/macos/job.yml
parameters:
configurationName: MACOS_DEBUG_NTS
configurationParameters: '--enable-debug --disable-maintainer-zts'
- ${{ if eq(variables['Build.Reason'], 'Schedule') }}:
- template: azure/job.yml
parameters:
configurationName: DEBUG_ZTS
configurationParameters: '--enable-debug --enable-maintainer-zts'
- template: azure/job.yml
parameters:
configurationName: RELEASE_NTS
configurationParameters: '--disable-debug --disable-maintainer-zts'
- template: azure/i386/job.yml
parameters:
configurationName: I386_DEBUG_NTS
configurationParameters: '--enable-debug --disable-maintainer-zts'
- template: azure/i386/job.yml
parameters:
configurationName: I386_RELEASE_NTS
configurationParameters: '--disable-debug --disable-maintainer-zts'
- template: azure/i386/job.yml
parameters:
configurationName: I386_RELEASE_ZTS
configurationParameters: '--disable-debug --enable-maintainer-zts'
- template: azure/macos/job.yml
parameters:
configurationName: MACOS_DEBUG_ZTS
configurationParameters: '--enable-debug --enable-maintainer-zts'
- template: azure/macos/job.yml
parameters:
configurationName: MACOS_RELEASE_NTS
configurationParameters: '--disable-debug --disable-maintainer-zts'
- template: azure/macos/job.yml
parameters:
configurationName: MACOS_RELEASE_ZTS
configurationParameters: '--disable-debug --enable-maintainer-zts'
- template: azure/job.yml
parameters:
configurationName: DEBUG_ZTS_ASAN_UBSAN
configurationParameters: >-
--enable-debug --enable-maintainer-zts
CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC'
LDFLAGS='-fsanitize=undefined,address'
runTestsParameters: --asan
timeoutInMinutes: 120
- template: azure/msan_job.yml
parameters:
configurationName: DEBUG_ZTS_MSAN
configurationParameters: '--enable-debug --enable-maintainer-zts'
runTestsParameters: --asan
configurationName: COMMUNITY
configurationParameters: >-
--enable-debug --enable-maintainer-zts
CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC'
LDFLAGS='-fsanitize=undefined,address'
81 changes: 81 additions & 0 deletions azure/community_job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
parameters:
configurationName: ''
configurationParameters: ''
timeoutInMinutes: 60

# The purpose of the job is to test open-source community projects against an aggressive
# debug build, that enables assertions, as well as the address and UB sanitizers. However,
# we are only interested in finding assertion failures, segfaults and sanitizer violations,
# and don't care about the actual test results, as there will commonly be failures for
# pre-release versions of PHP.
#
# Because exit() in PHP results in an unclean shutdown, test runs are patching phpunit to
# avoid the exit, which allows us to also check for memory leaks. Otherwise we use
# USE_TRACKED_ALLOC=1 to avoid reporting of leaks that will be handled by ZMM.
jobs:
- job: ${{ parameters.configurationName }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
pool:
vmImage: 'ubuntu-latest'
steps:
- template: apt.yml
- script: |
# Compile a newer version of curl, otherwise there will be an asan warning
# when running symfony tests.
wget https://curl.haxx.se/download/curl-7.65.3.tar.gz
tar xzf curl-7.65.3.tar.gz
cd curl-7.65.3/
./configure
make -j2
sudo make install
displayName: 'Build Curl'
- template: configure.yml
parameters:
configurationParameters: ${{ parameters.configurationParameters }}
- script: make -j$(/usr/bin/nproc) >/dev/null
displayName: 'Make Build'
- script: |
sudo make install
sudo mkdir /etc/php.d
sudo chmod 777 /etc/php.d
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
# Run with opcache to also catch optimizer bugs.
echo zend_extension=opcache.so > /etc/php.d/opcache.ini
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
displayName: 'Install Build'
- script: |
git clone https://github.com/laravel/framework.git --branch=master --depth=1
cd framework
php7.3 /usr/bin/composer install --no-progress
export USE_ZEND_ALLOC=0
sed -i 's/$exit = true/$exit = false/g' vendor/phpunit/phpunit/src/TextUI/Command.php
# Avoid test using exit(), which thus leaks.
# We can use USE_TRACKED_ALLOC=1 if more of these show up.
sed -i "s/function_exists('pcntl_fork')/false/" tests/Filesystem/FilesystemTest.php
php vendor/bin/phpunit
displayName: 'Test Laravel'
- script: |
git clone https://github.com/symfony/symfony.git --branch=master --depth=1
cd symfony
php7.3 /usr/bin/composer install --no-progress
export USE_ZEND_ALLOC=0
export USE_TRACKED_ALLOC=1
export ASAN_OPTIONS=exitcode=139
# Close stdin because we hang on some kind of tty test otherwise.
php ./phpunit 0<&-
if [ $? -gt 128 ]; then
exit 1
fi
displayName: 'Test Symfony'
condition: or(succeeded(), failed())
- script: |
git clone https://github.com/amphp/amp.git --branch=master --depth=1
cd amp
php7.3 /usr/bin/composer install --no-progress --ignore-platform-reqs
export USE_ZEND_ALLOC=0
sed -i 's/$exit = true/$exit = false/g' vendor/phpunit/phpunit/src/TextUI/Command.php
php vendor/bin/phpunit
displayName: 'Test Amphp'
condition: or(succeeded(), failed())
60 changes: 60 additions & 0 deletions azure/configure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
parameters:
configurationParameters: ''

steps:
- script: |
./buildconf --force
./configure ${{ parameters.configurationParameters }} \
--enable-option-checking=fatal \
--prefix=/usr \
--enable-phpdbg \
--enable-fpm \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pgsql \
--with-pdo-pgsql \
--with-pdo-sqlite \
--enable-intl \
--without-pear \
--enable-gd \
--with-jpeg \
--with-webp \
--with-freetype \
--with-xpm \
--enable-exif \
--with-zip \
--with-zlib \
--with-zlib-dir=/usr \
--enable-soap \
--enable-xmlreader \
--with-xsl \
--with-tidy \
--with-xmlrpc \
--enable-sysvsem \
--enable-sysvshm \
--enable-shmop \
--enable-pcntl \
--with-readline \
--enable-mbstring \
--with-curl \
--with-gettext \
--enable-sockets \
--with-bz2 \
--with-openssl \
--with-gmp \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--with-pspell=/usr \
--with-enchant=/usr \
--with-kerberos \
--enable-sysvmsg \
--with-ffi \
--enable-zend-test \
--with-ldap \
--with-ldap-sasl \
--with-password-argon2 \
--enable-werror \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d
displayName: 'Configure Build'
59 changes: 3 additions & 56 deletions azure/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,62 +11,9 @@ jobs:
vmImage: 'ubuntu-latest'
steps:
- template: apt.yml
- script: |
./buildconf --force
./configure ${{ parameters.configurationParameters }} \
--enable-option-checking=fatal \
--prefix=/usr \
--enable-phpdbg \
--enable-fpm \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pgsql \
--with-pdo-pgsql \
--with-pdo-sqlite \
--enable-intl \
--without-pear \
--enable-gd \
--with-jpeg \
--with-webp \
--with-freetype \
--with-xpm \
--enable-exif \
--with-zip \
--with-zlib \
--with-zlib-dir=/usr \
--enable-soap \
--enable-xmlreader \
--with-xsl \
--with-tidy \
--with-xmlrpc \
--enable-sysvsem \
--enable-sysvshm \
--enable-shmop \
--enable-pcntl \
--with-readline \
--enable-mbstring \
--with-curl \
--with-gettext \
--enable-sockets \
--with-bz2 \
--with-openssl \
--with-gmp \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--with-pspell=/usr \
--with-enchant=/usr \
--with-kerberos \
--enable-sysvmsg \
--with-ffi \
--enable-zend-test \
--with-ldap \
--with-ldap-sasl \
--with-password-argon2 \
--enable-werror \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d
displayName: 'Configure Build'
- template: configure.yml
parameters:
configurationParameters: ${{ parameters.configurationParameters }}
- script: make -j$(/usr/bin/nproc) >/dev/null
displayName: 'Make Build'
- script: |
Expand Down