From 5fbd53eed39b3c7902235d0605430607399bbb1b Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 22 May 2019 18:15:26 +0200 Subject: [PATCH 1/8] Update pyenv on Travis #35 pyenv install 3.6.1 fails on Travis. This is an attempt to fix this Reported-by: Carmen Bianca Bakker Signed-off-by: Philippe Ombredanne --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index c00ee3e..06f4e0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,8 @@ matrix: install: + - git clone git://github.com/pyenv/pyenv-update.git $(pyenv root)/plugins/pyenv-update + - pyenv update - pyenv install --list - echo $PYTHON_EXE - python --version From 7c5684d56f837000d94ca877e0950dca1a92b296 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 22 May 2019 18:40:23 +0200 Subject: [PATCH 2/8] Update macOS pyenv on Travis #35 Use Homebrew to bump pyenv. Reported-by: Carmen Bianca Bakker Signed-off-by: Philippe Ombredanne --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 06f4e0d..eb8d269 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,17 +27,16 @@ matrix: language: generic python: osx_image: xcode7.3 - env: PYTHON_EXE="`pyenv install -s 2.7.14 && pyenv local 2.7.14`" + env: PYTHON_EXE="`brew update && brew upgrade pyenv && pyenv install -s 2.7.14 && pyenv local 2.7.14`" - os: osx language: generic python: osx_image: xcode7.3 - env: PYTHON_EXE="`pyenv install -s 3.6.1 && pyenv local 3.6.1`" - + env: PYTHON_EXE="`brew update && brew upgrade pyenv && pyenv install -s 3.6.1 && pyenv local 3.6.1`" install: - - git clone git://github.com/pyenv/pyenv-update.git $(pyenv root)/plugins/pyenv-update - - pyenv update +# - git clone git://github.com/pyenv/pyenv-update.git $(pyenv root)/plugins/pyenv-update +# - pyenv update - pyenv install --list - echo $PYTHON_EXE - python --version From 42df4224b279767eeb2e9bcef47a9c540681d2e1 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 23 May 2019 08:34:29 +0200 Subject: [PATCH 3/8] Make Travis and pyenv work on macOS #35 This time, try to use a more recent xcode version. Signed-off-by: Philippe Ombredanne --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb8d269..2be1a8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ language: generic env: matrix: - - PYTHON_EXE="`pyenv install -s 2.7.14 && pyenv local 2.7.14`" - - PYTHON_EXE="`pyenv install -s 3.6.1 && pyenv local 3.6.1`" + - PYENV_PYTHON_EXE="`pyenv install -s 2.7.14 && pyenv local 2.7.14`" + - PYENV_PYTHON_EXE="`pyenv install -s 3.6.1 && pyenv local 3.6.1`" # Travis does not offer OSX with arbitrary python versions (like 2.7.13 above) @@ -26,13 +26,13 @@ matrix: - os: osx language: generic python: - osx_image: xcode7.3 - env: PYTHON_EXE="`brew update && brew upgrade pyenv && pyenv install -s 2.7.14 && pyenv local 2.7.14`" + osx_image: xcode9.0 + env: PYENV_PYTHON_EXE="`pyenv install -s 2.7.14 && pyenv local 2.7.14`" - os: osx language: generic python: - osx_image: xcode7.3 - env: PYTHON_EXE="`brew update && brew upgrade pyenv && pyenv install -s 3.6.1 && pyenv local 3.6.1`" + osx_image: xcode9.0 + env: PYENV_PYTHON_EXE="`pyenv install -s 3.6.1 && pyenv local 3.6.1`" install: # - git clone git://github.com/pyenv/pyenv-update.git $(pyenv root)/plugins/pyenv-update From 458f2a95a0958e0c042cfcbd58a4f4242a812b20 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 23 May 2019 12:51:30 +0200 Subject: [PATCH 4/8] Drop testing for Python 3.4 and 3.5 #35 Also remove success notification Signed-off-by: Philippe Ombredanne --- appveyor.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b3073f5..f6026af 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,10 +4,6 @@ environment: matrix: - PYTHON_EXE: "C:\\Python27\\python.exe" - PYTHON_EXE: "C:\\Python27-x64\\python.exe" - - PYTHON_EXE: "C:\\Python34\\python.exe" - - PYTHON_EXE: "C:\\Python34-x64\\python.exe" - - PYTHON_EXE: "C:\\Python35\\python.exe" - - PYTHON_EXE: "C:\\Python35-x64\\python.exe" - PYTHON_EXE: "C:\\Python36\\python.exe" - PYTHON_EXE: "C:\\Python36-x64\\python.exe" @@ -21,8 +17,5 @@ test_script: - 'bin\python -c "from __future__ import print_function;import sys;print(sys.getdefaultencoding())"' - 'bin\py.test -vvs' -on_success: - - "python etc/scripts/irc-notify.py aboutcode [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_green}Succeeded,Details: {build_url},Commit: {commit_url}" - on_failure: - "python etc/scripts/irc-notify.py aboutcode [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_red}Failed,Details: {build_url},Commit: {commit_url}" From fc4c08926bdc3761113798aca481c8d1d0a1787f Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 23 May 2019 13:21:13 +0200 Subject: [PATCH 5/8] Use a modernized Travis config Signed-off-by: Philippe Ombredanne --- .travis.yml | 59 +++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2be1a8f..36f33c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,53 +1,44 @@ -language: generic - -env: - matrix: - - PYENV_PYTHON_EXE="`pyenv install -s 2.7.14 && pyenv local 2.7.14`" - - PYENV_PYTHON_EXE="`pyenv install -s 3.6.1 && pyenv local 3.6.1`" - - -# Travis does not offer OSX with arbitrary python versions (like 2.7.13 above) -# So, you cannot simply have the following section in your build matrix: -# os: -# - linux -# - osx -# Instead, you have to include OSX entries into the build matrix manually. -# In particular, this means specifying the environment variables again. - -# The following was adapted from here: -# https://docs.travis-ci.com/user/multi-os/ -# Set `language: generic` to clear `language: python` from above -# Set `python:` (to empty) to clear it from the travis-ci web interface -# Set `osx_image: xcode7.3` to pin OSX version see here: -# https://docs.travis-ci.com/user/osx-ci-environment/ - matrix: include: - os: osx language: generic - python: - osx_image: xcode9.0 - env: PYENV_PYTHON_EXE="`pyenv install -s 2.7.14 && pyenv local 2.7.14`" + env: + - PYENV_PYTHON="2.7.14" + - os: osx language: generic - python: - osx_image: xcode9.0 - env: PYENV_PYTHON_EXE="`pyenv install -s 3.6.1 && pyenv local 3.6.1`" + env: + - PYENV_PYTHON="3.6.1" + + - os: linux + language: generic + env: + - PYENV_PYTHON="2.7.14" + + - os: linux + language: generic + env: + - PYENV_PYTHON="3.6.1" install: -# - git clone git://github.com/pyenv/pyenv-update.git $(pyenv root)/plugins/pyenv-update -# - pyenv update + - | + if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + brew update + brew install pyenv + brew upgrade pyenv + fi - pyenv install --list - - echo $PYTHON_EXE + - python --version + - pyenv local "$PYENV_PYTHON" - python --version - ./configure -before_script: - - bin/about-code check --verbose . script: + - bin/about-code check --verbose . - "bin/py.test -vvs" + notifications: irc: channels: From 5580890b0bfb0c6754a8d0e70ea8c8ad3ae66bc4 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 23 May 2019 13:26:23 +0200 Subject: [PATCH 6/8] Install a Python with pyenv #35 Signed-off-by: Philippe Ombredanne --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 36f33c6..4f53b82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ install: fi - pyenv install --list - python --version + - pyenv install "$PYENV_PYTHON" - pyenv local "$PYENV_PYTHON" - python --version - ./configure From 3c51e76bee7cb09d94a3a5e021637a7828d76a15 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 23 May 2019 14:56:35 +0200 Subject: [PATCH 7/8] Use pyenv from Git on macOS #35 Signed-off-by: Philippe Ombredanne --- .travis.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4f53b82..72773ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,17 +20,22 @@ matrix: env: - PYENV_PYTHON="3.6.1" + install: - | if [[ $TRAVIS_OS_NAME == 'osx' ]]; then - brew update - brew install pyenv - brew upgrade pyenv + rm -rf ~/.pyenv + git clone https://github.com/pyenv/pyenv.git ~/.pyenv + echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile + echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile + echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile + exec "$SHELL" fi + - which pyenv - pyenv install --list - python --version - pyenv install "$PYENV_PYTHON" - - pyenv local "$PYENV_PYTHON" + - pyenv global "$PYENV_PYTHON" - python --version - ./configure From 0aa006cafad8dd07af8120a58e2e3698b75aa334 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 5 Jun 2019 22:40:49 +0200 Subject: [PATCH 8/8] Add azure pipeline Signed-off-by: Philippe Ombredanne --- azure-pipelines.yml | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..0067019 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,63 @@ +trigger: + branches: + include: ['pipeline'] + tags: + include: ['*'] + +jobs: + - job: tests + displayName: Run tests + steps: + - script: ./configure + - script: ./bin/py.test -vvs tests/commoncode + +jobs: +- job: Tests + + strategy: + + matrix: + Python_27_Linux: + imageName: 'ubuntu-16.04' + python.version: '2.7' + Python_27_Mac: + imageName: 'macos-10.13' + python.version: '2.7' + Python_27_Win: + imageName: 'vs2017-win2016' + python.version: '2.7' + + Python_36_Linux: + imageName: 'ubuntu-16.04' + python.version: '3.6' + Python_36_Mac: + imageName: 'macos-10.13' + python.version: '3.6' + Python_36_Windows: + imageName: 'vs2017-win2016' + python.version: '3.6' + + Python_37_Linux: + imageName: 'ubuntu-16.04' + python.version: '3.7' + Python_37_Mac: + imageName: 'macos-10.13' + python.version: '3.7' + Python_37_Windows: + imageName: 'vs2017-win2016' + python.version: '3.7' + + pool: + vmImage: $(imageName) + + steps: + + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + + - script: | + configure + bin/py.test -vvs + displayName: 'Run tests'