Skip to content

Commit f4f210a

Browse files
richardlauBridgeAR
authored andcommitted
build: store cache on timed out builds on Travis
Building Node.js without a ccache cache takes longer than the 50 minute Travis time limit for jobs for public repositories. To mitigate this we added a job to compile V8 on the basis that in the worst case it would complete within 50 minutes and provide a cache that could be used by a restarted `Compile Node.js` job. Recent PRs have exceeded the 50 minute time limit for the `Compile V8` job. When Travis times out a build the cache is not stored. This commit drops the `Compile V8` job and adds a manual timeout to the `Compile Node.js` job which will allow the cache to be stored and used in restarts of the job. PR-URL: #30469 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Denys Otrishko <[email protected]>
1 parent 0d12e9c commit f4f210a

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

.travis.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
x-ccache-setup-steps: &ccache-setup-steps
2-
- export CCACHE_NOSTATS=1
3-
- export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
4-
- export CC='ccache gcc-6'
5-
- export CXX='ccache g++-6'
6-
71
os: linux
82
language: cpp
93
env:
@@ -13,33 +7,24 @@ env:
137
jobs:
148
include:
159
- stage: "Compile"
16-
name: "Compile V8"
10+
name: "Compile Node.js"
1711
cache: ccache
1812
addons:
1913
apt:
2014
sources:
2115
- ubuntu-toolchain-r-test
2216
packages:
2317
- g++-6
24-
install: *ccache-setup-steps
25-
script:
26-
- pyenv global ${PYTHON_VERSION}
27-
- ./configure
28-
- make -j2 -C out V=1 v8
29-
30-
- name: "Compile Node.js"
31-
cache: ccache
32-
addons:
33-
apt:
34-
sources:
35-
- ubuntu-toolchain-r-test
36-
packages:
37-
- g++-6
38-
install: *ccache-setup-steps
18+
install:
19+
- export CCACHE_NOSTATS=1
20+
- export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
21+
- export CC='ccache gcc-6'
22+
- export CXX='ccache g++-6'
3923
script:
4024
- pyenv global ${PYTHON_VERSION}
4125
- ./configure
42-
- make -j2 V=1
26+
- timeout --preserve-status 45m make -j2 V=1
27+
before_cache:
4328
- cp out/Release/node /home/travis/.ccache
4429
- cp out/Release/cctest /home/travis/.ccache
4530

0 commit comments

Comments
 (0)