2019-04-30 22:36:47 +08:00
|
|
|
# This code is part of Qiskit.
|
2017-05-12 00:12:57 +08:00
|
|
|
#
|
2019-04-30 22:36:47 +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
|
|
|
|
2019-10-28 23:49:16 +08:00
|
|
|
cache:
|
|
|
|
pip: true
|
|
|
|
directories:
|
|
|
|
- .stestr
|
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
|
|
|
stage_generic: &stage_generic
|
|
|
|
install:
|
|
|
|
# Install step for jobs that require compilation and qa.
|
2019-10-17 22:16:20 +08:00
|
|
|
- pip install -U -r requirements.txt -c constraints.txt
|
2019-06-13 10:24:29 +08:00
|
|
|
- pip install -U -r requirements-dev.txt coveralls -c constraints.txt
|
2019-10-17 22:16:20 +08:00
|
|
|
- pip install -c constraints.txt -e .
|
2019-05-04 05:26:23 +08:00
|
|
|
- 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.
|
2019-02-22 02:58:06 +08:00
|
|
|
- python setup.py build_ext --inplace
|
2019-10-28 23:49:16 +08:00
|
|
|
- export PYTHONHASHSEED=$(python -S -c "import random; print(random. randint(1, 4294967295))")
|
|
|
|
- echo "PYTHONHASHSEED=$PYTHONHASHSEED"
|
|
|
|
- stestr run
|
2019-02-12 06:34:20 +08:00
|
|
|
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
|
2019-10-28 23:49:16 +08:00
|
|
|
dist: bionic
|
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
|
|
|
language: python
|
2019-10-28 23:49:16 +08:00
|
|
|
python: 3.7
|
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
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
2019-10-28 23:49:16 +08:00
|
|
|
|
2019-10-30 22:37:18 +08:00
|
|
|
- name: Python 3.6 Tests and Coverage 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
|
2019-06-13 10:24:29 +08:00
|
|
|
env:
|
|
|
|
- PYTHON="coverage run --source qiskit --parallel-mode"
|
|
|
|
after_success:
|
|
|
|
- coverage combine || true
|
|
|
|
- coveralls || true
|
2019-06-15 00:03:03 +08:00
|
|
|
- coverage xml || true
|
|
|
|
- pip install diff-cover || true
|
|
|
|
- diff-cover --compare-branch master coverage.xml || true
|
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
|
|
|
|
2019-06-17 22:36:20 +08:00
|
|
|
# Randomized testing
|
2019-10-30 22:37:18 +08:00
|
|
|
- name: Randomized tests
|
2019-06-17 22:36:20 +08:00
|
|
|
<<: *stage_linux
|
|
|
|
cache:
|
|
|
|
pip: true
|
|
|
|
directories:
|
|
|
|
- .hypothesis
|
|
|
|
script:
|
2019-10-16 04:45:37 +08:00
|
|
|
- pip install -U pip
|
2019-06-17 22:36:20 +08:00
|
|
|
- python setup.py build_ext --inplace
|
|
|
|
- pip install "qiskit-aer"
|
2019-06-21 03:18:58 +08:00
|
|
|
- make test_randomized
|
|
|
|
|
2019-10-30 22:37:18 +08:00
|
|
|
- name: Benchmarks
|
2019-06-21 03:18:58 +08:00
|
|
|
<<: *stage_linux
|
2019-10-29 00:59:41 +08:00
|
|
|
python: 3.5
|
2019-06-21 03:18:58 +08:00
|
|
|
script:
|
|
|
|
- python setup.py build_ext --inplace
|
|
|
|
- pip install "qiskit-aer"
|
|
|
|
- pip install "asv"
|
|
|
|
- git clone "https://www.github.com/Qiskit/qiskit" meta-qiskit
|
|
|
|
- >-
|
|
|
|
sed -i
|
|
|
|
-e 's/"repo": "https:\/\/github.com\/Qiskit\/qiskit-terra.git",/"repo": "..",/'
|
|
|
|
meta-qiskit/asv.conf.json
|
|
|
|
- cat meta-qiskit/asv.conf.json
|
|
|
|
- echo $TRAVIS_BRANCH
|
|
|
|
- echo $TRAVIS_PULL_REQUEST_BRANCH
|
|
|
|
- asv --config meta-qiskit/asv.conf.json machine --machine travis-ci
|
2019-11-08 07:25:33 +08:00
|
|
|
- travis_wait 45 asv --config meta-qiskit/asv.conf.json continuous --interleave-processes --machine travis-ci --no-only-changed --python 3.5 --bench 'converters.*(1|2|5|8|14|20|53)\,.8\)' --bench '^(transpiler_benchmarks|assembler|circuit_construction|isometry|import)\.' $([ "$TRAVIS_BRANCH" == "master" ] || echo "$TRAVIS_BRANCH") HEAD
|
2019-06-17 22:36:20 +08:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
allow_failures:
|
|
|
|
- name: Randomized tests
|
2019-06-21 03:18:58 +08:00
|
|
|
- name: Benchmarks
|