aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2018-11-23 21:48:35 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2018-11-23 22:11:10 +0100
commit5a4cbf5b70a6971af7418781293c98136ad93080 (patch)
tree187158b4fe108dee3c49c9d65a5fdd455e078ec3
parentea60d76e60da4a74493156e43502c0023401391c (diff)
downloadwallabag-5a4cbf5b70a6971af7418781293c98136ad93080.tar.gz
wallabag-5a4cbf5b70a6971af7418781293c98136ad93080.tar.zst
wallabag-5a4cbf5b70a6971af7418781293c98136ad93080.zip
Create a custom swap to avoid error
-rw-r--r--.travis.yml26
1 files changed, 17 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml
index ce50fcc4..39306343 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,6 +48,14 @@ branches:
48 except: 48 except:
49 - legacy 49 - legacy
50 50
51before_install:
52 - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
53
54install:
55 - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi;
56 - if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi;
57 - if [[ $ASSETS = build ]]; then yarn install; fi;
58
51before_script: 59before_script:
52 - PHP=$TRAVIS_PHP_VERSION 60 - PHP=$TRAVIS_PHP_VERSION
53 - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; 61 - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
@@ -55,17 +63,17 @@ before_script:
55 - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi 63 - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
56 - composer self-update --no-progress 64 - composer self-update --no-progress
57 - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; 65 - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
58 66 # increase swap to avoid "proc_open(): fork failed - Cannot allocate memory"
59install: 67 # this should be removed when no more PHP 5 build will be defined
60 - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi; 68 - sudo swapon -s
61 - if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi; 69 - sudo fallocate -l 4G /swapfile
62 - if [[ $ASSETS = build ]]; then yarn install; fi; 70 - sudo chmod 600 /swapfile
63 71 - sudo mkswap /swapfile
64before_install: 72 - sudo swapon /swapfile
65 - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; 73 - sudo swapon -s
66 74
67script: 75script:
68 - COMPOSER_MEMORY_LIMIT=-1 travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist 76 - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
69 - echo "travis_fold:start:prepare" 77 - echo "travis_fold:start:prepare"
70 - make prepare DB=$DB 78 - make prepare DB=$DB
71 - echo "travis_fold:end:prepare" 79 - echo "travis_fold:end:prepare"