build.sh 778 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. cd $(dirname $0)/../../..
  3. # prepare php environments
  4. sudo apt-get update && sudo apt-get install -y --force-yes php5
  5. sudo ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
  6. mkdir php_temp
  7. cd php_temp
  8. curl -sS https://getcomposer.org/installer | php
  9. sudo mv composer.phar /usr/local/bin/composer
  10. git clone https://github.com/php/php-src
  11. cd php-src && git checkout PHP-7.2.13 && ./buildconf --force
  12. ./configure \
  13. --enable-bcmatch \
  14. --with-gmp --with-openssl \
  15. --with-zlib \
  16. --prefix=/usr/local/php-7.2 && \
  17. make -j8 && sudo make install && make clean
  18. wget -O phpunit https://phar.phpunit.de/phpunit-7.phar && \
  19. chmod +x phpunit && \
  20. sudo cp phpunit /usr/local/php-7.2/bin
  21. sudo apt-get install -y --force-yes valgrind
  22. cd ../..
  23. ./tests.sh benchmark