|
| 1 | +parameters: |
| 2 | + configurationName: '' |
| 3 | + configurationParameters: '' |
| 4 | + |
| 5 | +jobs: |
| 6 | + - job: ${{ parameters.configurationName }} |
| 7 | + pool: |
| 8 | + vmImage: 'ubuntu-latest' |
| 9 | + steps: |
| 10 | + - checkout: self |
| 11 | + fetchDepth: 1 |
| 12 | + - template: apt.yml |
| 13 | + - script: | |
| 14 | + ./buildconf --force |
| 15 | + export CFLAGS=-m32 |
| 16 | + export CXXFLAGS=-m32 |
| 17 | + export LDFLAGS=-L/usr/lib/i386-linux-gnu |
| 18 | + export PKG_CONFIG=/usr/bin/i686-linux-gnu-pkg-config |
| 19 | + ./configure ${{ parameters.configurationParameters }} \ |
| 20 | + --prefix=/usr \ |
| 21 | + --enable-phpdbg \ |
| 22 | + --enable-fpm \ |
| 23 | + --enable-intl \ |
| 24 | + --with-pdo-mysql=mysqlnd \ |
| 25 | + --with-mysqli=mysqlnd \ |
| 26 | + --with-pgsql \ |
| 27 | + --with-pdo-pgsql \ |
| 28 | + --with-pdo-sqlite \ |
| 29 | + --without-pear \ |
| 30 | + --enable-gd \ |
| 31 | + --with-jpeg \ |
| 32 | + --with-webp \ |
| 33 | + --with-freetype \ |
| 34 | + --with-xpm \ |
| 35 | + --enable-exif \ |
| 36 | + --with-zip \ |
| 37 | + --with-zlib \ |
| 38 | + --with-zlib-dir=/usr \ |
| 39 | + --enable-soap \ |
| 40 | + --enable-xmlreader \ |
| 41 | + --with-xsl \ |
| 42 | + --with-tidy \ |
| 43 | + --with-xmlrpc \ |
| 44 | + --enable-sysvsem \ |
| 45 | + --enable-sysvshm \ |
| 46 | + --enable-shmop \ |
| 47 | + --enable-pcntl \ |
| 48 | + --with-readline \ |
| 49 | + --enable-mbstring \ |
| 50 | + --with-curl \ |
| 51 | + --with-gettext \ |
| 52 | + --enable-sockets \ |
| 53 | + --with-bz2 \ |
| 54 | + --with-openssl \ |
| 55 | + --with-gmp \ |
| 56 | + --enable-bcmath \ |
| 57 | + --enable-calendar \ |
| 58 | + --enable-ftp \ |
| 59 | + --with-pspell=/usr \ |
| 60 | + --with-enchant=/usr \ |
| 61 | + --with-kerberos \ |
| 62 | + --enable-sysvmsg \ |
| 63 | + --with-ffi \ |
| 64 | + --enable-zend-test \ |
| 65 | + --with-config-file-path=/etc \ |
| 66 | + --with-config-file-scan-dir=/etc/php.d |
| 67 | + displayName: 'Configure Build' |
| 68 | + - script: make -j$(/usr/bin/nproc) >/dev/null |
| 69 | + displayName: 'Make Build' |
| 70 | + - script: | |
| 71 | + sudo make install |
| 72 | + sudo mkdir /etc/php.d |
| 73 | + sudo chmod 777 /etc/php.d |
| 74 | + echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini |
| 75 | + echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini |
| 76 | + displayName: 'Install Build' |
| 77 | + - script: | |
| 78 | + mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test" |
| 79 | + sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" |
| 80 | + sudo -u postgres psql -c "CREATE DATABASE test;" |
| 81 | + displayName: 'Setup' |
| 82 | +# - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: this will be uncommented on merge, we don't want to docker pull request builds |
| 83 | + - task: Docker@2 |
| 84 | + inputs: |
| 85 | + containerRegistry: 'phpazuredevops' |
| 86 | + repository: ${{ variables['Build.SourceBranch'] }} |
| 87 | + command: 'buildAndPush' |
| 88 | + Dockerfile: '**/Dockerfile' |
| 89 | + tags: ${{ parameters.configurationName }} |
| 90 | + - template: test.yml |
| 91 | + parameters: |
| 92 | + configurationName: ${{ parameters.configurationName }} |
| 93 | + - template: test.yml |
| 94 | + parameters: |
| 95 | + configurationName: ${{ parameters.configurationName }} |
| 96 | + runTestsName: 'OpCache' |
| 97 | + runTestsParameters: -d zend_extension=opcache.so -d opcache.enable_cli=1 |
| 98 | + - ${{ if ne(variables['Build.SourceBranch'], 'refs/heads/PHP-7.4') }}: |
| 99 | + - template: test.yml |
| 100 | + parameters: |
| 101 | + configurationName: ${{ parameters.configurationName }} |
| 102 | + runTestsName: 'JIT' |
| 103 | + runTestsParameters: -d zend_extension=opcache.so -d opcache.enable_cli=1 -d opcache.jit_buffer_size=16M |
0 commit comments