mirror of https://github.com/Qiskit/qiskit.git
78 lines
2.4 KiB
YAML
78 lines
2.4 KiB
YAML
# 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.
|
|
|
|
version: 1.0.{build}
|
|
|
|
environment:
|
|
matrix:
|
|
- PYTHON: C:\Python37
|
|
TAG_SCENARIO: false
|
|
MPLBACKEND: ps
|
|
- WHEEL: 1
|
|
PYTHON: C:\Python35
|
|
CIBW_BEFORE_BUILD: pip install -U Cython
|
|
CIBW_SKIP: cp27-* cp34-*
|
|
TWINE_USERNAME: qiskit
|
|
CIBW_TEST_COMMAND: python {project}\examples\python\stochastic_swap.py
|
|
TAG_SCENARIO: true
|
|
|
|
# Set Travis CI variables for skipping the CI-unavailable tests.
|
|
TRAVIS_PULL_REQUEST_SLUG: invalid
|
|
TRAVIS_REPO_SLUG: invalid-but-different
|
|
|
|
for:
|
|
-
|
|
# non-tagged scenario
|
|
matrix:
|
|
only:
|
|
- TAG_SCENARIO: false
|
|
|
|
skip_tags: true
|
|
|
|
-
|
|
# tagged scenario
|
|
matrix:
|
|
only:
|
|
- TAG_SCENARIO: true
|
|
|
|
skip_non_tags: true
|
|
|
|
|
|
build: false
|
|
deploy: false
|
|
|
|
skip_branch_with_pr: true
|
|
|
|
build_script:
|
|
- if defined WHEEL (pip install cibuildwheel==0.10.1)
|
|
- if defined WHEEL (pip install -U twine)
|
|
- if defined WHEEL (cibuildwheel --output-dir wheelhouse)
|
|
- if defined WHEEL (twine upload wheelhouse\*)
|
|
artifacts:
|
|
- path: "wheelhouse\\*.whl"
|
|
name: Wheels
|
|
install:
|
|
# If there is a newer build queued for the same PR, cancel this one.
|
|
# The AppVeyor 'rollout builds' option is supposed to serve the same
|
|
# purpose but it is problematic because it tends to cancel builds pushed
|
|
# directly to master instead of just PR builds (or the converse).
|
|
# credits: JuliaLang developers.
|
|
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
|
|
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
|
|
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
|
|
throw "There are newer queued builds for this pull request, failing early." }
|
|
test_script:
|
|
- true
|
|
|
|
on_failure:
|
|
- appveyor PushArtifact wheelhouse\*whl
|