From d64b889f5217b2af985c75accc52d2f97858a4c0 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Thu, 4 Oct 2018 00:28:54 -0700 Subject: [PATCH] [travis] add python3 to continuous integration (#3146) --- .travis.yml | 8 ++++++-- .travis/before_install.sh | 6 +++--- .travis/script.sh | 2 ++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index edab48d58..1081620a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,8 @@ # POSSIBILITY OF SUCH DAMAGE. # -language: generic +language: python +python: "3.6" sudo: required dist: trusty @@ -58,6 +59,7 @@ matrix: compiler: gcc - env: BUILD_TARGET="android-build" VERBOSE=1 os: linux + python: "2.7" - env: BUILD_TARGET="posix-distcheck" CC=clang-6.0 CXX=clang++-6.0 VERBOSE=1 VIRTUAL_TIME=1 os: linux addons: @@ -70,6 +72,7 @@ matrix: - env: BUILD_TARGET="posix-32-bit" VERBOSE=1 VIRTUAL_TIME=1 os: linux compiler: gcc + python: "2.7" - env: BUILD_TARGET="posix-ncp" VERBOSE=1 VIRTUAL_TIME=1 os: linux compiler: gcc @@ -162,4 +165,5 @@ matrix: compiler: gcc - env: BUILD_TARGET="toranj-test-framework" VERBOSE=1 TORANJ_POSIX_APP_RCP_MODEL=1 os: linux - compiler: gcc \ No newline at end of file + compiler: gcc + python: "2.7" \ No newline at end of file diff --git a/.travis/before_install.sh b/.travis/before_install.sh index d5c514535..480a36ece 100755 --- a/.travis/before_install.sh +++ b/.travis/before_install.sh @@ -40,11 +40,11 @@ cd /tmp || die sudo apt-get update || die [ $BUILD_TARGET != posix-distcheck -a $BUILD_TARGET != posix-32-bit -a $BUILD_TARGET != posix-app-cli -a $BUILD_TARGET != posix-mtd -a $BUILD_TARGET != posix-ncp -a $BUILD_TARGET != posix-app-ncp ] || { - pip install --user --upgrade pip || die - pip install --user -r $TRAVIS_BUILD_DIR/tests/scripts/thread-cert/requirements.txt || die + pip install --upgrade pip || die + pip install -r $TRAVIS_BUILD_DIR/tests/scripts/thread-cert/requirements.txt || die [ $BUILD_TARGET != posix-ncp -a $BUILD_TARGET != posix-app-ncp ] || { # Packages used by ncp tools. - pip install --user git+https://github.com/openthread/pyspinel || die + pip install git+https://github.com/openthread/pyspinel || die } } diff --git a/.travis/script.sh b/.travis/script.sh index ceb5ffabe..743cfc06b 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -34,6 +34,8 @@ die() { set -x +python --version || die + [ $BUILD_TARGET != pretty-check ] || { ./bootstrap || die ./configure || die