Skip to content

Commit 6399ebc

Browse files
authored
Merge pull request less#2941 from bd82/travis_cache
CI Build Fixes.
2 parents abb5375 + 259d8b2 commit 6399ebc

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

.travis.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
11
language: node_js
2+
cache:
3+
directories:
4+
- travis-phantomjs
25
node_js:
36
- "6"
47
- "4"
58
- "0.12"
69
- "0.10"
10+
before_install:
11+
# from https://github.com/travis-ci/travis-ci/issues/3225#issuecomment-177592725
12+
# and also from https://github.com/travis-ci/travis-ci/issues/3225#issuecomment-200965782
13+
- phantomjs --version
14+
- export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
15+
- phantomjs --version
16+
# Clear cache and download new copy of PhantomJS if the current version doesn't match 2.1.1.
17+
- "if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis-phantomjs; mkdir -p $PWD/travis-phantomjs; fi"
18+
- "if [ $(phantomjs --version) != '2.1.1' ]; then wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi"
19+
- "if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs; fi"
20+
- phantomjs --version
721
install:
822
- npm install -g grunt-cli
9-
- npm install
23+
# node 0.10 & 0.12 have race condition issues when running custom install scripts
24+
# this can cause phantomjs-prebuilt install script to fail with the error:
25+
# <Cannot find module 'boom'>
26+
# Seems related to: https://github.com/npm/npm/issues/8152
27+
# using <travis_retry> solves this.
28+
- travis_retry npm install
1029
env:
1130
global:
1231
- PHANTOMJS_CDNURL=http://cnpmjs.org/downloads

appveyor.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ install:
1414
- npm -g install npm@2
1515
- set PATH=%APPDATA%\npm;%PATH%
1616
- npm -v
17-
# Typical npm stuff.
18-
- npm install
17+
18+
# node 0.10 & 0.12 have race condition issues when running custom install scripts
19+
# this can cause phantomjs-prebuilt install script to fail with the error:
20+
# <Cannot find module 'boom'>
21+
# Seems related to: https://github.com/npm/npm/issues/8152
22+
# using <appveyor_retry> solves this.
23+
- appveyor-retry call npm install
24+
1925
# Grunt-specific stuff.
2026
- npm install -g grunt-cli
2127

0 commit comments

Comments
 (0)