@@ -26,6 +26,7 @@ python: 3.7
26
26
env :
27
27
global :
28
28
- INIT_FILE="$TRAVIS_BUILD_DIR/qiskit/__init__.py"
29
+ - DEPENDENCY_BRANCH=$(if [[ "$TRAVIS_BRANCH" == stable* ]]; then echo "stable"; else echo "master"; fi)
29
30
30
31
before_script :
31
32
- |
@@ -96,51 +97,42 @@ matrix:
96
97
- name : " Lint and Style check and Test Chemistry Python 3.7"
97
98
if : tag IS blank
98
99
env :
99
- - DEPENDENCY_BRANCH=$(if [[ "$TRAVIS_BRANCH" == stable* ]]; then echo "stable"; else echo "master"; fi)
100
100
- TEST_DIR=chemistry
101
101
script :
102
102
make spell && make style && make lint && export OPENBLAS_NUM_THREADS=1 && python -m unittest discover -v test/chemistry
103
- - name : Test Chemistry Python 3.8"
103
+ - name : " Test Chemistry Python 3.8"
104
104
if : tag IS blank
105
105
env :
106
- - DEPENDENCY_BRANCH=master
107
106
- TEST_DIR=chemistry
108
107
python : 3.8
109
108
script :
110
109
export OPENBLAS_NUM_THREADS=1 && python -m unittest discover -v test/chemistry
111
110
- name : " Test Aqua Python 3.7"
112
111
if : tag IS blank
113
- env : DEPENDENCY_BRANCH=$(if [[ "$TRAVIS_BRANCH" == stable* ]]; then echo "stable"; else echo "master"; fi)
114
112
script : stestr --test-path test run --blacklist-file blacklist.txt
115
113
- name : " Test Aqua Python 3.8"
116
114
if : tag IS blank
117
115
python : 3.8
118
- env : DEPENDENCY_BRANCH=master
119
116
script : stestr --test-path test run --blacklist-file blacklist.txt
120
117
- name : " Test Aqua 2 Python 3.7"
121
118
if : tag IS blank
122
- env : DEPENDENCY_BRANCH=$(if [[ "$TRAVIS_BRANCH" == stable* ]]; then echo "stable"; else echo "master"; fi)
123
119
script : stestr --test-path test run --whitelist-file selection.txt
124
120
- name : " Test Aqua 2 Python 3.8"
125
121
if : tag IS blank
126
122
python : 3.8
127
- env : DEPENDENCY_BRANCH=master
128
123
script : stestr --test-path test run --whitelist-file selection.txt
129
124
- name : " Test Aqua 3 Python 3.7"
130
125
if : tag IS blank
131
- env : DEPENDENCY_BRANCH=$(if [[ "$TRAVIS_BRANCH" == stable* ]]; then echo "stable"; else echo "master"; fi)
132
126
script : stestr --test-path test run --whitelist-file selection2.txt
133
127
- name : " Test Aqua 3 Python 3.8"
134
128
if : tag IS blank
135
129
python : 3.8
136
- env : DEPENDENCY_BRANCH=master
137
130
script : stestr --test-path test run --whitelist-file selection2.txt
138
131
139
132
- if : tag IS present
140
133
python : 3.6
141
134
env :
142
135
- TWINE_USERNAME=qiskit
143
- - DEPENDENCY_BRANCH=$(if [[ "$TRAVIS_BRANCH" == stable* ]]; then echo "stable"; else echo "master"; fi)
144
136
install : pip install -U twine
145
137
script :
146
138
- python3 setup.py sdist bdist_wheel
@@ -149,6 +141,7 @@ matrix:
149
141
before_install :
150
142
- pip install -U 'pip<20.0.0'
151
143
- pip install -U setuptools wheel
144
+ - pip install -U numpy
152
145
- |
153
146
if [ -f $INIT_FILE ]; then
154
147
# stops travis if __init__.py exists under qiskit
@@ -172,20 +165,20 @@ before_install:
172
165
unzip /tmp/qiskit-ignis.zip -d /tmp/
173
166
# Install local Qiskit Ignis
174
167
pip install -e /tmp/qiskit-ignis-$DEPENDENCY_BRANCH --progress-bar off
175
- # Download github Qiskit Aer
176
- wget https://codeload.github.com/Qiskit/qiskit-aer/zip/$DEPENDENCY_BRANCH -O /tmp/qiskit-aer.zip
177
- unzip /tmp/qiskit-aer.zip -d /tmp/
178
- # Install Qiskit Aer requirements.
179
- pip install -U -r /tmp/qiskit-aer-$DEPENDENCY_BRANCH/requirements-dev.txt --progress-bar off
180
- # build Qiskit Aer
168
+ # Clone Qiskit Aer
169
+ git clone --recurse-submodules https://github.com/Qiskit/qiskit-aer.git /tmp/qiskit-aer-$DEPENDENCY_BRANCH
181
170
cd /tmp/qiskit-aer-$DEPENDENCY_BRANCH
182
- python setup.py bdist_wheel -- -DCMAKE_CXX_COMPILER=g++-7 -- -j4
171
+ # Install Qiskit Aer requirements.
172
+ pip install -U -r requirements-dev.txt --progress-bar off
173
+ # Build Qiskit Aer with Thrust OpenMP CPU backend
174
+ python setup.py bdist_wheel -- -DCMAKE_CXX_COMPILER=g++-7 -DAER_THRUST_BACKEND=OMP -- -j4
183
175
pip install dist/qiskit_aer*whl
184
176
# back to current repo directory
185
177
cd $TRAVIS_BUILD_DIR
186
178
fi
187
179
- |
188
180
if [ "$TEST_DIR" == "chemistry" ]; then
181
+ sudo apt-get -y install libgfortran5
189
182
# download PyQuante master and unzip it
190
183
wget https://codeload.github.com/rpmuller/pyquante2/zip/master -O /tmp/pyquante2.zip
191
184
unzip /tmp/pyquante2.zip -d /tmp/
0 commit comments