diff --git a/.travis.yml b/.travis.yml index 45eb1e6f5..000a77150 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,10 @@ cache: directories: - $HOME/.composer/cache/files +env: + global: + - COMPOSER_MEMORY_LIMIT=6G + matrix: include: - php: 5.6 @@ -39,6 +43,7 @@ before_script: - composer config -g github-oauth.github.com "d0285ed5c8644f30547572ead2ed897431c1fc09" # Avoid memory issues on composer install - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + - ./bin/.travis/enable_swap.sh - if [ "$COMPOSER_REQUIRE" != "" ] ; then composer require --no-update $COMPOSER_REQUIRE ; fi - travis_retry composer update --prefer-dist --no-interaction - if [ "$SOLR_VERSION" != "" ] ; then ./bin/.travis/init_solr.sh ; fi diff --git a/bin/.travis/enable_swap.sh b/bin/.travis/enable_swap.sh new file mode 100755 index 000000000..c68f8ce33 --- /dev/null +++ b/bin/.travis/enable_swap.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +echo '> Enabling swap...' +sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=4096 +sudo /sbin/mkswap /var/swap.1 +sudo /sbin/swapon /var/swap.1