@@ -8,12 +8,19 @@ os: linux
88language : cpp
99env :
1010 global :
11- - PYTHON_VERSION="2.7.15"
11+ - PYTHON2_VERSION="2.7.15"
12+ - PYTHON3_VERSION="3.6.7" # "3.7.1" after #29326 us fixed
13+ cache :
14+ directories :
15+ - $HOME/.rvm/
1216jobs :
1317 include :
1418 - stage : " Compile"
15- name : " Compile V8"
16- cache : ccache
19+ name : " Compile V8 (py2)"
20+ cache :
21+ ccache : true
22+ directories :
23+ - $HOME/.ccache/py${PYTHON2_VERSION}
1724 addons :
1825 apt :
1926 sources :
@@ -22,12 +29,16 @@ jobs:
2229 - g++-6
2330 install : *ccache-setup-steps
2431 script :
25- - pyenv global ${PYTHON_VERSION }
32+ - pyenv global ${PYTHON2_VERSION }
2633 - ./configure
2734 - make -j2 -C out V=1 v8
2835
29- - name : " Compile Node.js"
30- cache : ccache
36+ - name : " Compile V8 (py3)"
37+ cache :
38+ ccache : true
39+ directories :
40+ - $HOME/.ccache/py${PYTHON3_VERSION}
41+
3142 addons :
3243 apt :
3344 sources :
@@ -36,82 +47,148 @@ jobs:
3647 - g++-6
3748 install : *ccache-setup-steps
3849 script :
39- - pyenv global ${PYTHON_VERSION}
50+ - pyenv global ${PYTHON3_VERSION}
51+ # - ./configure # workaround pending #25878
52+ - python3 configure.py
53+ - make -j2 -C out V=1 v8
54+
55+ - name : " Compile Node.js (py2)"
56+ cache :
57+ ccache : true
58+ directories :
59+ - $HOME/.ccache/py${PYTHON2_VERSION}
60+
61+ addons :
62+ apt :
63+ sources :
64+ - ubuntu-toolchain-r-test
65+ packages :
66+ - g++-6
67+ install : *ccache-setup-steps
68+ script :
69+ - pyenv global ${PYTHON2_VERSION}
4070 - ./configure
4171 - make -j2 V=1
42- - cp out/Release/node /home/travis/.ccache
43- - cp out/Release/cctest /home/travis/.ccache
72+ - mkdir -p $HOME/.ccache/py${PYTHON2_VERSION}
73+ - cp out/Release/node $HOME/.ccache/py${PYTHON2_VERSION}
74+ - cp out/Release/cctest $HOME/.ccache/py${PYTHON2_VERSION}
75+ - ls -lr $HOME/.ccache
76+
77+ - name : " Compile Node.js (py3)"
78+ cache :
79+ ccache : true
80+ directories :
81+ - $HOME/.ccache/py${PYTHON3_VERSION}
82+ addons :
83+ apt :
84+ sources :
85+ - ubuntu-toolchain-r-test
86+ packages :
87+ - g++-6
88+ install : *ccache-setup-steps
89+ script :
90+ - pyenv global ${PYTHON3_VERSION}
91+ # - ./configure # workaround pending #25878
92+ - python3 configure.py
93+ - make -j2 V=1
94+ - mkdir -p $HOME/.ccache/py${PYTHON3_VERSION}
95+ - cp out/Release/node $HOME/.ccache/py${PYTHON3_VERSION}
96+ - cp out/Release/cctest $HOME/.ccache/py${PYTHON3_VERSION}
97+ - ls -lr $HOME/.ccache
4498
4599 - stage : " Tests"
46- name : " Test JS Suites"
47- cache : ccache
100+ name : " Test JS Suites (py2)"
101+ cache :
102+ ccache : true
103+ directories :
104+ - $HOME/.ccache/py${PYTHON2_VERSION}
48105 install :
49106 - mkdir -p out/Release
50- - cp /home/travis/ .ccache/node out/Release/node
107+ - cp $HOME/ .ccache/py${PYTHON2_VERSION} /node out/Release/node
51108 script :
52- - pyenv global ${PYTHON_VERSION }
109+ - pyenv global ${PYTHON2_VERSION }
53110 - python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
54111
55- - name : " Test C++ Suites"
56- cache : ccache
112+ - name : " Test JS Suites (py3)"
113+ cache :
114+ ccache : true
115+ directories :
116+ - $HOME/.ccache/py${PYTHON3_VERSION}
117+ install :
118+ - mkdir -p out/Release
119+ - cp $HOME/.ccache/py${PYTHON3_VERSION}/node out/Release/node
120+ script :
121+ - pyenv global ${PYTHON3_VERSION}
122+ - python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
123+
124+ - name : " Test C++ Suites (py2)"
125+ cache :
126+ ccache : true
127+ directories :
128+ - $HOME/.ccache/py${PYTHON2_VERSION}
57129 install :
58130 - export CCACHE_NOSTATS=1
59131 - export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
60132 - export CC='ccache gcc'
61133 - export CXX='ccache g++'
62134 - mkdir -p out/Release
63- - cp /home/travis/ .ccache/node out/Release/node
135+ - cp $HOME/ .ccache/py${PYTHON2_VERSION} /node out/Release/node
64136 - ln -fs out/Release/node node
65- - cp /home/travis/ .ccache/cctest out/Release/cctest
137+ - cp $HOME/ .ccache/py${PYTHON2_VERSION} /cctest out/Release/cctest
66138 - touch config.gypi
67139 script :
68- - pyenv global ${PYTHON_VERSION }
140+ - pyenv global ${PYTHON2_VERSION }
69141 - out/Release/cctest
70142 - make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
71143 - python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
72144
73- - name : " Linter"
74- language : node_js
75- node_js : " node"
145+ - name : " Test C++ Suites (py3)"
146+ cache :
147+ ccache : true
148+ directories :
149+ - $HOME/.ccache/py${PYTHON3_VERSION}
76150 install :
77- - pyenv global ${PYTHON_VERSION}
78- - make lint-py-build || true
151+ - export CCACHE_NOSTATS=1
152+ - export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
153+ - export CC='ccache gcc'
154+ - export CXX='ccache g++'
155+ - mkdir -p out/Release
156+ - cp $HOME/.ccache/py${PYTHON3_VERSION}/node out/Release/node
157+ - ln -fs out/Release/node node
158+ - cp $HOME/.ccache/py${PYTHON3_VERSION}/cctest out/Release/cctest
159+ - touch config.gypi
79160 script :
80- - NODE=$(which node) make lint lint-py
161+ - pyenv global ${PYTHON3_VERSION}
162+ - out/Release/cctest
163+ - make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
164+ - python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
81165
82- - name : " First commit message adheres to guidelines at <a href=\" https://goo.gl/p2fr5Q\" >https://goo.gl/p2fr5Q</a>"
83- if : type = pull_request
166+ - name : " Linter (py2)"
84167 language : node_js
85168 node_js : " node"
169+ install :
170+ - pyenv global ${PYTHON2_VERSION}
171+ - make lint-py-build || true
86172 script :
87- - if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
88- bash -x tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST};
89- fi
173+ - NODE=$(which node) make lint lint-py
90174
91- - name : " Python 3 is EXPERIMENTAL (Py36 )"
175+ - name : " Linter (py3 )"
92176 language : node_js
93177 node_js : " node"
94178 install :
95- - pyenv global 3.6.7
96- - python3.6 -m pip install --upgrade pip
97- - make lint-py-build
179+ - pyenv global ${PYTHON3_VERSION}
180+ - make lint-py-build || true
98181 script :
99182 - NODE=$(which node) make lint lint-py
100- - python3.6 ./configure.py
101- - NODE=$(which node) make test
102183
103- - name : " Python 3 is EXPERIMENTAL (Py37)"
184+ - name : " First commit message adheres to guidelines at <a href=\" https://goo.gl/p2fr5Q\" >https://goo.gl/p2fr5Q</a>"
185+ if : type = pull_request
104186 language : node_js
105187 node_js : " node"
106- install :
107- - pyenv global 3.7.1
108- - python3.7 -m pip install --upgrade pip
109- - make lint-py-build
110188 script :
111- - NODE=$(which node) make lint lint-py
112- - python3.7 ./configure.py
113- - NODE=$(which node) make test
189+ - if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
190+ bash -x tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST};
191+ fi
114192
115193 allow_failures :
116- - name : " Python 3 is EXPERIMENTAL (Py36)"
117- - name : " Python 3 is EXPERIMENTAL (Py37)"
194+ - name : " Test C++ Suites (py3)" # allow_failures pending #29246
0 commit comments