Repository navigation
159 lines (139 loc) · 5.25 KB
/
Copy pathpr-validation.yml
File metadata and controls
159 lines (139 loc) · 5.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# PR validation and CI builds for the debugpy public repo.
# Separate internal pipelines are used for generating wheels, signing, and releasing to pypi.org.
name: PR validation
on:
push:
branches:
- main
- release/*
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
PYDEVD_ATTACH_TO_PROCESS: src/debugpy/_vendored/pydevd/pydevd_attach_to_process
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.10"
- name: Install ruff
run: python -m pip install -U ruff
- name: Run ruff
run: python -m ruff check --output-format=github .
build-pydevd:
name: Build pydevd binaries - ${{ matrix.os }}
runs-on: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- os: Windows
image: windows-latest
script: compile_windows.bat
working-directory: src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows
contents: |
src/debugpy/_vendored/pydevd/pydevd_attach_to_process/*.exe
src/debugpy/_vendored/pydevd/pydevd_attach_to_process/*.dll
src/debugpy/_vendored/pydevd/pydevd_attach_to_process/*.pdb
- os: macOS
image: macos-latest
script: src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_mac.sh
working-directory: .
contents: src/debugpy/_vendored/pydevd/pydevd_attach_to_process/*.dylib
- os: Linux
image: ubuntu-latest
script: src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_linux.sh
working-directory: .
contents: src/debugpy/_vendored/pydevd/pydevd_attach_to_process/*.so
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Build pydevd binaries (Windows)
if: runner.os == 'Windows'
shell: cmd
working-directory: ${{ matrix.working-directory }}
run: call ${{ matrix.script }}
- name: Build pydevd binaries (Unix)
if: runner.os != 'Windows'
working-directory: ${{ matrix.working-directory }}
run: bash ${{ matrix.script }}
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: pydevd-binaries-${{ matrix.os }}
path: ${{ matrix.contents }}
if-no-files-found: error
test:
name: Tests - ${{ matrix.os }} - Python ${{ matrix.python }}
needs: build-pydevd
runs-on: ${{ matrix.image }}
timeout-minutes: ${{ matrix.os == 'Windows' && 40 || 30 }}
strategy:
fail-fast: false
matrix:
os: [Linux, macOS, Windows]
python: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
include:
- os: Linux
image: ubuntu-latest
- os: macOS
image: macos-latest
- os: Windows
image: windows-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup gdb
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get --yes install gdb
sudo sysctl kernel.yama.ptrace_scope=0
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Download pydevd binaries
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: pydevd-binaries-*
merge-multiple: true
path: ${{ env.PYDEVD_ATTACH_TO_PROCESS }}
- name: Setup Python packages
run: python -m pip install tox
- name: Run tests using tox
shell: bash
env:
DEBUGPY_PROCESS_SPAWN_TIMEOUT: 60
DEBUGPY_LAUNCH_TIMEOUT: 60
PYTHON_VERSION: ${{ matrix.python }}
run: |
if [ "$RUNNER_OS" = "macOS" ]; then
ulimit -Sn 8192
fi
tox_env="py${PYTHON_VERSION//./}"
echo "Derived tox environment: $tox_env"
python -m tox -e "$tox_env" -- \
--junitxml="$RUNNER_TEMP/test-results/tests.xml" \
--debugpy-log-dir="$RUNNER_TEMP/logs" \
tests
- name: Publish test logs
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: test-logs-${{ matrix.os }}-py${{ matrix.python }}
path: ${{ runner.temp }}/logs
if-no-files-found: ignore
- name: Publish test results
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: test-results-${{ matrix.os }}-py${{ matrix.python }}
path: ${{ runner.temp }}/test-results
if-no-files-found: ignore