Skip to content

Commit 6697c47

Browse files
authored
Nightly RC Verification Build for Python 3.13 (#37400)
* refactor the steps a bit. can we still build and test?
1 parent b551e02 commit 6697c47

File tree

3 files changed

+107
-135
lines changed

3 files changed

+107
-135
lines changed
Lines changed: 68 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -1,150 +1,84 @@
11
trigger:
22
- main
33

4-
jobs:
5-
6-
- job: Validate_RC_Python_Build_Windows
7-
displayName: Validate Release Candidate Python - Windows
8-
variables:
9-
skipComponentGovernanceDetection: true
10-
PythonVersion: '3.11.0-rc.1'
11-
12-
timeoutInMinutes: 90
13-
14-
pool:
15-
name: 'azsdk-pool-mms-win-2022-general'
4+
parameters:
5+
- name: RunNightlyTests
6+
type: boolean
7+
default: false
8+
- name: TargetedPackages
9+
type: string
10+
default: "azure-core,azure-keyvault*, azure-identity*, azure-storage-queue"
1611

17-
steps:
18-
- template: /eng/pipelines/templates/steps/use-python-version.yml
19-
parameters:
20-
versionSpec: $(PythonVersion)
21-
22-
- script: |
23-
python -m pip freeze
24-
python -m pip --version
25-
python -m pip install setuptools==72.2.0 wheel==0.37.0 tox==4.5.0 packaging==23.1 requests
26-
python -m pip install $(Build.SourcesDirectory)/tools/azure-sdk-tools[build]
27-
displayName: Install Dependencies
28-
29-
- template: /eng/common/testproxy/test-proxy-tool.yml
30-
parameters:
31-
runProxy: false
32-
33-
- script: |
34-
python ./scripts/devops_tasks/dispatch_tox.py "$(BuildTargetingString)" --junitxml="junit/test_results.xml" --toxenv="whl" --filter-type="None"
35-
displayName: 'Setup - Run Filtered Tests For Python $(PythonVersion)'
36-
env:
37-
YARL_NO_EXTENSIONS: 1
38-
AIOHTTP_NO_EXTENSIONS: 1
39-
PROXY_URL: "http://localhost:5000"
40-
continueOnError: true
41-
42-
- task: PublishTestResults@2
43-
condition: always()
44-
inputs:
45-
testResultsFiles: '**/*test*.xml'
46-
testRunTitle: 'Python $(PythonVersion)'
47-
failTaskOnFailedTests: true
12+
jobs:
4813

4914
- job: Validate_RC_Python_Build_Linux
5015
displayName: Validate Release Candidate Python - Linux
5116
variables:
5217
skipComponentGovernanceDetection: true
53-
PythonVersion: '3.11.0-rc.1'
54-
55-
timeoutInMinutes: 90
56-
57-
pool:
58-
name: 'azsdk-pool-mms-ubuntu-2004-general'
59-
60-
steps:
61-
- template: /eng/pipelines/templates/steps/use-python-version.yml
62-
parameters:
63-
versionSpec: $(PythonVersion)
64-
65-
- script: |
66-
sudo apt-get update
67-
sudo apt-get install build-essential -y
68-
python -m pip freeze
69-
python -m pip --version
70-
python -m pip install setuptools==72.2.0 wheel==0.37.0 tox==4.5.0 packaging==23.1 requests
71-
python -m pip install $(Build.SourcesDirectory)/tools/azure-sdk-tools[build]
72-
displayName: Install Dependencies
73-
74-
- template: /eng/common/testproxy/test-proxy-tool.yml
75-
parameters:
76-
runProxy: false
77-
78-
- script: |
79-
find /usr/lib -name "libffi.so*"
80-
ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6
81-
python ./scripts/devops_tasks/dispatch_tox.py "$(BuildTargetingString)" --junitxml="junit/test_results.xml" --toxenv="whl" --filter-type="None"
82-
displayName: 'Setup - Run Filtered Tests For Python $(PythonVersion)'
83-
env:
84-
YARL_NO_EXTENSIONS: 1
85-
AIOHTTP_NO_EXTENSIONS: 1
86-
PROXY_URL: "http://localhost:5000"
87-
continueOnError: true
88-
89-
- task: PublishTestResults@2
90-
condition: always()
91-
inputs:
92-
testResultsFiles: '**/*test*.xml'
93-
testRunTitle: 'Python $(PythonVersion)'
94-
failTaskOnFailedTests: true
95-
96-
- job: Validate_Nightly_Python_Build
97-
displayName: Validate Nightly Dev Python Build
98-
variables:
99-
skipComponentGovernanceDetection: true
18+
PythonVersion: '3.13.0-rc.2'
19+
TargetedPackages: ${{ parameters.TargetedPackages }}
10020

10121
timeoutInMinutes: 90
10222

10323
pool:
10424
name: 'azsdk-pool-mms-ubuntu-2004-general'
10525

10626
steps:
107-
- task: UsePythonVersion@0
108-
displayName: 'Use Python 3.9 For Build Tools'
109-
inputs:
110-
versionSpec: '3.9'
111-
112-
113-
- template: /eng/common/testproxy/test-proxy-tool.yml
114-
parameters:
115-
runProxy: false
116-
117-
- script: |
118-
sudo apt-get update
119-
sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev openssl libgdbm-dev liblzma-dev libreadline-dev libncursesw5-dev libffi-dev uuid-dev
120-
cd ~/
121-
git clone https://github.com/python/cpython.git
122-
cd cpython
123-
mkdir debug
124-
cd debug
125-
../configure --enable-optimizations --prefix=$HOME
126-
make
127-
make install
128-
export PATH=~/bin:$PATH
129-
export PATH=~/lib:$PATH
130-
export PATH=~/.local/bin:$PATH
131-
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
132-
python3 get-pip.py
133-
python3 -m pip install setuptools==72.2.0 wheel
134-
python3 -m pip install tox packaging twine beautifulsoup4
135-
python3 --version
136-
cd $(Build.SourcesDirectory)
137-
python3 ./scripts/devops_tasks/dispatch_tox.py "$(BuildTargetingString)" --junitxml="junit/test_results_38.xml" --toxenv="whl" --filter-type="None"
138-
displayName: 'Setup - Run Filtered Tests "Nightly" using Python Edge'
139-
env:
140-
YARL_NO_EXTENSIONS: 1
141-
PROXY_URL: "http://localhost:5000"
142-
AIOHTTP_NO_EXTENSIONS: 1
143-
continueOnError: true
144-
145-
- task: PublishTestResults@2
146-
condition: always()
147-
inputs:
148-
testResultsFiles: '**/junit/test-results.xml'
149-
testRunTitle: 'Python Nightly'
150-
failTaskOnFailedTests: true
27+
- template: ../steps/release-candidate-steps.yml
28+
29+
- ${{ if eq(parameters.RunNightlyTests, true) }}:
30+
- job: Validate_Nightly_Python_Build
31+
displayName: Validate Nightly Dev Python Build
32+
variables:
33+
skipComponentGovernanceDetection: true
34+
35+
timeoutInMinutes: 90
36+
37+
pool:
38+
name: 'azsdk-pool-mms-ubuntu-2004-general'
39+
40+
steps:
41+
- task: UsePythonVersion@0
42+
displayName: 'Use Python 3.9 For Build Tools'
43+
inputs:
44+
versionSpec: '3.9'
45+
46+
47+
- template: /eng/common/testproxy/test-proxy-tool.yml
48+
parameters:
49+
runProxy: false
50+
51+
- script: |
52+
sudo apt-get update
53+
sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev openssl libgdbm-dev liblzma-dev libreadline-dev libncursesw5-dev libffi-dev uuid-dev
54+
cd ~/
55+
git clone https://github.com/python/cpython.git
56+
cd cpython
57+
mkdir debug
58+
cd debug
59+
../configure --enable-optimizations --prefix=$HOME
60+
make
61+
make install
62+
export PATH=~/bin:$PATH
63+
export PATH=~/lib:$PATH
64+
export PATH=~/.local/bin:$PATH
65+
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
66+
python3 get-pip.py
67+
python3 -m pip install setuptools==72.2.0 wheel
68+
python3 -m pip install tox packaging twine beautifulsoup4
69+
python3 --version
70+
cd $(Build.SourcesDirectory)
71+
python3 ./scripts/devops_tasks/dispatch_tox.py "$(BuildTargetingString)" --junitxml="junit/test_results_38.xml" --toxenv="whl" --filter-type="None"
72+
displayName: 'Setup - Run Filtered Tests "Nightly" using Python Edge'
73+
env:
74+
YARL_NO_EXTENSIONS: 1
75+
PROXY_URL: "http://localhost:5000"
76+
AIOHTTP_NO_EXTENSIONS: 1
77+
continueOnError: true
78+
79+
- task: PublishTestResults@2
80+
condition: always()
81+
inputs:
82+
testResultsFiles: '**/junit/test-results.xml'
83+
testRunTitle: 'Python Nightly'
84+
failTaskOnFailedTests: true
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
steps:
2+
- template: /eng/pipelines/templates/steps/use-python-version.yml
3+
parameters:
4+
versionSpec: $(PythonVersion)
5+
6+
- template: /eng/pipelines/templates/steps/use-venv.yml
7+
parameters:
8+
Activate: false
9+
10+
- pwsh: |
11+
$(VENV_ACTIVATION_SCRIPT)
12+
$ErrorActionPreference = 'Stop'
13+
$PSNativeCommandUseErrorActionPreference = $true
14+
python -m pip install -r $(Build.SourcesDirectory)/eng/ci_tools.txt
15+
python -m pip freeze --all
16+
Write-Host (Get-Command python).Source
17+
displayName: 'Install Dependencies'
18+
19+
- template: /eng/common/testproxy/test-proxy-tool.yml
20+
parameters:
21+
runProxy: false
22+
23+
- pwsh: |
24+
$(VENV_ACTIVATION_SCRIPT)
25+
python ./scripts/devops_tasks/dispatch_tox.py "$(TargetedPackages)" --junitxml="junit/test_results.xml" --toxenv="whl" --filter-type="Build"
26+
displayName: 'Setup - Run Filtered Tests For Python $(PythonVersion)'
27+
env:
28+
YARL_NO_EXTENSIONS: 1
29+
AIOHTTP_NO_EXTENSIONS: 1
30+
PROXY_URL: "http://localhost:5000"
31+
continueOnError: true
32+
33+
- task: PublishTestResults@2
34+
condition: always()
35+
inputs:
36+
testResultsFiles: '**/*test*.xml'
37+
testRunTitle: 'Python $(PythonVersion)'
38+
failTaskOnFailedTests: true

scripts/devops_tasks/tox_harness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def compare_req_to_injected_reqs(parsed_req, injected_packages):
8282

8383
def inject_custom_reqs(file, injected_packages, package_dir):
8484
req_lines = []
85-
injected_packages = [p for p in re.split("[\s,]", injected_packages) if p]
85+
injected_packages = [p for p in re.split(r"[\s,]", injected_packages) if p]
8686

8787
if injected_packages:
8888
logging.info("Adding custom packages to requirements for {}".format(package_dir))

0 commit comments

Comments
 (0)