@@ -8,110 +8,157 @@ os: linux
8
8
language : cpp
9
9
env :
10
10
global :
11
- - PYTHON_VERSION="2.7.15"
11
+ - PYTHON2_VERSION="2.7.15"
12
+ - PYTHON3_VERSION="3.6.7" # "3.7.1" after #29326 is fixed
13
+ - PYTHON2_CACHE=$HOME/.ccache/py${PYTHON2_VERSION}
14
+ - PYTHON3_CACHE=$HOME/.ccache/py${PYTHON3_VERSION}
15
+ cache :
16
+ ccache : true
17
+ directories :
18
+ - ${PYTHON2_CACHE}
19
+ - ${PYTHON3_CACHE}
12
20
jobs :
13
21
include :
14
22
- stage : " Compile"
15
- name : " Compile V8"
16
- cache : ccache
23
+ name : " Compile V8 (py2)"
17
24
addons :
18
25
apt :
26
+ update : true
19
27
sources :
20
28
- ubuntu-toolchain-r-test
21
29
packages :
22
30
- g++-6
23
31
install : *ccache-setup-steps
24
32
script :
25
- - pyenv global ${PYTHON_VERSION }
33
+ - pyenv global ${PYTHON2_VERSION }
26
34
- ./configure
27
35
- make -j2 -C out V=1 v8
28
36
29
- - name : " Compile Node.js"
30
- cache : ccache
37
+ - name : " Compile V8 (py3)"
31
38
addons :
32
39
apt :
40
+ update : true
33
41
sources :
34
42
- ubuntu-toolchain-r-test
35
43
packages :
36
44
- g++-6
37
45
install : *ccache-setup-steps
38
46
script :
39
- - pyenv global ${PYTHON_VERSION}
47
+ - pyenv global ${PYTHON3_VERSION}
48
+ # - ./configure # workaround pending #25878
49
+ - python3 configure.py
50
+ - make -j2 -C out V=1 v8
51
+
52
+ - name : " Compile Node.js (py2)"
53
+ addons :
54
+ apt :
55
+ update : true
56
+ sources :
57
+ - ubuntu-toolchain-r-test
58
+ packages :
59
+ - g++-6
60
+ install : *ccache-setup-steps
61
+ script :
62
+ - pyenv global ${PYTHON2_VERSION}
40
63
- ./configure
41
64
- make -j2 V=1
42
- - cp out/Release/node /home/travis/.ccache
43
- - cp out/Release/cctest /home/travis/.ccache
65
+ - cp out/Release/node ${PYTHON2_CACHE}
66
+ - cp out/Release/cctest ${PYTHON2_CACHE}
67
+
68
+ - name : " Compile Node.js (py3)"
69
+ addons :
70
+ apt :
71
+ update : true
72
+ sources :
73
+ - ubuntu-toolchain-r-test
74
+ packages :
75
+ - g++-6
76
+ install : *ccache-setup-steps
77
+ script :
78
+ - pyenv global ${PYTHON3_VERSION}
79
+ # - ./configure # workaround pending #25878
80
+ - python3 configure.py
81
+ - make -j2 V=1
82
+ - cp out/Release/node ${PYTHON3_CACHE}
83
+ - cp out/Release/cctest ${PYTHON3_CACHE}
44
84
45
85
- stage : " Tests"
46
- name : " Test JS Suites"
47
- cache : ccache
86
+ name : " Test JS Suites (py2)"
87
+ install :
88
+ - mkdir -p out/Release
89
+ - cp ${PYTHON2_CACHE}/node out/Release/node
90
+ script :
91
+ - pyenv global ${PYTHON2_VERSION}
92
+ - python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
93
+
94
+ - name : " Test JS Suites (py3)"
48
95
install :
49
96
- mkdir -p out/Release
50
- - cp /home/travis/.ccache /node out/Release/node
97
+ - cp ${PYTHON3_CACHE} /node out/Release/node
51
98
script :
52
- - pyenv global ${PYTHON_VERSION }
99
+ - pyenv global ${PYTHON3_VERSION }
53
100
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
54
101
55
- - name : " Test C++ Suites"
56
- cache : ccache
102
+ - name : " Test C++ Suites (py2)"
57
103
install :
58
104
- export CCACHE_NOSTATS=1
59
105
- export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
60
106
- export CC='ccache gcc'
61
107
- export CXX='ccache g++'
62
108
- mkdir -p out/Release
63
- - cp /home/travis/.ccache /node out/Release/node
109
+ - cp ${PYTHON2_CACHE} /node out/Release/node
64
110
- ln -fs out/Release/node node
65
- - cp /home/travis/.ccache /cctest out/Release/cctest
111
+ - cp ${PYTHON2_CACHE} /cctest out/Release/cctest
66
112
- touch config.gypi
67
113
script :
68
- - pyenv global ${PYTHON_VERSION }
114
+ - pyenv global ${PYTHON2_VERSION }
69
115
- out/Release/cctest
70
116
- make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
71
117
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
72
118
73
- - name : " Linter"
74
- language : node_js
75
- node_js : " node"
119
+ - name : " Test C++ Suites (py3)"
76
120
install :
77
- - pyenv global ${PYTHON_VERSION}
78
- - make lint-py-build || true
121
+ - export CCACHE_NOSTATS=1
122
+ - export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
123
+ - export CC='ccache gcc'
124
+ - export CXX='ccache g++'
125
+ - mkdir -p out/Release
126
+ - cp ${PYTHON3_CACHE}/node out/Release/node
127
+ - ln -fs out/Release/node node
128
+ - cp ${PYTHON3_CACHE}/cctest out/Release/cctest
129
+ - touch config.gypi
79
130
script :
80
- - NODE=$(which node) make lint lint-py
131
+ - pyenv global ${PYTHON3_VERSION}
132
+ - out/Release/cctest
133
+ - make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
134
+ - python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
81
135
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
136
+ - name : " Linter (py2)"
84
137
language : node_js
85
138
node_js : " node"
139
+ install :
140
+ - pyenv global ${PYTHON2_VERSION}
141
+ - make lint-py-build || true
86
142
script :
87
- - if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
88
- bash -x tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST};
89
- fi
143
+ - NODE=$(which node) make lint lint-py
90
144
91
- - name : " Python 3 is EXPERIMENTAL (Py36 )"
145
+ - name : " Linter (py3 )"
92
146
language : node_js
93
147
node_js : " node"
94
148
install :
95
- - pyenv global 3.6.7
96
- - python3.6 -m pip install --upgrade pip
97
- - make lint-py-build
149
+ - pyenv global ${PYTHON3_VERSION}
150
+ - make lint-py-build || true
98
151
script :
99
152
- NODE=$(which node) make lint lint-py
100
- - python3.6 ./configure.py
101
- - NODE=$(which node) make test
102
153
103
- - name : " Python 3 is EXPERIMENTAL (Py37)"
154
+ - name : " First commit message adheres to guidelines at <a href=\" https://goo.gl/p2fr5Q\" >https://goo.gl/p2fr5Q</a>"
155
+ if : type = pull_request
104
156
language : node_js
105
157
node_js : " node"
106
- install :
107
- - pyenv global 3.7.1
108
- - python3.7 -m pip install --upgrade pip
109
- - make lint-py-build
110
158
script :
111
- - NODE=$(which node) make lint lint-py
112
- - python3.7 ./configure.py
113
- - NODE=$(which node) make test
159
+ - if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
160
+ bash -x tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST};
161
+ fi
114
162
115
163
allow_failures :
116
- - name : " Python 3 is EXPERIMENTAL (Py36)"
117
- - name : " Python 3 is EXPERIMENTAL (Py37)"
164
+ - name : " Test C++ Suites (py3)" # allow_failures pending #29246
0 commit comments