-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy path.travis.yml
69 lines (62 loc) · 2.64 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
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019.
#
# 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:
on_success: change
on_failure: always
cache: pip
os: linux
dist: trusty
language: python
python:
- "3.6"
env:
- DEPENDENCY_BRANCH=$(if [ "$TRAVIS_BRANCH" = "stable" ]; then echo "stable"; else echo "master"; fi)
before_install:
- |
INIT_FILE="$TRAVIS_BUILD_DIR/qiskit/__init__.py"
if [ -f $INIT_FILE ]; then
# stops travis if __init__.py exists under qiskit
echo "File '$INIT_FILE' found. It should not exist, since this repo extends qiskit namespace.";
travis_terminate 1;
fi
# Install Dependencies
- pip install --upgrade pip setuptools wheel
# Download github Terra
- wget https://codeload.github.com/Qiskit/qiskit-terra/zip/$DEPENDENCY_BRANCH -O /tmp/qiskit-terra.zip
- unzip /tmp/qiskit-terra.zip -d /tmp/
# Install Qiskit Terra requirements.
- pip install -U -r /tmp/qiskit-terra-$DEPENDENCY_BRANCH/requirements-dev.txt --progress-bar off
# Install local Qiskit Terra
- pip install -e /tmp/qiskit-terra-$DEPENDENCY_BRANCH --progress-bar off
# Download github Ignis
- wget https://codeload.github.com/Qiskit/qiskit-ignis/zip/$DEPENDENCY_BRANCH -O /tmp/qiskit-ignis.zip
- unzip /tmp/qiskit-ignis.zip -d /tmp/
# Install local Qiskit Ignis
- pip install -e /tmp/qiskit-ignis-$DEPENDENCY_BRANCH --progress-bar off
# download Qiskit Aqua and unzip it
- wget https://codeload.github.com/Qiskit/qiskit-aqua/zip/$DEPENDENCY_BRANCH -O /tmp/qiskit-aqua.zip
- unzip /tmp/qiskit-aqua.zip -d /tmp/
# Install local Qiskit Aqua
- pip install -e /tmp/qiskit-aqua-$DEPENDENCY_BRANCH --progress-bar off
# download PyQuante master and unzip it
- wget https://codeload.github.com/rpmuller/pyquante2/zip/master -O /tmp/pyquante2.zip
- unzip /tmp/pyquante2.zip -d /tmp/
# Install local PyQuante
- pip install -e /tmp/pyquante2-master --progress-bar off
# Test
install:
# install Chemistry and dev requirements
- pip install -U -r requirements-dev.txt --progress-bar off
- pip install -e $TRAVIS_BUILD_DIR --progress-bar off
script:
# Remove OpenBLAS warning message when compiled without USE_OPENMP=1 in PySCF
- make style && make lint && export OPENBLAS_NUM_THREADS=1 && python -m unittest discover -v test