Created
November 13, 2019 12:02
-
-
Save OliverBailey/16694c0b96a2cdea810cb0738df7f640 to your computer and use it in GitHub Desktop.
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 to recompile redis with igbinary, for use with travisci and phpunit. | |
before_install: | |
- printf "\n" | pecl install -f igbinary | |
# Install & Build Redis | |
- printf "\n" | pecl install -f --nobuild redis | |
- cd "$(pecl config-get temp_dir)/redis" | |
- phpize | |
- ./configure --enable-redis-igbinary | |
- make && make install | |
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini | |
- cd - | |
#Total travis.yml file is | |
language: php | |
php: | |
- 7.2 | |
dist: bionic | |
services: | |
- mysql | |
- redis-server | |
before_install: | |
#- phpenv config-rm xdebug.ini || true | |
- printf "\n" | pecl install -f igbinary | |
# Install & Build Redis | |
- printf "\n" | pecl install -f --nobuild redis | |
- cd "$(pecl config-get temp_dir)/redis" | |
- phpize | |
- ./configure --enable-redis-igbinary | |
- make && make install | |
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini | |
- cd - | |
install: | |
- composer self-update | |
- composer install --no-interaction | |
before_script: | |
- cp env.travis .env.test | |
- mysql -e 'CREATE DATABASE phpunit_test;' | |
- mysql -e "SET GLOBAL sql_mode = 'IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION ';" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was having an issue in getting redis-server running and compiled with igbinary, for use with phpunit. We require igbinary for some of the tests to be performed.
Unfortunately, it appears that travisci doesn't compile with igbinary when using the
So we had to do it ourself. I only found one other instance of someone using the above method, so felt worth me adding this here just in case anyone else is googling and trying to come across the same situation.
:)