From 6c14d9897d92c1a5e685ad151b53f776dc452b1d Mon Sep 17 00:00:00 2001 From: Yang Zhao Date: Fri, 13 Dec 2019 15:52:48 -0800 Subject: [PATCH 1/3] ci: also run linux-gcc pipeline with python3.5 environment git-p4.py includes support for python3, but this was not previously validated in CI. Lets actually do that. As of writing, python-3.5 has reached end-of-life, but has been updated recently enough that it's reasonable to attemp to support it. We do not have a pressing need for features only available in 3.6 and later. Usage of python3 is limited to the linux-gcc pipeline on Azure. It is assumed that passing both python2 and python3 tests on one platform translates to doing the same on others. Travis-CI is unchanged, as no tests are run in those environments. Signed-off-by: Yang Zhao Signed-off-by: Junio C Hamano --- azure-pipelines.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index af2a5ea4845fd2..c4733658125af0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -331,7 +331,18 @@ jobs: displayName: linux-gcc condition: succeeded() pool: Hosted Ubuntu 1604 + strategy: + matrix: + python27: + python.version: '2.7' + python35: + python.version: '3.5' steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + - bash: | + echo "##vso[task.setvariable variable=python_path]$(which python)" - bash: | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 From a08c429fc3317291c0e6a9b4105251e99f18b079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Thu, 23 Jan 2020 14:37:13 +0100 Subject: [PATCH 2/3] Revert "ci: also run linux-gcc pipeline with python3.5 environment" This reverts commit 6c14d9897d92c1a5e685ad151b53f776dc452b1d. --- azure-pipelines.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c4733658125af0..af2a5ea4845fd2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -331,18 +331,7 @@ jobs: displayName: linux-gcc condition: succeeded() pool: Hosted Ubuntu 1604 - strategy: - matrix: - python27: - python.version: '2.7' - python35: - python.version: '3.5' steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - - bash: | - echo "##vso[task.setvariable variable=python_path]$(which python)" - bash: | test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 From 2a569f80055065e29405e0786ad184ddff82ae01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Thu, 23 Jan 2020 14:39:00 +0100 Subject: [PATCH 3/3] ci: build and test with Python 2 and 3; the cheap way --- ci/lib.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci/lib.sh b/ci/lib.sh index a90d0dc0fd2ae3..c3a8cd2104641e 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -162,6 +162,9 @@ linux-clang|linux-gcc) if [ "$jobname" = linux-gcc ] then export CC=gcc-8 + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" + else + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)" fi export GIT_TEST_HTTPD=true @@ -182,6 +185,9 @@ osx-clang|osx-gcc) if [ "$jobname" = osx-gcc ] then export CC=gcc-9 + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" + else + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)" fi # t9810 occasionally fails on Travis CI OS X