@@ -51,10 +51,69 @@ jobs:
5151 searchFolder : " $(Build.ArtifactStagingDirectory)"
5252 condition : " always()"
5353
54+ - job : pydevd_binaries
55+ displayName : Build pydevd binaries
56+
57+ strategy :
58+ matrix :
59+ windows :
60+ image : windows-latest
61+ contents : |
62+ *.exe
63+ *.dll
64+ *.pdb
65+ script : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/windows/compile_windows.bat
66+ workingDirectory : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/windows
67+ mac :
68+ image : macOS-latest
69+ contents : |
70+ *.dylib
71+ script : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_mac.sh
72+ workingDirectory : $(System.DefaultWorkingDirectory)
73+ linux :
74+ image : ubuntu-latest
75+ contents : |
76+ *.so
77+ script : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_linux.sh
78+ workingDirectory : $(System.DefaultWorkingDirectory)
79+
80+ pool :
81+ vmImage : $(image)
82+
83+ steps :
84+
85+ # Clean up old binaries
86+ - task : DeleteFiles@1
87+ displayName : Clean up old binaries
88+ inputs :
89+ SourceFolder : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
90+ Contents : $(contents)
91+
92+ # Build pydevd binaries
93+ - script : $(script)
94+ displayName : Build pydevd binaries
95+ workingDirectory : $(workingDirectory)
96+
97+ # copy pydevd binaries
98+ - task : CopyFiles@2
99+ displayName : Copy pydevd binaries
100+ inputs :
101+ SourceFolder : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
102+ Contents : $(contents)
103+ TargetFolder : $(Build.ArtifactStagingDirectory)
104+
105+ # Publish pydevd binaries
106+ - task : PublishBuildArtifacts@1
107+ displayName : Publish pydevd binaries
108+ inputs :
109+ artifactName : pydevd binaries
110+ pathToPublish : $(Build.ArtifactStagingDirectory)
111+
54112 - job : " Test_Linux"
55113 timeoutInMinutes : " 30"
56114 displayName : " Tests - Linux"
57115 pool : { vmImage: "ubuntu-latest" }
116+ dependsOn : pydevd_binaries
58117
59118 strategy :
60119 matrix :
@@ -79,26 +138,21 @@ jobs:
79138
80139 - template : " templates/use_python.yml"
81140
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
141+ # download pydevd binaries
142+ - task : DownloadBuildArtifacts@1
143+ displayName : Download pydevd binaries
93144 inputs :
94- filepath : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_linux.sh
145+ buildType : current
146+ artifactName : pydevd binaries
147+ downloadPath : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
95148
96149 - template : " templates/run_tests.yml"
97150
98151 - job : " Test_MacOS"
99152 timeoutInMinutes : " 30"
100153 displayName : " Tests - macOS"
101154 pool : { vmImage: "macOS-latest" }
155+ dependsOn : pydevd_binaries
102156
103157 strategy :
104158 matrix :
@@ -123,26 +177,21 @@ jobs:
123177 - script : " python -m ensurepip --user"
124178 displayName : " Bootstrap pip"
125179
126- # Clean up old binaries
127- - task : DeleteFiles @1
128- displayName : Clean up old binaries
180+ # download pydevd binaries
181+ - task : DownloadBuildArtifacts @1
182+ displayName : Download pydevd binaries
129183 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
184+ buildType : current
185+ artifactName : pydevd binaries
186+ downloadPath : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
139187
140188 - template : " templates/run_tests.yml"
141189
142190 - job : " Test_Windows"
143191 timeoutInMinutes : " 40"
144192 displayName : " Tests - Windows"
145193 pool : { vmImage: "windows-latest" }
194+ dependsOn : pydevd_binaries
146195
147196 strategy :
148197 matrix :
@@ -164,21 +213,12 @@ jobs:
164213
165214 - template : " templates/use_python.yml"
166215
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
216+ # download pydevd binaries
217+ - task : DownloadBuildArtifacts@1
218+ displayName : Download pydevd binaries
180219 inputs :
181- filename : $(Build.SourcesDirectory)\$(PYDEVD_ATTACH_TO_PROCESS)\windows\compile_windows.bat
182- workingFolder : $(Build.SourcesDirectory)\$(PYDEVD_ATTACH_TO_PROCESS)\windows
220+ buildType : current
221+ artifactName : pydevd binaries
222+ downloadPath : $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)
183223
184224 - template : " templates/run_tests.yml"
0 commit comments