summaryrefslogtreecommitdiff
path: root/azure/macos
diff options
context:
space:
mode:
authorJan Altensen <info@stricted.net>2019-06-06 17:37:04 +0200
committerJoe Watkins <krakjoe@php.net>2019-06-09 22:21:46 +0200
commit0741494f302ea7982d3250d4b86338667a830749 (patch)
tree0616e5da483054575024131d956b90eb6703a485 /azure/macos
parentd116343818ac4f786302a903ef6cd62f8eb5e973 (diff)
downloadphp-git-0741494f302ea7982d3250d4b86338667a830749.tar.gz
azure macos
Change-Id: I3465dcc865c254cea02feb619f6706fa0d164757
Diffstat (limited to 'azure/macos')
-rw-r--r--azure/macos/brew.yml36
-rw-r--r--azure/macos/job.yml99
-rw-r--r--azure/macos/test.yml27
3 files changed, 162 insertions, 0 deletions
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())