← Back
Editing: job.yml
parameters: configurationName: '' phpVersion: '' # A reference for testing PECL extensions using azure can be seen at https://github.com/microsoft/msphpsql/blob/master/azure-pipelines.yml # (that extension also runs unit tests on Windows/Macs) jobs: - job: ${{ parameters.configurationName }} # NOTE: This currently does not use containers. Doing so may be useful for testing on php zts/32-bit. # Containers need to provide sudo apt-get in order to work, the php:x-cli images don't. # Containers are slower to start up than the default vm images pool: vmImage: ${{ parameters.vmImage }} steps: # E.g. ondrej/php sometimes updates the latest version - script: | sudo apt-get install -y valgrind displayName: 'Install valgrind' - script: | VER=${{ parameters.phpVersion }} # Refresh the cache for the PPA repository, it can be out of date if it's updated recently if [[ ! -f /usr/bin/phpize$VER ]]; then sudo add-apt-repository -u ppa:ondrej/php fi # Silently try to install the php version if it's available. sudo apt-get install -y php$VER-dev sudo update-alternatives --set php /usr/bin/php$VER # Fail the build early if the php version isn't installed on this image sudo update-alternatives --set phpize /usr/bin/phpize$VER || exit 1 sudo update-alternatives --set pecl /usr/bin/pecl$VER sudo update-alternatives --set phar /usr/bin/phar$VER sudo update-alternatives --set phpdbg /usr/bin/phpdbg$VER sudo update-alternatives --set php-cgi /usr/bin/php-cgi$VER sudo update-alternatives --set phar.phar /usr/bin/phar.phar$VER sudo update-alternatives --set php-config /usr/bin/php-config$VER php -version displayName: Use PHP version ${{ parameters.phpVersion }} - script: | phpize # Replace run-tests.php with a patched version (from php 7.4's) that supports parallel builds. cp ci/run-tests-parallel.php run-tests.php ./configure --enable-igbinary make displayName: 'Build igbinary' - script: | REPORT_EXIT_STATUS=1 NO_INTERACTION=1 TEST_PHP_ARGS="--show-diff -j$(nproc)" make test # For most travis builds, re-run `make test` with valgrind. if [ "x$SKIP_VALGRIND" = "x" ]; then export TEST_PHP_ARGS="-m --show-diff -j2"; REPORT_EXIT_STATUS=1 NO_INTERACTION=1 make test; fi # Print a summary of any memory leaks shopt -s nullglob; head -n 999 tests/*.mem < /dev/null displayName: 'Test igbinary'
Save File
Cancel