build: add full Python 3 tests to Travis CI
PR-URL: https://github.com/nodejs/node/pull/29360 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com>
This commit is contained in:
parent
89aea1514b
commit
c602b0a4e5
139
.travis.yml
139
.travis.yml
@ -8,73 +8,145 @@ os: linux
|
|||||||
language: cpp
|
language: cpp
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- PYTHON_VERSION="2.7.15"
|
- PYTHON2_VERSION="2.7.15"
|
||||||
|
- PYTHON3_VERSION="3.6.7" # "3.7.1" after #29326 is fixed
|
||||||
|
- PYTHON2_CACHE=$HOME/.ccache/py${PYTHON2_VERSION}
|
||||||
|
- PYTHON3_CACHE=$HOME/.ccache/py${PYTHON3_VERSION}
|
||||||
|
cache:
|
||||||
|
ccache: true
|
||||||
|
directories:
|
||||||
|
- ${PYTHON2_CACHE}
|
||||||
|
- ${PYTHON3_CACHE}
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- stage: "Compile"
|
- stage: "Compile"
|
||||||
name: "Compile V8"
|
name: "Compile V8 (py2)"
|
||||||
cache: ccache
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
|
update: true
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
packages:
|
packages:
|
||||||
- g++-6
|
- g++-6
|
||||||
install: *ccache-setup-steps
|
install: *ccache-setup-steps
|
||||||
script:
|
script:
|
||||||
- pyenv global ${PYTHON_VERSION}
|
- pyenv global ${PYTHON2_VERSION}
|
||||||
- ./configure
|
- ./configure
|
||||||
- make -j2 -C out V=1 v8
|
- make -j2 -C out V=1 v8
|
||||||
|
|
||||||
- name: "Compile Node.js"
|
- name: "Compile V8 (py3)"
|
||||||
cache: ccache
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
|
update: true
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
packages:
|
packages:
|
||||||
- g++-6
|
- g++-6
|
||||||
install: *ccache-setup-steps
|
install: *ccache-setup-steps
|
||||||
script:
|
script:
|
||||||
- pyenv global ${PYTHON_VERSION}
|
- pyenv global ${PYTHON3_VERSION}
|
||||||
|
# - ./configure # workaround pending #25878
|
||||||
|
- python3 configure.py
|
||||||
|
- make -j2 -C out V=1 v8
|
||||||
|
|
||||||
|
- name: "Compile Node.js (py2)"
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
update: true
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- g++-6
|
||||||
|
install: *ccache-setup-steps
|
||||||
|
script:
|
||||||
|
- pyenv global ${PYTHON2_VERSION}
|
||||||
- ./configure
|
- ./configure
|
||||||
- make -j2 V=1
|
- make -j2 V=1
|
||||||
- cp out/Release/node /home/travis/.ccache
|
- cp out/Release/node ${PYTHON2_CACHE}
|
||||||
- cp out/Release/cctest /home/travis/.ccache
|
- cp out/Release/cctest ${PYTHON2_CACHE}
|
||||||
|
|
||||||
|
- name: "Compile Node.js (py3)"
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
update: true
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- g++-6
|
||||||
|
install: *ccache-setup-steps
|
||||||
|
script:
|
||||||
|
- pyenv global ${PYTHON3_VERSION}
|
||||||
|
# - ./configure # workaround pending #25878
|
||||||
|
- python3 configure.py
|
||||||
|
- make -j2 V=1
|
||||||
|
- cp out/Release/node ${PYTHON3_CACHE}
|
||||||
|
- cp out/Release/cctest ${PYTHON3_CACHE}
|
||||||
|
|
||||||
- stage: "Tests"
|
- stage: "Tests"
|
||||||
name: "Test JS Suites"
|
name: "Test JS Suites (py2)"
|
||||||
cache: ccache
|
|
||||||
install:
|
install:
|
||||||
- mkdir -p out/Release
|
- mkdir -p out/Release
|
||||||
- cp /home/travis/.ccache/node out/Release/node
|
- cp ${PYTHON2_CACHE}/node out/Release/node
|
||||||
script:
|
script:
|
||||||
- pyenv global ${PYTHON_VERSION}
|
- pyenv global ${PYTHON2_VERSION}
|
||||||
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
|
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
|
||||||
|
|
||||||
- name: "Test C++ Suites"
|
- name: "Test JS Suites (py3)"
|
||||||
cache: ccache
|
install:
|
||||||
|
- mkdir -p out/Release
|
||||||
|
- cp ${PYTHON3_CACHE}/node out/Release/node
|
||||||
|
script:
|
||||||
|
- pyenv global ${PYTHON3_VERSION}
|
||||||
|
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
|
||||||
|
|
||||||
|
- name: "Test C++ Suites (py2)"
|
||||||
install:
|
install:
|
||||||
- export CCACHE_NOSTATS=1
|
- export CCACHE_NOSTATS=1
|
||||||
- export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
|
- export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
|
||||||
- export CC='ccache gcc'
|
- export CC='ccache gcc'
|
||||||
- export CXX='ccache g++'
|
- export CXX='ccache g++'
|
||||||
- mkdir -p out/Release
|
- mkdir -p out/Release
|
||||||
- cp /home/travis/.ccache/node out/Release/node
|
- cp ${PYTHON2_CACHE}/node out/Release/node
|
||||||
- ln -fs out/Release/node node
|
- ln -fs out/Release/node node
|
||||||
- cp /home/travis/.ccache/cctest out/Release/cctest
|
- cp ${PYTHON2_CACHE}/cctest out/Release/cctest
|
||||||
- touch config.gypi
|
- touch config.gypi
|
||||||
script:
|
script:
|
||||||
- pyenv global ${PYTHON_VERSION}
|
- pyenv global ${PYTHON2_VERSION}
|
||||||
- out/Release/cctest
|
- out/Release/cctest
|
||||||
- make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
|
- make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
|
||||||
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
|
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
|
||||||
|
|
||||||
- name: "Linter"
|
- name: "Test C++ Suites (py3)"
|
||||||
|
install:
|
||||||
|
- export CCACHE_NOSTATS=1
|
||||||
|
- export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
|
||||||
|
- export CC='ccache gcc'
|
||||||
|
- export CXX='ccache g++'
|
||||||
|
- mkdir -p out/Release
|
||||||
|
- cp ${PYTHON3_CACHE}/node out/Release/node
|
||||||
|
- ln -fs out/Release/node node
|
||||||
|
- cp ${PYTHON3_CACHE}/cctest out/Release/cctest
|
||||||
|
- touch config.gypi
|
||||||
|
script:
|
||||||
|
- pyenv global ${PYTHON3_VERSION}
|
||||||
|
- out/Release/cctest
|
||||||
|
- make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
|
||||||
|
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
|
||||||
|
|
||||||
|
- name: "Linter (py2)"
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js: "node"
|
node_js: "node"
|
||||||
install:
|
install:
|
||||||
- pyenv global ${PYTHON_VERSION}
|
- pyenv global ${PYTHON2_VERSION}
|
||||||
|
- make lint-py-build || true
|
||||||
|
script:
|
||||||
|
- NODE=$(which node) make lint lint-py
|
||||||
|
|
||||||
|
- name: "Linter (py3)"
|
||||||
|
language: node_js
|
||||||
|
node_js: "node"
|
||||||
|
install:
|
||||||
|
- pyenv global ${PYTHON3_VERSION}
|
||||||
- make lint-py-build || true
|
- make lint-py-build || true
|
||||||
script:
|
script:
|
||||||
- NODE=$(which node) make lint lint-py
|
- NODE=$(which node) make lint lint-py
|
||||||
@ -88,30 +160,5 @@ jobs:
|
|||||||
bash -x tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST};
|
bash -x tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST};
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: "Python 3 is EXPERIMENTAL (Py36)"
|
|
||||||
language: node_js
|
|
||||||
node_js: "node"
|
|
||||||
install:
|
|
||||||
- pyenv global 3.6.7
|
|
||||||
- python3.6 -m pip install --upgrade pip
|
|
||||||
- make lint-py-build
|
|
||||||
script:
|
|
||||||
- NODE=$(which node) make lint lint-py
|
|
||||||
- python3.6 ./configure.py
|
|
||||||
- NODE=$(which node) make test
|
|
||||||
|
|
||||||
- name: "Python 3 is EXPERIMENTAL (Py37)"
|
|
||||||
language: node_js
|
|
||||||
node_js: "node"
|
|
||||||
install:
|
|
||||||
- pyenv global 3.7.1
|
|
||||||
- python3.7 -m pip install --upgrade pip
|
|
||||||
- make lint-py-build
|
|
||||||
script:
|
|
||||||
- NODE=$(which node) make lint lint-py
|
|
||||||
- python3.7 ./configure.py
|
|
||||||
- NODE=$(which node) make test
|
|
||||||
|
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- name: "Python 3 is EXPERIMENTAL (Py36)"
|
- name: "Test C++ Suites (py3)" # allow_failures pending #29246
|
||||||
- name: "Python 3 is EXPERIMENTAL (Py37)"
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user