From 8f2aed19da538b33f988074ecb0f575339faf08b Mon Sep 17 00:00:00 2001 From: Adam Yoblick Date: Tue, 5 Nov 2024 13:18:52 -0600 Subject: [PATCH 1/2] Build pydevd binaries before running tests --- azure-pipelines/pipelines.yaml | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/azure-pipelines/pipelines.yaml b/azure-pipelines/pipelines.yaml index 4db7485ca..685d88aec 100644 --- a/azure-pipelines/pipelines.yaml +++ b/azure-pipelines/pipelines.yaml @@ -19,6 +19,7 @@ pr: variables: architecture: "x64" + PYDEVD_ATTACH_TO_PROCESS: src/debugpy/_vendored/pydevd/pydevd_attach_to_process jobs: @@ -78,6 +79,20 @@ jobs: - template: "templates/use_python.yml" + # Clean up old binaries + - task: DeleteFiles@1 + displayName: Clean up old binaries + inputs: + SourceFolder: $(Build.SourcesDirectory)/debugpy/$(PYDEVD_ATTACH_TO_PROCESS) + Contents: | + *.so + + # Build pydevd binaries + - task: Bash@3 + displayName: Build pydevd binaries + inputs: + filepath: $(Build.SourcesDirectory)/debugpy/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_linux.sh + - template: "templates/run_tests.yml" - job: "Test_MacOS" @@ -108,6 +123,20 @@ jobs: - script: "python -m ensurepip --user" displayName: "Bootstrap pip" + # Clean up old binaries + - task: DeleteFiles@1 + displayName: Clean up old binaries + inputs: + SourceFolder: $(Build.SourcesDirectory)/debugpy/$(PYDEVD_ATTACH_TO_PROCESS) + Contents: | + *.so + + # Build pydevd binaries + - task: Bash@3 + displayName: Build pydevd binaries + inputs: + filepath: $(Build.SourcesDirectory)/debugpy/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_mac.sh + - template: "templates/run_tests.yml" - job: "Test_Windows" @@ -135,4 +164,21 @@ jobs: - template: "templates/use_python.yml" + # Clean up old binaries + - task: DeleteFiles@1 + displayName: Clean up old binaries + inputs: + SourceFolder: $(Build.SourcesDirectory)\debugpy\$(PYDEVD_ATTACH_TO_PROCESS) + Contents: | + *.exe + *.dll + *.pdb + + # Build pydevd binaries + - task: BatchScript@1 + displayName: Build pydevd binaries + inputs: + filename: $(Build.SourcesDirectory)\debugpy\$(PYDEVD_ATTACH_TO_PROCESS)\windows\compile_windows.bat + workingFolder: $(Build.SourcesDirectory)\debugpy\$(PYDEVD_ATTACH_TO_PROCESS)\windows + - template: "templates/run_tests.yml" From 1eb92e64b13a94b25c571af0d85e615290f5b1d4 Mon Sep 17 00:00:00 2001 From: Adam Yoblick Date: Tue, 5 Nov 2024 13:33:38 -0600 Subject: [PATCH 2/2] Fix bad paths --- azure-pipelines/pipelines.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/azure-pipelines/pipelines.yaml b/azure-pipelines/pipelines.yaml index 685d88aec..fbf9de759 100644 --- a/azure-pipelines/pipelines.yaml +++ b/azure-pipelines/pipelines.yaml @@ -83,7 +83,7 @@ jobs: - task: DeleteFiles@1 displayName: Clean up old binaries inputs: - SourceFolder: $(Build.SourcesDirectory)/debugpy/$(PYDEVD_ATTACH_TO_PROCESS) + SourceFolder: $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS) Contents: | *.so @@ -91,7 +91,7 @@ jobs: - task: Bash@3 displayName: Build pydevd binaries inputs: - filepath: $(Build.SourcesDirectory)/debugpy/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_linux.sh + filepath: $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_linux.sh - template: "templates/run_tests.yml" @@ -127,7 +127,7 @@ jobs: - task: DeleteFiles@1 displayName: Clean up old binaries inputs: - SourceFolder: $(Build.SourcesDirectory)/debugpy/$(PYDEVD_ATTACH_TO_PROCESS) + SourceFolder: $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS) Contents: | *.so @@ -135,7 +135,7 @@ jobs: - task: Bash@3 displayName: Build pydevd binaries inputs: - filepath: $(Build.SourcesDirectory)/debugpy/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_mac.sh + filepath: $(Build.SourcesDirectory)/$(PYDEVD_ATTACH_TO_PROCESS)/linux_and_mac/compile_mac.sh - template: "templates/run_tests.yml" @@ -168,7 +168,7 @@ jobs: - task: DeleteFiles@1 displayName: Clean up old binaries inputs: - SourceFolder: $(Build.SourcesDirectory)\debugpy\$(PYDEVD_ATTACH_TO_PROCESS) + SourceFolder: $(Build.SourcesDirectory)\$(PYDEVD_ATTACH_TO_PROCESS) Contents: | *.exe *.dll @@ -178,7 +178,7 @@ jobs: - task: BatchScript@1 displayName: Build pydevd binaries inputs: - filename: $(Build.SourcesDirectory)\debugpy\$(PYDEVD_ATTACH_TO_PROCESS)\windows\compile_windows.bat - workingFolder: $(Build.SourcesDirectory)\debugpy\$(PYDEVD_ATTACH_TO_PROCESS)\windows + filename: $(Build.SourcesDirectory)\$(PYDEVD_ATTACH_TO_PROCESS)\windows\compile_windows.bat + workingFolder: $(Build.SourcesDirectory)\$(PYDEVD_ATTACH_TO_PROCESS)\windows - template: "templates/run_tests.yml"