I'd like to install the PHP extension OAuth
in my build environment on Travis.
I've tried these two configuration in .travis.yml
file:
COnfiguration 1 (using before_script
):
language: php
matrix:
include:
- php: 5.3
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: hhvm
cache:
directories:
- $HOME/.composer/cache
install:
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction
script:
- phpunit --verbose --coverage-clover build/logs/clover.xml
- phpenv config-rm xdebug.ini || return 0
before_script:
- pecl install oauth
Configuration 2 (using install
):
language: php
matrix:
include:
- php: 5.3
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: hhvm
cache:
directories:
- $HOME/.composer/cache
install:
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction
- pecl install oauth
script:
- phpunit --verbose --coverage-clover build/logs/clover.xml
- phpenv config-rm xdebug.ini || return 0
The documentation isn't clear about where to put the commands to install custom PHP extensions (or maybe I've not understood it, it's possible!).
Anyway, can someone help me configure Travis to install OAuth
PHP extension? Thankyou!
Per Problems with PHP YAML within Travis CI it looks like the pecl install
goes in the before_script
section.
Per my own testing here https://travis-ci.org/davidjeddy/no-code/jobs/345523220 it appears that does the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With