Skip to content

Commit 4ef463f

Browse files
committed
Run fewer Azure jobs
This new configuration means that all the Python versions are tested in a single CI job. This allows doing fewer checkouts and improves CI throughput overall. Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 4ab834f commit 4ef463f

File tree

2 files changed

+29
-32
lines changed

2 files changed

+29
-32
lines changed

Diff for: etc/ci/azure-posix.yml

+14-17
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,27 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
${{ each pyver in parameters.python_versions }}:
1716
${{ each tsuite in parameters.test_suites }}:
18-
${{ format('py{0} {1}', pyver, tsuite.key) }}:
19-
python_version: ${{ pyver }}
17+
${{ tsuite.key }}:
2018
test_suite_label: ${{ tsuite.key }}
2119
test_suite: ${{ tsuite.value }}
2220

2321
steps:
2422
- checkout: self
2523
fetchDepth: 10
2624

27-
- task: UsePythonVersion@0
28-
inputs:
29-
versionSpec: '$(python_version)'
30-
architecture: '${{ parameters.python_architecture }}'
31-
displayName: 'Install Python $(python_version)'
25+
- ${{ each pyver in parameters.python_versions }}:
26+
- task: UsePythonVersion@0
27+
inputs:
28+
versionSpec: '${{ pyver }}'
29+
architecture: '${{ parameters.python_architecture }}'
30+
displayName: '${{ pyver }} - Install Python'
3231

33-
- script: |
34-
python --version
35-
python3 --version
36-
python$(python_version) --version
37-
echo "python$(python_version)" > PYTHON_EXECUTABLE
38-
./configure --dev
39-
displayName: 'Run Configure'
32+
- script: |
33+
python${{ pyver }} --version
34+
echo "python${{ pyver }}" > PYTHON_EXECUTABLE
35+
./configure --clean && ./configure --dev
36+
displayName: '${{ pyver }} - Configure'
4037
41-
- script: $(test_suite)
42-
displayName: 'Run $(test_suite_label) tests with py$(python_version) on ${{ parameters.job_name }}'
38+
- script: $(test_suite)
39+
displayName: '${{ pyver }} - $(test_suite_label) on ${{ parameters.job_name }}'

Diff for: etc/ci/azure-win.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
${{ each pyver in parameters.python_versions }}:
1716
${{ each tsuite in parameters.test_suites }}:
18-
${{ format('py{0} {1}', pyver, tsuite.key) }}:
19-
python_version: ${{ pyver }}
17+
${{ tsuite.key }}:
2018
test_suite_label: ${{ tsuite.key }}
2119
test_suite: ${{ tsuite.value }}
20+
2221
steps:
2322
- checkout: self
2423
fetchDepth: 10
2524

26-
- task: UsePythonVersion@0
27-
inputs:
28-
versionSpec: '$(python_version)'
29-
architecture: '${{ parameters.python_architecture }}'
30-
displayName: 'Install Python $(python_version)'
25+
- ${{ each pyver in parameters.python_versions }}:
26+
- task: UsePythonVersion@0
27+
inputs:
28+
versionSpec: '${{ pyver }}'
29+
architecture: '${{ parameters.python_architecture }}'
30+
displayName: '${{ pyver }} - Install Python'
3131

32-
- script: |
33-
python --version
34-
echo | set /p=python> PYTHON_EXECUTABLE
35-
configure --dev
36-
displayName: 'Run Configure'
32+
- script: |
33+
python --version
34+
echo | set /p=python> PYTHON_EXECUTABLE
35+
configure --clean && configure --dev
36+
displayName: '${{ pyver }} - Configure'
3737
38-
- script: $(test_suite)
39-
displayName: 'Run $(test_suite_label) tests with py$(python_version) on ${{ parameters.job_name }}'
38+
- script: $(test_suite)
39+
displayName: '${{ pyver }} - $(test_suite_label) on ${{ parameters.job_name }}'

0 commit comments

Comments
 (0)