Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .ado/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ variables:
value: none # Disable usage telemetry for internal test pipelines
- name: PYTEST_MAX_PARALLEL_TESTS
value: "auto"
# Azure Artifacts feed (with a PyPI upstream source) that pip restores from, so the
# build does not connect directly to public pypi.org / files.pythonhosted.org (CFS).
# Project-scoped: "<Project>/<FeedName>".
- name: PipFeed
value: "AzureQuantum/azure-quantum"
# Stop pip from contacting pypi.org for its "is there a newer pip?" self-check.
- name: PIP_DISABLE_PIP_VERSION_CHECK
value: "1"

jobs:
- job: "Build_Azure_Quantum_Python"
Expand All @@ -30,6 +38,12 @@ jobs:
versionSpec: "3.11"
displayName: Set Python version

- task: PipAuthenticate@1
displayName: Authenticate pip to Azure Artifacts feed
inputs:
artifactFeeds: $(PipFeed)
onlyAddExtraIndex: false

- script: |
pip install wheel
displayName: Install wheel
Expand Down Expand Up @@ -59,6 +73,12 @@ jobs:
versionSpec: "3.11"
displayName: Set Python version

- task: PipAuthenticate@1
displayName: Authenticate pip to Azure Artifacts feed
inputs:
artifactFeeds: $(PipFeed)
onlyAddExtraIndex: false

- script: |
python -m pip install --upgrade pip
pip install pytest pytest-azurepipelines pytest-cov pytest-xdist tox
Expand Down
5 changes: 5 additions & 0 deletions .ado/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ variables:
value: "auto"
- name: PipFeed
value: "AzureQuantum/azure-quantum"
# Stop pip from contacting pypi.org for its "is there a newer pip?" self-check.
# This version check ignores PIP_INDEX_URL and is a common lingering CFS offender.
- name: PIP_DISABLE_PIP_VERSION_CHECK
value: "1"

resources:
repositories:
Expand Down Expand Up @@ -140,6 +144,7 @@ extends:

- script: |
cd $(Build.SourcesDirectory)/azure-quantum
python -c "import os, urllib.parse as u; h = u.urlsplit(os.environ.get('PIP_INDEX_URL', '')).hostname or '(unset -> default pypi.org)'; print('pip index host:', h)"
tox -e py311-qiskit1,py311-qiskit2
displayName: Run Qiskit matrix tests

Expand Down
7 changes: 7 additions & 0 deletions azure-quantum/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ basepython =
passenv =
PIP_INDEX_URL
PIP_EXTRA_INDEX_URL
# Explicitly re-assert the feed index inside each isolated environment. Relying on
# passenv alone proved unreliable (tox's inner pip fell back to pypi.org). The
# fallback keeps local dev working when PIP_INDEX_URL is unset. Also disable pip's
# pypi.org version self-check, which ignores the index URL.
setenv =
PIP_INDEX_URL = {env:PIP_INDEX_URL:https://pypi.org/simple}
PIP_DISABLE_PIP_VERSION_CHECK = 1
allowlist_externals = pytest
deps =
qiskit1: qiskit<2
Expand Down
Loading