Skip to content

Commit 72f9229

Browse files
cclausstargos
authored andcommitted
build: specify Python version once for all tests
Extracted from #28537 for shorter review cycle. This makes it easier to experiment with new versions of Python as they become available on the Travis CI platform. PR-URL: #28694 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 9c6791e commit 72f9229

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.travis.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ x-ccache-setup-steps: &ccache-setup-steps
55
- export CXX='ccache g++-6'
66

77
os: linux
8-
dist: xenial
98
language: cpp
9+
env:
10+
global:
11+
- PYTHON_VERSION="2.7.15"
1012
jobs:
1113
include:
1214
- stage: "Compile"
@@ -20,7 +22,7 @@ jobs:
2022
- g++-6
2123
install: *ccache-setup-steps
2224
script:
23-
- pyenv global 2.7.15
25+
- pyenv global ${PYTHON_VERSION}
2426
- ./configure
2527
- make -j2 -C out V=1 v8
2628

@@ -34,7 +36,7 @@ jobs:
3436
- g++-6
3537
install: *ccache-setup-steps
3638
script:
37-
- pyenv global 2.7.15
39+
- pyenv global ${PYTHON_VERSION}
3840
- ./configure
3941
- make -j2 V=1
4042
- cp out/Release/node /home/travis/.ccache
@@ -47,7 +49,7 @@ jobs:
4749
- mkdir -p out/Release
4850
- cp /home/travis/.ccache/node out/Release/node
4951
script:
50-
- pyenv global 2.7.15
52+
- pyenv global ${PYTHON_VERSION}
5153
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
5254

5355
- name: "Test C++ Suites"
@@ -63,7 +65,7 @@ jobs:
6365
- cp /home/travis/.ccache/cctest out/Release/cctest
6466
- touch config.gypi
6567
script:
66-
- pyenv global 2.7.15
68+
- pyenv global ${PYTHON_VERSION}
6769
- out/Release/cctest
6870
- make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
6971
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
@@ -72,7 +74,7 @@ jobs:
7274
language: node_js
7375
node_js: "node"
7476
install:
75-
- pyenv global 2.7.15
77+
- pyenv global ${PYTHON_VERSION}
7678
- make lint-py-build || true
7779
script:
7880
- NODE=$(which node) make lint lint-py

0 commit comments

Comments
 (0)