Created
May 1, 2017 20:36
-
-
Save DennisSnijder/2a0e4f2b6d85f501b22594f961895ae2 to your computer and use it in GitHub Desktop.
Cached PHP7 @ Travis
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
#Downloading the .pearrc, travis doesn't allow me to cache files... | |
curl -s -o $HOME/.pearrc https://gist.githubusercontent.com/DennisSnijder/66cc4de2da72e23482193c52c5fcf39e/raw/ab510552fd9515fdec74f97b39f3c825434eeb57/.pearrc | |
#Checking if the PHP7 binaries are already there. | |
if [ -d "$HOME/.phpenv/versions/7.0.17/include" ]; then | |
echo "PHP7 already installed, setting php env..." | |
phpenv global 7.0.17 | |
exit 0 | |
fi | |
#Downloading the PHP7 binaries. | |
echo "PHP7 is not installed, downloading...." | |
curl -s -o archive.tar.bz2 https://s3.amazonaws.com/travis-php-archives/binaries/ubuntu/12.04/x86_64/php-7.0.tar.bz2 && tar xjf archive.tar.bz2 --directory / | |
phpenv global 7.0.17 |
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 | |
# Use a preinstalled PHP version. | |
php: | |
- 5.4 | |
cache: | |
directories: | |
- $HOME/.phpenv/versions/7.0.17 | |
before_script: | |
- chmod +x ./php7.sh && ./php7.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment