forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
84 lines (78 loc) · 2.45 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This code is part of Qiskit.
#
# (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.
notifications:
email: false
cache:
pip: true
directories:
- .stestr
os: linux
dist: bionic
language: python
python: 3.7
install:
# Install step for jobs that require compilation and qa.
- pip install -U -r requirements.txt -c constraints.txt
- pip install -U -r requirements-dev.txt coveralls -c constraints.txt
- pip install -c constraints.txt -e .
- pip install "qiskit-ibmq-provider" -c constraints.txt
- pip install "qiskit-aer"
script:
# Compile the executables and run the tests.
- python setup.py build_ext --inplace
- export PYTHONHASHSEED=$(python -S -c "import random; print(random. randint(1, 4294967295))")
- echo "PYTHONHASHSEED=$PYTHONHASHSEED"
- stestr run
after_failure:
- python tools/report_ci_failure.py
jobs:
fast_finish: true
allow_failures:
- name: Randomized tests
include:
- name: Python 3.6 Tests and Coverage Linux
python: 3.6
env:
- PYTHON="coverage run --source qiskit --parallel-mode"
- QISKIT_TEST_CAPTURE_STREAMS=1
after_success:
- coverage combine || true
- coveralls || true
- coverage xml || true
- pip install diff-cover || true
- diff-cover --compare-branch main coverage.xml || true
# Randomized testing
- name: Randomized tests
cache:
pip: true
directories:
- .hypothesis
script:
- pip install -U pip
- python setup.py build_ext --inplace
- make test_randomized
- name: Build aarch64 wheels
arch: arm64
services:
- docker
install:
- echo ""
env:
- CIBW_BEFORE_BUILD="pip install -U Cython"
- CIBW_SKIP="cp27-* cp34-* cp35-* pp*"
- TWINE_USERNAME=qiskit
- CIBW_TEST_COMMAND="python {project}/examples/python/stochastic_swap.py"
if: tag IS present
script:
- pip install -U twine importlib-metadata keyring cibuildwheel==1.9.0
- cibuildwheel --output-dir wheelhouse
- twine upload wheelhouse/*