# 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 stage_generic: &stage_generic 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 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 stage_linux: &stage_linux <<: *stage_generic os: linux dist: bionic language: python python: 3.7 jobs: include: - name: Python 3.6 Tests and Coverage Linux <<: *stage_linux python: 3.6 env: - PYTHON="coverage run --source qiskit --parallel-mode" after_success: - coverage combine || true - coveralls || true - coverage xml || true - pip install diff-cover || true - diff-cover --compare-branch master coverage.xml || true # Randomized testing - name: Randomized tests <<: *stage_linux cache: pip: true directories: - .hypothesis script: - pip install -U pip - python setup.py build_ext --inplace - pip install "qiskit-aer" - make test_randomized - name: Benchmarks <<: *stage_linux python: 3.5 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 - 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 matrix: fast_finish: true allow_failures: - name: Randomized tests - name: Benchmarks