@@ -15,170 +15,233 @@ pr:
1515 include :
1616 - main
1717 - release/*
18- drafts : " false"
18+ drafts : false
1919
2020variables :
21- architecture : " x64"
21+ architecture : x64
2222 PYDEVD_ATTACH_TO_PROCESS : src/debugpy/_vendored/pydevd/pydevd_attach_to_process
2323
24- jobs :
24+ stages :
2525
26- - job : " Lint"
27- timeoutInMinutes : " 5 "
28- displayName : " Lint"
29- pool : { vmImage: "ubuntu-latest" }
26+ - stage : Lint
27+ jobs :
28+ - job : Lint
29+ timeoutInMinutes : 5
3030
31- variables :
32- python.version : " 3.9 "
31+ pool :
32+ vmImage : ubuntu-latest
3333
34- steps :
35-
36- - template : " templates/use_python.yml"
34+ variables :
35+ python.version : " 3.9"
3736
38- # Install and run ruff
39- # See https://github.com/astral-sh/ruff and https://beta.ruff.rs/docs/
40- - script : " python3 -m pip install -U ruff"
41- displayName : " Install ruff"
37+ steps :
38+
39+ - template : templates/use_python.yml
40+
41+ # Install and run ruff
42+ # See https://github.com/astral-sh/ruff and https://beta.ruff.rs/docs/
43+ - script : python3 -m pip install -U ruff
44+ displayName : Install ruff
45+
46+ # Run linter
47+ - script : python3 -m ruff check --output-format=junit --output-file=$(Build.ArtifactStagingDirectory)/lint-ruff.xml .
48+ displayName : Run ruff
49+
50+ # Publish results, even on failure
51+ - task : PublishTestResults@2
52+ displayName : Publish linting results
53+ inputs :
54+ testRunTitle : $(Agent.JobName)
55+ testResultsFiles : lint-*.xml
56+ searchFolder : $(Build.ArtifactStagingDirectory)
57+ condition : always()
58+
59+ - stage : Pydevd
60+ jobs :
61+ - job : Build
62+ displayName : Build
63+
64+ strategy :
65+ matrix :
66+ Windows :
67+ image : windows-latest
68+ contents : |
69+ *.exe
70+ *.dll
71+ *.pdb
72+ script : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/windows/compile_windows.bat
73+ workingDirectory : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/windows
74+ macOS :
75+ image : macOS-latest
76+ contents : |
77+ *.dylib
78+ script : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_mac.sh
79+ workingDirectory : $(System.DefaultWorkingDirectory)
80+ Linux :
81+ image : ubuntu-latest
82+ contents : |
83+ *.so
84+ script : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_linux.sh
85+ workingDirectory : $(System.DefaultWorkingDirectory)
86+
87+ pool :
88+ vmImage : $(image)
89+
90+ steps :
91+
92+ # Clean up old binaries
93+ - task : DeleteFiles@1
94+ displayName : Clean up old binaries
95+ inputs :
96+ SourceFolder : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
97+ Contents : $(contents)
98+
99+ # Build pydevd binaries
100+ - script : $(script)
101+ displayName : Build pydevd binaries
102+ workingDirectory : $(workingDirectory)
42103
43- - script : " python3 -m ruff check --output-format=junit --output-file=$(Build.ArtifactStagingDirectory)/lint-ruff.xml ."
44- displayName : " Run ruff"
45-
46- - task : " PublishTestResults@2"
47- displayName : " Publish linting results"
48- inputs :
49- testRunTitle : " $(Agent.JobName)"
50- testResultsFiles : " lint-*.xml"
51- searchFolder : " $(Build.ArtifactStagingDirectory)"
52- condition : " always()"
53-
54- - job : " Test_Linux"
55- timeoutInMinutes : " 30"
56- displayName : " Tests - Linux"
57- pool : { vmImage: "ubuntu-latest" }
58-
59- strategy :
60- matrix :
61- py39 :
62- python.version : " 3.9"
63- py310 :
64- python.version : " 3.10"
65- py311 :
66- python.version : " 3.11"
67- py312 :
68- python.version : " 3.12"
69- py313 :
70- python.version : " 3.13"
71-
72- steps :
73-
74- - script : |
75- sudo apt-get update
76- sudo apt-get --yes install gdb
77- sudo sysctl kernel.yama.ptrace_scope=0
78- displayName: "Setup gdb"
79-
80- - template : " templates/use_python.yml"
81-
82- # Clean up old binaries
83- - task : DeleteFiles@1
84- displayName : Clean up old binaries
85- inputs :
86- SourceFolder : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
87- Contents : |
88- *.so
89-
90- # Build pydevd binaries
91- - task : Bash@3
92- displayName : Build pydevd binaries
93- inputs :
94- filepath : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_linux.sh
95-
96- - template : " templates/run_tests.yml"
97-
98- - job : " Test_MacOS"
99- timeoutInMinutes : " 30"
100- displayName : " Tests - macOS"
101- pool : { vmImage: "macOS-latest" }
102-
103- strategy :
104- matrix :
105- py39 :
106- python.version : " 3.9"
107- py310 :
108- python.version : " 3.10"
109- py311 :
110- python.version : " 3.11"
111- py312 :
112- python.version : " 3.12"
113- py313 :
114- python.version : " 3.13"
115-
116- steps :
117-
118- - script : " ulimit -Sn 8192"
119- displayName : " Increase file descriptor limit"
120-
121- - template : " templates/use_python.yml"
122-
123- - script : " python -m ensurepip --user"
124- displayName : " Bootstrap pip"
125-
126- # Clean up old binaries
127- - task : DeleteFiles@1
128- displayName : Clean up old binaries
129- inputs :
130- SourceFolder : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
131- Contents : |
132- *.so
133-
134- # Build pydevd binaries
135- - task : Bash@3
136- displayName : Build pydevd binaries
137- inputs :
138- filepath : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_mac.sh
139-
140- - template : " templates/run_tests.yml"
141-
142- - job : " Test_Windows"
143- timeoutInMinutes : " 40"
144- displayName : " Tests - Windows"
145- pool : { vmImage: "windows-latest" }
146-
147- strategy :
148- matrix :
149- py39 :
150- python.version : " 3.9"
151- py39_32 :
152- python.version : " 3.9"
153- architecture : " x86"
154- py310 :
155- python.version : " 3.10"
156- py311 :
157- python.version : " 3.11"
158- py312 :
159- python.version : " 3.12"
160- py313 :
161- python.version : " 3.13"
162-
163- steps :
164-
165- - template : " templates/use_python.yml"
166-
167- # Clean up old binaries
168- - task : DeleteFiles@1
169- displayName : Clean up old binaries
170- inputs :
171- SourceFolder : $(Build.SourcesDirectory)\$(PYDEVD_ATTACH_TO_PROCESS)
172- Contents : |
173- *.exe
174- *.dll
175- *.pdb
176-
177- # Build pydevd binaries
178- - task : BatchScript@1
179- displayName : Build pydevd binaries
180- inputs :
181- filename : $(Build.SourcesDirectory)\$(PYDEVD_ATTACH_TO_PROCESS)\windows\compile_windows.bat
182- workingFolder : $(Build.SourcesDirectory)\$(PYDEVD_ATTACH_TO_PROCESS)\windows
183-
184- - template : " templates/run_tests.yml"
104+ # copy pydevd binaries
105+ - task : CopyFiles@2
106+ displayName : Copy pydevd binaries
107+ inputs :
108+ SourceFolder : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
109+ Contents : $(contents)
110+ TargetFolder : $(Build.ArtifactStagingDirectory)
111+
112+ # Publish pydevd binaries
113+ - task : PublishBuildArtifacts@1
114+ displayName : Publish pydevd binaries
115+ inputs :
116+ artifactName : pydevd binaries
117+ pathToPublish : $(Build.ArtifactStagingDirectory)
118+
119+ - stage : Test
120+ dependsOn : Pydevd
121+ jobs :
122+
123+ - job : Tests_Linux
124+ displayName : Tests - Linux
125+ timeoutInMinutes : 30
126+ pool :
127+ vmImage : ubuntu-latest
128+
129+ strategy :
130+ matrix :
131+ py39 :
132+ python.version : 3.9
133+ py310 :
134+ python.version : 3.10
135+ py311 :
136+ python.version : 3.11
137+ py312 :
138+ python.version : 3.12
139+ py313 :
140+ python.version : 3.13
141+
142+ steps :
143+
144+ - script : |
145+ sudo apt-get update
146+ sudo apt-get --yes install gdb
147+ sudo sysctl kernel.yama.ptrace_scope=0
148+ displayName: Setup gdb
149+
150+ - template : templates/use_python.yml
151+
152+ # download pydevd binaries
153+ - download : current
154+ displayName : Download pydevd binaries
155+ artifact : pydevd binaries
156+
157+ # copy pydevd binaries
158+ - task : CopyFiles@2
159+ displayName : Copy pydevd binaries
160+ inputs :
161+ SourceFolder : $(Pipeline.Workspace)/pydevd binaries
162+ TargetFolder : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
163+
164+ - template : templates/run_tests.yml
165+
166+ - job : Tests_Mac
167+ timeoutInMinutes : 30
168+ displayName : Tests - macOS
169+ pool :
170+ vmImage : macOS-latest
171+
172+ strategy :
173+ matrix :
174+ py39 :
175+ python.version : 3.9
176+ py310 :
177+ python.version : 3.10
178+ py311 :
179+ python.version : 3.11
180+ py312 :
181+ python.version : 3.12
182+ py313 :
183+ python.version : 3.13
184+
185+ steps :
186+
187+ - script : ulimit -Sn 8192
188+ displayName : Increase file descriptor limit
189+
190+ - template : templates/use_python.yml
191+
192+ - script : python -m ensurepip --user
193+ displayName : Bootstrap pip
194+
195+ # download pydevd binaries
196+ - download : current
197+ displayName : Download pydevd binaries
198+ artifact : pydevd binaries
199+
200+ # copy pydevd binaries
201+ - task : CopyFiles@2
202+ displayName : Copy pydevd binaries
203+ inputs :
204+ SourceFolder : $(Pipeline.Workspace)/pydevd binaries
205+ TargetFolder : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
206+
207+ - template : templates/run_tests.yml
208+
209+ - job : Test_Windows
210+ timeoutInMinutes : 40
211+ displayName : Tests - Windows
212+ pool :
213+ vmImage : windows-latest
214+
215+ strategy :
216+ matrix :
217+ py39 :
218+ python.version : 3.9
219+ py39_32 :
220+ python.version : 3.9
221+ architecture : x86
222+ py310 :
223+ python.version : 3.10
224+ py311 :
225+ python.version : 3.11
226+ py312 :
227+ python.version : 3.12
228+ py313 :
229+ python.version : 3.13
230+
231+ steps :
232+
233+ - template : templates/use_python.yml
234+
235+ # download pydevd binaries
236+ - download : current
237+ displayName : Download pydevd binaries
238+ artifact : pydevd binaries
239+
240+ # copy pydevd binaries
241+ - task : CopyFiles@2
242+ displayName : Copy pydevd binaries
243+ inputs :
244+ SourceFolder : $(Pipeline.Workspace)/pydevd binaries
245+ TargetFolder : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
246+
247+ - template : templates/run_tests.yml
0 commit comments