Skip to content

Commit e8b06e4

Browse files
richardlautargos
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 1f54cf5 commit e8b06e4

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

.travis.yml

+8-23
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
# Currently this file can only support one PYTHON_VERSION.
@@ -16,33 +10,24 @@ env:
1610
jobs:
1711
include:
1812
- stage: "Compile"
19-
name: "Compile V8"
13+
name: "Compile Node.js"
2014
cache: ccache
2115
addons:
2216
apt:
2317
sources:
2418
- ubuntu-toolchain-r-test
2519
packages:
2620
- g++-6
27-
install: *ccache-setup-steps
28-
script:
29-
- pyenv global ${PYTHON_VERSION}
30-
- ./configure
31-
- make -j2 -C out V=1 v8
32-
33-
- name: "Compile Node.js"
34-
cache: ccache
35-
addons:
36-
apt:
37-
sources:
38-
- ubuntu-toolchain-r-test
39-
packages:
40-
- g++-6
41-
install: *ccache-setup-steps
21+
install:
22+
- export CCACHE_NOSTATS=1
23+
- export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
24+
- export CC='ccache gcc-6'
25+
- export CXX='ccache g++-6'
4226
script:
4327
- pyenv global ${PYTHON_VERSION}
4428
- ./configure
45-
- make -j2 V=1
29+
- timeout --preserve-status 45m make -j2 V=1
30+
before_cache:
4631
- cp out/Release/node /home/travis/.ccache
4732
- cp out/Release/cctest /home/travis/.ccache
4833

0 commit comments

Comments
 (0)