qiskit/.travis.yml

179 lines
5.2 KiB
YAML
Raw Normal View History

# This code is part of Qiskit.
2017-05-12 00:12:57 +08:00
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
2017-05-12 00:12:57 +08:00
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
notifications:
email: false
2017-05-12 00:12:57 +08:00
cache: pip
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
sudo: false
2017-05-11 00:44:30 +08:00
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
###############################################################################
# Anchored and aliased definitions.
###############################################################################
# These are used for avoiding repeating code, and due to problems with
# overriding some keys (in particular, "os" and "language: ptyhon") when using
# the standard travis matrix with stages.
#
# This allows re-using different "sets" of configurations in the stages
# matrix, mimicking a hierarchy:
# * stage_generic
# * stage_linux
# * stage_osx
stage_generic: &stage_generic
install:
# Install step for jobs that require compilation and qa.
- pip install -U -r requirements.txt
- pip install -U -r requirements-dev.txt -c constraints.txt
- pip install -e .
- pip install "qiskit-ibmq-provider" -c constraints.txt
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
script:
# Compile the executables and run the tests.
- python setup.py build_ext --inplace
- make test_ci
after_failure:
- python tools/report_ci_failure.py
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
stage_linux: &stage_linux
<<: *stage_generic
os: linux
dist: trusty
language: python
python: 3.5
stage_osx: &stage_osx
<<: *stage_generic
os: osx
osx_image: xcode9.2
language: generic
cache:
pip: true
directories:
- ~/python-interpreters/
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
before_install:
# Travis does not provide support for Python 3 under osx - it needs to be
# installed manually.
|
if [ ${TRAVIS_OS_NAME} = "osx" ]; then
if [[ ! -d ~/python-interpreters/$PYTHON_VERSION ]]; then
git clone git://github.com/pyenv/pyenv.git
cd pyenv/plugins/python-build
./install.sh
cd ../../..
python-build $PYTHON_VERSION ~/python-interpreters/$PYTHON_VERSION
fi
virtualenv --python ~/python-interpreters/$PYTHON_VERSION/bin/python venv
source venv/bin/activate
fi
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
###############################################################################
# Stage-related definitions
###############################################################################
# Define the order of the stages.
stages:
- lint and pure python test
- test
# Define the job matrix explicitly, as matrix expansion causes issues when
# using it with stages and some variables/sections cannot be overridden.
jobs:
include:
Build wheels automatically in CI environment (#1911) * Build wheels automatically in CI environment Right now when it's time to push a relase of qiskit-terra we have to manually build wheels for all our supported environments because we included compiled code in the project. This involves setting up a proper environment with portable librariers and compilers in Linux, Windows, and Mac OSX with all 3 versions of python we support. Then manually building the 9 wheels necessary to publish on pypi. However we install qiskit-terra from source every day multiple times in all these environments in our CI. There is no reason this manual step needs to exist and we can just leverage CI to do our wheel building when it's time to do a release. This commit adds initial support for building our wheels in travis (for linux and osx) and appveyor (for windows). It leverages the cibuildwheel project to automate the wheel building. This will ensure we setup the proper environment for all 3 python versions on all 3 environments (for example pulling in the manylinux docker container on linux). * Add cython to wheel build environment * Add sudo call to pip * Skip python 3.4 wheel build * Fix appveyor syntax * Setup seperate wheel job on appveyor * Fix missing quote * Fix osx env skip typo * Add wheel tests and twine config to CIBW jobs This commit adds 2 things. First running tests on the built wheels. This will enable verifying that the built wheels work by running the unit tests with terra installed from the wheels. The second is the beginnings of the twine config. In the next iteration of this patch the wheels will all be uploaded to test.pypi.org so we can test them locally and then uploaded them to pypi.org for release on each tag push. (We might bypass this and go straight to pypi.org in the future) To facilitate this we need to pass configuration into twine so for when we add twine upload to the builds it will be able to upload. * Add missing quotes to test command * Run tests outside of project directory * Switch CIBW tests to use unittest instead of stestr Running tests with stestr assumes you're running inside the python project for discovery to work. Since we don't want to do that because it will get confused about whether we mean to run with the installed wheel or local files. This commit switches to use unittest which will enable running discovery from any directory so we can run tests against just the installed wheel to verify that it works correctly. * Run examples script instead of unittests The unittests are too coupled to running from inside the repo. Since we just need to verify the installed wheel works this switches to running one of the example scripts, teleport.py. This is a good choice because it will use both python code and cython compiled code to verify the wheel works as expected. * Remove unused test requirements * Fix windows backwards slashes * Update windows test command * Add twine upload and only run on tags * Run wheel build as a deploy on tag in appveyor * Enable deploy on each run for testing * Pivot appveyor config to use conditional matrix instead of deploy * Add twine upload to appveyor
2019-04-24 22:36:35 +08:00
# Wheel builds
- sudo: required
services:
- docker
env:
- CIBW_BEFORE_BUILD="pip install -U Cython"
- CIBW_SKIP="cp27-* cp34-*"
- TWINE_USERNAME=qiskit
- CIBW_TEST_COMMAND="python3 {project}/examples/python/stochastic_swap.py"
Build wheels automatically in CI environment (#1911) * Build wheels automatically in CI environment Right now when it's time to push a relase of qiskit-terra we have to manually build wheels for all our supported environments because we included compiled code in the project. This involves setting up a proper environment with portable librariers and compilers in Linux, Windows, and Mac OSX with all 3 versions of python we support. Then manually building the 9 wheels necessary to publish on pypi. However we install qiskit-terra from source every day multiple times in all these environments in our CI. There is no reason this manual step needs to exist and we can just leverage CI to do our wheel building when it's time to do a release. This commit adds initial support for building our wheels in travis (for linux and osx) and appveyor (for windows). It leverages the cibuildwheel project to automate the wheel building. This will ensure we setup the proper environment for all 3 python versions on all 3 environments (for example pulling in the manylinux docker container on linux). * Add cython to wheel build environment * Add sudo call to pip * Skip python 3.4 wheel build * Fix appveyor syntax * Setup seperate wheel job on appveyor * Fix missing quote * Fix osx env skip typo * Add wheel tests and twine config to CIBW jobs This commit adds 2 things. First running tests on the built wheels. This will enable verifying that the built wheels work by running the unit tests with terra installed from the wheels. The second is the beginnings of the twine config. In the next iteration of this patch the wheels will all be uploaded to test.pypi.org so we can test them locally and then uploaded them to pypi.org for release on each tag push. (We might bypass this and go straight to pypi.org in the future) To facilitate this we need to pass configuration into twine so for when we add twine upload to the builds it will be able to upload. * Add missing quotes to test command * Run tests outside of project directory * Switch CIBW tests to use unittest instead of stestr Running tests with stestr assumes you're running inside the python project for discovery to work. Since we don't want to do that because it will get confused about whether we mean to run with the installed wheel or local files. This commit switches to use unittest which will enable running discovery from any directory so we can run tests against just the installed wheel to verify that it works correctly. * Run examples script instead of unittests The unittests are too coupled to running from inside the repo. Since we just need to verify the installed wheel works this switches to running one of the example scripts, teleport.py. This is a good choice because it will use both python code and cython compiled code to verify the wheel works as expected. * Remove unused test requirements * Fix windows backwards slashes * Update windows test command * Add twine upload and only run on tags * Run wheel build as a deploy on tag in appveyor * Enable deploy on each run for testing * Pivot appveyor config to use conditional matrix instead of deploy * Add twine upload to appveyor
2019-04-24 22:36:35 +08:00
if: tag IS present
script:
- sudo pip install cibuildwheel==0.10.2
- sudo pip install -U twine
Build wheels automatically in CI environment (#1911) * Build wheels automatically in CI environment Right now when it's time to push a relase of qiskit-terra we have to manually build wheels for all our supported environments because we included compiled code in the project. This involves setting up a proper environment with portable librariers and compilers in Linux, Windows, and Mac OSX with all 3 versions of python we support. Then manually building the 9 wheels necessary to publish on pypi. However we install qiskit-terra from source every day multiple times in all these environments in our CI. There is no reason this manual step needs to exist and we can just leverage CI to do our wheel building when it's time to do a release. This commit adds initial support for building our wheels in travis (for linux and osx) and appveyor (for windows). It leverages the cibuildwheel project to automate the wheel building. This will ensure we setup the proper environment for all 3 python versions on all 3 environments (for example pulling in the manylinux docker container on linux). * Add cython to wheel build environment * Add sudo call to pip * Skip python 3.4 wheel build * Fix appveyor syntax * Setup seperate wheel job on appveyor * Fix missing quote * Fix osx env skip typo * Add wheel tests and twine config to CIBW jobs This commit adds 2 things. First running tests on the built wheels. This will enable verifying that the built wheels work by running the unit tests with terra installed from the wheels. The second is the beginnings of the twine config. In the next iteration of this patch the wheels will all be uploaded to test.pypi.org so we can test them locally and then uploaded them to pypi.org for release on each tag push. (We might bypass this and go straight to pypi.org in the future) To facilitate this we need to pass configuration into twine so for when we add twine upload to the builds it will be able to upload. * Add missing quotes to test command * Run tests outside of project directory * Switch CIBW tests to use unittest instead of stestr Running tests with stestr assumes you're running inside the python project for discovery to work. Since we don't want to do that because it will get confused about whether we mean to run with the installed wheel or local files. This commit switches to use unittest which will enable running discovery from any directory so we can run tests against just the installed wheel to verify that it works correctly. * Run examples script instead of unittests The unittests are too coupled to running from inside the repo. Since we just need to verify the installed wheel works this switches to running one of the example scripts, teleport.py. This is a good choice because it will use both python code and cython compiled code to verify the wheel works as expected. * Remove unused test requirements * Fix windows backwards slashes * Update windows test command * Add twine upload and only run on tags * Run wheel build as a deploy on tag in appveyor * Enable deploy on each run for testing * Pivot appveyor config to use conditional matrix instead of deploy * Add twine upload to appveyor
2019-04-24 22:36:35 +08:00
- cibuildwheel --output-dir wheelhouse
- twine upload wheelhouse/*
- os: osx
language: generic
if: tag IS present
env:
- CIBW_BEFORE_BUILD="pip install -U Cython"
- CIBW_SKIP="cp27-* cp34-*"
- TWINE_USERNAME=qiskit
- CIBW_TEST_COMMAND="python3 {project}/examples/python/stochastic_swap.py"
Build wheels automatically in CI environment (#1911) * Build wheels automatically in CI environment Right now when it's time to push a relase of qiskit-terra we have to manually build wheels for all our supported environments because we included compiled code in the project. This involves setting up a proper environment with portable librariers and compilers in Linux, Windows, and Mac OSX with all 3 versions of python we support. Then manually building the 9 wheels necessary to publish on pypi. However we install qiskit-terra from source every day multiple times in all these environments in our CI. There is no reason this manual step needs to exist and we can just leverage CI to do our wheel building when it's time to do a release. This commit adds initial support for building our wheels in travis (for linux and osx) and appveyor (for windows). It leverages the cibuildwheel project to automate the wheel building. This will ensure we setup the proper environment for all 3 python versions on all 3 environments (for example pulling in the manylinux docker container on linux). * Add cython to wheel build environment * Add sudo call to pip * Skip python 3.4 wheel build * Fix appveyor syntax * Setup seperate wheel job on appveyor * Fix missing quote * Fix osx env skip typo * Add wheel tests and twine config to CIBW jobs This commit adds 2 things. First running tests on the built wheels. This will enable verifying that the built wheels work by running the unit tests with terra installed from the wheels. The second is the beginnings of the twine config. In the next iteration of this patch the wheels will all be uploaded to test.pypi.org so we can test them locally and then uploaded them to pypi.org for release on each tag push. (We might bypass this and go straight to pypi.org in the future) To facilitate this we need to pass configuration into twine so for when we add twine upload to the builds it will be able to upload. * Add missing quotes to test command * Run tests outside of project directory * Switch CIBW tests to use unittest instead of stestr Running tests with stestr assumes you're running inside the python project for discovery to work. Since we don't want to do that because it will get confused about whether we mean to run with the installed wheel or local files. This commit switches to use unittest which will enable running discovery from any directory so we can run tests against just the installed wheel to verify that it works correctly. * Run examples script instead of unittests The unittests are too coupled to running from inside the repo. Since we just need to verify the installed wheel works this switches to running one of the example scripts, teleport.py. This is a good choice because it will use both python code and cython compiled code to verify the wheel works as expected. * Remove unused test requirements * Fix windows backwards slashes * Update windows test command * Add twine upload and only run on tags * Run wheel build as a deploy on tag in appveyor * Enable deploy on each run for testing * Pivot appveyor config to use conditional matrix instead of deploy * Add twine upload to appveyor
2019-04-24 22:36:35 +08:00
script:
- sudo pip2 install cibuildwheel==0.10.2
- sudo pip2 install -U twine
Build wheels automatically in CI environment (#1911) * Build wheels automatically in CI environment Right now when it's time to push a relase of qiskit-terra we have to manually build wheels for all our supported environments because we included compiled code in the project. This involves setting up a proper environment with portable librariers and compilers in Linux, Windows, and Mac OSX with all 3 versions of python we support. Then manually building the 9 wheels necessary to publish on pypi. However we install qiskit-terra from source every day multiple times in all these environments in our CI. There is no reason this manual step needs to exist and we can just leverage CI to do our wheel building when it's time to do a release. This commit adds initial support for building our wheels in travis (for linux and osx) and appveyor (for windows). It leverages the cibuildwheel project to automate the wheel building. This will ensure we setup the proper environment for all 3 python versions on all 3 environments (for example pulling in the manylinux docker container on linux). * Add cython to wheel build environment * Add sudo call to pip * Skip python 3.4 wheel build * Fix appveyor syntax * Setup seperate wheel job on appveyor * Fix missing quote * Fix osx env skip typo * Add wheel tests and twine config to CIBW jobs This commit adds 2 things. First running tests on the built wheels. This will enable verifying that the built wheels work by running the unit tests with terra installed from the wheels. The second is the beginnings of the twine config. In the next iteration of this patch the wheels will all be uploaded to test.pypi.org so we can test them locally and then uploaded them to pypi.org for release on each tag push. (We might bypass this and go straight to pypi.org in the future) To facilitate this we need to pass configuration into twine so for when we add twine upload to the builds it will be able to upload. * Add missing quotes to test command * Run tests outside of project directory * Switch CIBW tests to use unittest instead of stestr Running tests with stestr assumes you're running inside the python project for discovery to work. Since we don't want to do that because it will get confused about whether we mean to run with the installed wheel or local files. This commit switches to use unittest which will enable running discovery from any directory so we can run tests against just the installed wheel to verify that it works correctly. * Run examples script instead of unittests The unittests are too coupled to running from inside the repo. Since we just need to verify the installed wheel works this switches to running one of the example scripts, teleport.py. This is a good choice because it will use both python code and cython compiled code to verify the wheel works as expected. * Remove unused test requirements * Fix windows backwards slashes * Update windows test command * Add twine upload and only run on tags * Run wheel build as a deploy on tag in appveyor * Enable deploy on each run for testing * Pivot appveyor config to use conditional matrix instead of deploy * Add twine upload to appveyor
2019-04-24 22:36:35 +08:00
- cibuildwheel --output-dir wheelhouse
- twine upload wheelhouse/*
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
# "lint and and pure python test" stage
###########################################################################
# Linter and style check (GNU/Linux, Python 3.5)
- stage: lint and pure python test
name: Python Style and Linter
<<: *stage_linux
script: make style && make lint
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
# Run the tests against without compilation (GNU/Linux, Python 3.5)
- stage: lint and pure python test
name: Python 3.5 Tests Linux
<<: *stage_linux
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
# "test" stage
###########################################################################
# GNU/Linux, Python 3.6
- stage: test
name: Python 3.6 Tests Linux
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
<<: *stage_linux
python: 3.6
# GNU/Linux, Python 3.7
- stage: test
name: Python 3.7 Tests Linux
<<: *stage_linux
# Compiling Python 3.7 requires an Ubuntu Xenial distribution
# and sudo set to true
# Fix when this is solved:
# https://github.com/travis-ci/travis-ci/issues/9815
dist: xenial
python: 3.7
sudo: true
# OSX, Python 3.5.6 (via pyenv)
- stage: test
<<: *stage_osx
name: Python 3.5 Tests OSX
env:
- MPLBACKEND=ps
- PYTHON_VERSION=3.5.6
# OSX, Python 3.6.5 (via pyenv)
- stage: test
name: Python 3.6 Tests OSX
<<: *stage_osx
env:
- MPLBACKEND=ps
- PYTHON_VERSION=3.6.5
Revise travis configuration, using cmake * Revise the travis configuration for using `cmake` for the several targets, and use "stages" instead of parallel jobs: * define three stages that are executed if the previous one suceeds: 1. "linter and pure python test": executes the linter and a test without compiling the binaries, with the idea of providing quick feedback for PRs. 2. "test": launch the test, including the compilation of binaries, under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6. 3. "deploy doc and pypi": for the stable branch, deploy the docs to the landing page, and when using a specific commit message, build the GNU/Linux and osx wheels, uploading them to test.pypi. * use yaml anchors and definitions to avoid repeating code (and working around travis limitations). * Modify the `cmake``configuration to accomodate the stages flow: * allow conditional creation of compilation and QA targets, mainly for saving some time in some jobs. * move the tests to `cmake/tests.cmake`. * Update the tests: * add a `requires_qe_access` decorator that retrieves QE_TOKEN and QE_URL and appends them to the parameters in an unified manner. * add an environment variable `SKIP_ONLINE_TESTS` that allows to skip the tests that need network access. * replace `TRAVIS_FORK_PULL_REQUEST` with the previous two mechanisms, adding support for AppVeyor as well. * fix a problem with matplotlib under osx headless, effectively skipping `test_visualization.py` during the travis osx jobs. * Move Sphinx to `requirements-dev.txt`.
2018-02-13 05:11:28 +08:00
# OSX, Python 3.7.2 (via pyenv)
- stage: test
name: Python 3.7 Tests OSX
<<: *stage_osx
env:
- MPLBACKEND=ps
- PYTHON_VERSION=3.7.2