From 0741494f302ea7982d3250d4b86338667a830749 Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Thu, 6 Jun 2019 17:37:04 +0200 Subject: azure macos Change-Id: I3465dcc865c254cea02feb619f6706fa0d164757 --- azure-pipelines.yml | 4 +++ azure/macos/brew.yml | 36 +++++++++++++++++++ azure/macos/job.yml | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++ azure/macos/test.yml | 27 ++++++++++++++ 4 files changed, 166 insertions(+) create mode 100644 azure/macos/brew.yml create mode 100644 azure/macos/job.yml create mode 100644 azure/macos/test.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d3eda47baf..5556fd4d2a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,3 +22,7 @@ jobs: parameters: configurationName: DEBUG_ZTS configurationParameters: '--enable-debug --enable-maintainer-zts' + - template: azure/macos/job.yml + parameters: + configurationName: MACOS_DEBUG_NTS + configurationParameters: '--enable-debug --disable-maintainer-zts' diff --git a/azure/macos/brew.yml b/azure/macos/brew.yml new file mode 100644 index 0000000000..211a3b57c1 --- /dev/null +++ b/azure/macos/brew.yml @@ -0,0 +1,36 @@ +parameters: + packages: '' + +steps: + - script: | + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + # see https://formulae.brew.sh/ for package names + brew install autoconf \ + automake \ + libtool \ + bison \ + mysql \ + postgresql \ + re2c \ + pkg-config \ + krb5 \ + bzip2 \ + enchant \ + libffi \ + libpng \ + webp \ + freetype \ + intltool \ + icu4c \ + readline \ + libiconv \ + zlib \ + t1lib \ + gd \ + libzip \ + gmp \ + tidyp \ + libxml2\ + openssl@1.1 + brew link icu4c gettext --force + displayName: 'brew' diff --git a/azure/macos/job.yml b/azure/macos/job.yml new file mode 100644 index 0000000000..35364b5623 --- /dev/null +++ b/azure/macos/job.yml @@ -0,0 +1,99 @@ +parameters: + configurationName: '' + configurationParameters: '' + +jobs: + - job: ${{ parameters.configurationName }} + pool: + vmImage: 'macOS-10.14' + steps: + - checkout: self + fetchDepth: 1 + - template: brew.yml + - script: | + export PATH="/usr/local/opt/bison/bin:$PATH" + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.1/lib/pkgconfig" + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/krb5/lib/pkgconfig" + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig" + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig" + ./buildconf --force + ./configure ${{ parameters.configurationParameters }} \ + --prefix=/usr/local \ + --enable-phpdbg \ + --enable-fpm \ + --with-pdo-mysql=mysqlnd \ + --with-mysqli=mysqlnd \ + --with-pgsql \ + --with-pdo-pgsql \ + --with-pdo-sqlite \ + --without-pear \ + --enable-gd \ + --with-jpeg \ + --with-webp \ + --with-freetype \ + --enable-exif \ + --with-zip \ + --with-zlib \ + --with-zlib-dir=/usr \ + --enable-soap \ + --enable-xmlreader \ + --with-xsl \ + --with-tidy=/usr/local/opt/tidyp \ + --with-xmlrpc \ + --with-libxml \ + --enable-sysvsem \ + --enable-sysvshm \ + --enable-shmop \ + --enable-pcntl \ + --with-readline=/usr/local/opt/readline \ + --enable-mbstring \ + --with-curl \ + --with-gettext==/usr/local/opt/gettext \ + --enable-sockets \ + --with-bz2=/usr/local/opt/bzip2 \ + --with-openssl \ + --with-gmp=/usr/local/opt/gmp \ + --with-iconv=/usr/local/opt/libiconv \ + --enable-bcmath \ + --enable-calendar \ + --enable-ftp \ + --with-pspell=/usr/local/opt/aspell \ + --with-kerberos \ + --enable-sysvmsg \ + --with-ffi \ + --enable-zend-test \ + --with-config-file-path=/etc \ + --with-config-file-scan-dir=/etc/php.d + displayName: 'Configure Build' + - script: | + export PATH="/usr/local/opt/bison/bin:$PATH" + make -j$(sysctl -n hw.ncpu) + displayName: 'Make Build' + - script: | + sudo make install + sudo mkdir /etc/php.d + sudo chmod 777 /etc/php.d + echo mysqli.default_socket=/tmp/mysql.sock > /etc/php.d/mysqli.ini + echo pdo_mysql.default_socket=/tmp/mysql.sock > /etc/php.d/pdo_mysql.ini + displayName: 'Install Build' + - script: | + brew services start postgresql + createdb `whoami` + createuser -s postgres + psql -U postgres -c "ALTER USER postgres PASSWORD 'postgres';" + psql -U postgres -c "CREATE DATABASE test;" + displayName: 'Setup' + - template: test.yml + parameters: + configurationName: ${{ parameters.configurationName }} + - template: test.yml + parameters: + configurationName: ${{ parameters.configurationName }} + runTestsName: 'OpCache' + runTestsParameters: -d zend_extension=opcache.so -d opcache.enable_cli=1 + - ${{ if ne(variables['Build.SourceBranch'], 'refs/heads/PHP-7.4') }}: + - template: test.yml + parameters: + configurationName: ${{ parameters.configurationName }} + runTestsName: 'JIT' + runTestsParameters: -d zend_extension=opcache.so -d opcache.enable_cli=1 -d opcache.jit_buffer_size=16M diff --git a/azure/macos/test.yml b/azure/macos/test.yml new file mode 100644 index 0000000000..edaa68fa6d --- /dev/null +++ b/azure/macos/test.yml @@ -0,0 +1,27 @@ +parameters: + runTestsName: '' + runTestsParameters: '' + +steps: + - script: | + export TEST_PHP_JUNIT=junit.xml + export REPORT_EXIT_STATUS=no + export SKIP_IO_CAPTURE_TESTS=1 + rm -rf junit.xml | true + /usr/local/bin/php run-tests.php -P -q \ + -j$(sysctl -n hw.ncpu) \ + -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \ + --offline \ + --show-slow 1000 \ + --set-timeout 120 \ + ${{ parameters.runTestsParameters }} + displayName: 'Test ${{ parameters.configurationName }} ${{ parameters.runTestsName }}' + condition: or(succeeded(), failed()) + - task: PublishTestResults@2 + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: junit.xml + testRunTitle: '${{ parameters.configurationName }} ${{ parameters.runTestsName }}' + failTaskOnFailedTests: false + displayName: 'Export ${{ parameters.configurationName }} ${{ parameters.runTestsName }} Results' + condition: or(succeeded(), failed()) -- cgit v1.2.1