Last active
November 8, 2016 14:52
-
-
Save till/7266839 to your computer and use it in GitHub Desktop.
Since we're upgrading from PHP 5.3 to PHP 5.5 soon, here's an example how to run two builds against PHP 5.3 and PHP 5.5 (with ext/apcu) on Travis-CI! This has been tested on Travis-CI Pro — but should work on Org as well.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: php | |
php: | |
- 5.3 | |
- 5.5 | |
before_script: | |
- ./bin/install-apcu.sh | |
- phpenv config-add tests/$TRAVIS_PHP_VERSION.ini | |
- phpenv config-add tests/apc.ini | |
- composer install | |
script: | |
- cd tests/ && phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; this is in `tests/` | |
extension="apc.so" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; this is in `tests/` | |
extension="apcu.so" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; your general apc settings go here | |
apc.cli_enabled=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this script is in a `bin/` folder | |
if [ "$TRAVIS_PHP_VERSION" == "5.3" ] | |
then | |
exit 0 | |
fi | |
# this is helpful to compile extension | |
sudo apt-get install autoconf | |
# install this version | |
APCU=4.0.2 | |
# compile manually, because `pecl install apcu-beta` keep asking questions | |
wget http://pecl.php.net/get/apcu-$APCU.tgz | |
tar zxvf apcu-$APCU.tgz | |
cd "apcu-${APCU}" | |
phpize && ./configure && make install && echo "Installed ext/apcu-${APCU}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@HJRE