|
1 | 1 | trigger: |
2 | | -- main |
| 2 | + - main |
3 | 3 |
|
4 | 4 | pr: |
5 | | -- main |
| 5 | + - main |
6 | 6 |
|
7 | 7 | schedules: |
8 | | -- cron: "0 9 * * Sat" |
9 | | - displayName: 'Build for Component Governance' |
10 | | - branches: |
11 | | - include: |
12 | | - - main |
13 | | - always: true |
| 8 | + - cron: "0 9 * * Sat" |
| 9 | + displayName: "Build for Component Governance" |
| 10 | + branches: |
| 11 | + include: |
| 12 | + - main |
| 13 | + always: true |
14 | 14 |
|
15 | 15 | variables: |
16 | | -- name: QSHARP_PYTHON_TELEMETRY |
17 | | - value: none # Disable usage telemetry for internal test pipelines |
18 | | -- name: PYTEST_MAX_PARALLEL_TESTS |
19 | | - value: 'auto' |
| 16 | + - name: QSHARP_PYTHON_TELEMETRY |
| 17 | + value: none # Disable usage telemetry for internal test pipelines |
| 18 | + - name: PYTEST_MAX_PARALLEL_TESTS |
| 19 | + value: "auto" |
20 | 20 |
|
21 | 21 | jobs: |
22 | | -- job: "Build_Azure_Quantum_Python" |
23 | | - displayName: Build "azure-quantum" package |
24 | | - pool: |
25 | | - vmImage: 'windows-latest' |
26 | | - |
27 | | - steps: |
28 | | - - task: UsePythonVersion@0 |
29 | | - inputs: |
30 | | - versionSpec: '3.11' |
31 | | - displayName: Set Python version |
32 | | - |
33 | | - - script: | |
34 | | - pip install wheel |
35 | | - displayName: Install wheel |
36 | | -
|
37 | | - - script: | |
38 | | - pip freeze |
39 | | - displayName: List installed packages |
40 | | -
|
41 | | - - script: | |
42 | | - cd $(Build.SourcesDirectory)/azure-quantum |
43 | | - python setup.py sdist --dist-dir=target/wheels |
44 | | - python setup.py bdist_wheel --dist-dir=target/wheels |
45 | | - displayName: Build azure-quantum package |
46 | | -
|
47 | | - - publish: $(Build.SourcesDirectory)/azure-quantum/target/wheels/ |
48 | | - artifact: azure-quantum-wheels |
49 | | - displayName: Upload azure-quantum artifacts |
50 | | - |
51 | | -- job: "Test_Azure_Quantum_Python" |
52 | | - displayName: Test "azure-quantum" package |
53 | | - pool: |
54 | | - vmImage: 'windows-latest' |
55 | | - |
56 | | - steps: |
57 | | - - task: UsePythonVersion@0 |
58 | | - inputs: |
59 | | - versionSpec: '3.11' |
60 | | - displayName: Set Python version |
61 | | - |
62 | | - - script: | |
63 | | - python -m pip install --upgrade pip |
64 | | - pip install pytest pytest-azurepipelines pytest-cov pytest-xdist tox |
65 | | - displayName: Install test dependencies |
66 | | -
|
67 | | - - script: | |
68 | | - pip freeze |
69 | | - displayName: List installed packages |
70 | | - |
71 | | - - script: | |
72 | | - cd $(Build.SourcesDirectory)/azure-quantum |
73 | | - pip install ".[cirq,qsharp,dev]" |
74 | | - pytest --numprocesses $(PYTEST_MAX_PARALLEL_TESTS) --cov-report term --cov=azure.quantum --junitxml test-output-azure-quantum.xml --ignore tests/unit/test_qiskit.py --ignore tests/unit/test_session_qiskit.py $(Build.SourcesDirectory)/azure-quantum |
75 | | - displayName: Run azure-quantum unit tests |
76 | | -
|
77 | | - - script: | |
78 | | - cd $(Build.SourcesDirectory)/azure-quantum |
79 | | - tox -e py311-qiskit1,py311-qiskit2 |
80 | | - displayName: Run Qiskit matrix tests |
81 | | - |
82 | | - - task: PublishTestResults@2 |
83 | | - displayName: 'Publish tests results (python)' |
84 | | - condition: succeededOrFailed() |
85 | | - inputs: |
86 | | - testResultsFormat: 'JUnit' |
87 | | - testResultsFiles: '**/test-*.xml' |
88 | | - testRunTitle: 'Azure Quantum Python Tests' |
89 | | - |
90 | | - - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 |
91 | | - displayName: 'Component detection' |
| 22 | + - job: "Build_Azure_Quantum_Python" |
| 23 | + displayName: Build "azure-quantum" package |
| 24 | + pool: |
| 25 | + vmImage: "windows-latest" |
| 26 | + |
| 27 | + steps: |
| 28 | + - task: UsePythonVersion@0 |
| 29 | + inputs: |
| 30 | + versionSpec: "3.11" |
| 31 | + displayName: Set Python version |
| 32 | + |
| 33 | + - script: | |
| 34 | + pip install wheel |
| 35 | + displayName: Install wheel |
| 36 | +
|
| 37 | + - script: | |
| 38 | + pip freeze |
| 39 | + displayName: List installed packages |
| 40 | +
|
| 41 | + - script: | |
| 42 | + cd $(Build.SourcesDirectory)/azure-quantum |
| 43 | + python setup.py sdist --dist-dir=target/wheels |
| 44 | + python setup.py bdist_wheel --dist-dir=target/wheels |
| 45 | + displayName: Build azure-quantum package |
| 46 | +
|
| 47 | + - publish: $(Build.SourcesDirectory)/azure-quantum/target/wheels/ |
| 48 | + artifact: azure-quantum-wheels |
| 49 | + displayName: Upload azure-quantum artifacts |
| 50 | + |
| 51 | + - job: "Test_Azure_Quantum_Python" |
| 52 | + displayName: Test "azure-quantum" package |
| 53 | + pool: |
| 54 | + vmImage: "windows-latest" |
| 55 | + |
| 56 | + steps: |
| 57 | + - task: UsePythonVersion@0 |
| 58 | + inputs: |
| 59 | + versionSpec: "3.11" |
| 60 | + displayName: Set Python version |
| 61 | + |
| 62 | + - script: | |
| 63 | + python -m pip install --upgrade pip |
| 64 | + pip install pytest pytest-azurepipelines pytest-cov pytest-xdist tox |
| 65 | + displayName: Install test dependencies |
| 66 | +
|
| 67 | + - script: | |
| 68 | + pip freeze |
| 69 | + displayName: List installed packages |
| 70 | +
|
| 71 | + - script: | |
| 72 | + cd $(Build.SourcesDirectory)/azure-quantum |
| 73 | + pip install ".[cirq,qsharp,dev]" |
| 74 | + pytest --numprocesses $(PYTEST_MAX_PARALLEL_TESTS) --cov-report term --cov=azure.quantum --junitxml test-output-azure-quantum.xml --ignore tests/unit/test_qiskit.py --ignore tests/unit/test_session_qiskit.py $(Build.SourcesDirectory)/azure-quantum |
| 75 | + displayName: Run azure-quantum unit tests |
| 76 | +
|
| 77 | + - script: | |
| 78 | + cd $(Build.SourcesDirectory)/azure-quantum |
| 79 | + tox -e py311-qiskit1,py311-qiskit2 |
| 80 | + displayName: Run Qiskit matrix tests |
| 81 | +
|
| 82 | + - task: PublishTestResults@2 |
| 83 | + displayName: "Publish tests results (python)" |
| 84 | + condition: succeededOrFailed() |
| 85 | + inputs: |
| 86 | + testResultsFormat: "JUnit" |
| 87 | + testResultsFiles: "**/test-*.xml" |
| 88 | + testRunTitle: "Azure Quantum Python Tests" |
| 89 | + |
| 90 | + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 |
| 91 | + displayName: "Component detection" |
0 commit comments