5
5
test :
6
6
strategy :
7
7
matrix :
8
- python_version : ['3.10', '3.12']
8
+ python_version : ['3.10', '3.12', '3.13' ]
9
9
os : [ubuntu-latest]
10
- include :
11
- - python_version : ' 2.7'
12
- os : ubuntu-22.04
13
10
runs-on : ${{ matrix.os }}
14
11
timeout-minutes : 30
15
12
services :
36
33
run : |
37
34
git fetch origin
38
35
git log --oneline --graph -10
39
-
36
+
40
37
- name : Fix libcdb-cache permissions
41
38
id : fix-perms
42
39
run : |
66
63
sudo apt-get update && sudo apt-get install -y python3-pip gdb gdbserver
67
64
/usr/bin/python -m pip install --break-system-packages rpyc || /usr/bin/python -m pip install rpyc
68
65
gdb --batch --quiet --nx --nh --ex 'py import rpyc; print(rpyc.version.version)'
69
-
70
- - name : Cache for pip
71
- uses : actions/cache@v4
72
- if : matrix.python_version == '2.7'
73
- with :
74
- path : ~/.cache/pip
75
- key : ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }}
76
- restore-keys : ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-
77
66
78
67
- name : Set up Python ${{ matrix.python_version }}
79
- if : matrix.python_version != '2.7'
80
68
uses : actions/setup-python@v5
81
69
with :
82
70
python-version : ${{ matrix.python_version }}
85
73
**/pyproject.toml
86
74
**/requirements*.txt
87
75
88
- - name : Set up Python 2.7
89
- if : matrix.python_version == '2.7'
90
- run : |
91
- sudo apt-get update
92
- sudo apt-get install -y \
93
- python2.7 python2.7-dev python2-pip-whl
94
- sudo ln -sf python2.7 /usr/bin/python
95
- export PYTHONPATH=`echo /usr/share/python-wheels/pip-*py2*.whl`
96
- sudo --preserve-env=PYTHONPATH python -m pip install --upgrade pip setuptools wheel
97
- sudo chown -R $USER /usr/local/lib/python2.7
98
-
99
76
100
77
- name : Verify tag against version
101
78
if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
@@ -125,11 +102,12 @@ jobs:
125
102
binutils-s390x-linux-gnu \
126
103
binutils-sparc64-linux-gnu \
127
104
binutils-riscv64-linux-gnu \
105
+ binutils-loongarch64-linux-gnu \
128
106
gcc-multilib \
129
107
libc6-dbg \
130
108
elfutils \
131
109
patchelf
132
-
110
+
133
111
- name : Testing Corefiles
134
112
run : |
135
113
ulimit -a
@@ -155,10 +133,6 @@ jobs:
155
133
- name : Install documentation dependencies
156
134
run : pip install -r docs/requirements.txt
157
135
158
- - name : Manually install non-broken Unicorn
159
- if : matrix.python_version == '2.7'
160
- run : pip install unicorn==2.0.0rc7
161
-
162
136
- name : Disable yama ptrace_scope
163
137
run : |
164
138
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope # required by some gdb doctests
@@ -244,7 +218,6 @@ jobs:
244
218
pwn libcdb hash b229d1da1e161f95e839cf90cded5f719e5de308
245
219
246
220
- name : Build source and wheel distributions
247
- if : matrix.python_version != '2.7'
248
221
run : |
249
222
python -m build
250
223
@@ -260,13 +233,83 @@ jobs:
260
233
name : coverage-${{ matrix.python_version }}
261
234
path : .coverage*
262
235
include-hidden-files : true
263
-
236
+
264
237
- name : Fix libcdb-cache permissions
265
238
run : |
266
239
container_id=$(docker ps --filter volume=/home/runner/libcdb-cache --no-trunc --format "{{.ID}}")
267
240
docker stop $container_id
268
241
sudo chown -R runner:runner /home/runner/libcdb-cache
269
242
243
+ android-test :
244
+ runs-on : ubuntu-latest
245
+ timeout-minutes : 30
246
+ continue-on-error : true
247
+ steps :
248
+ - uses : actions/checkout@v4
249
+
250
+ - name : Set up Python 3.12
251
+ uses : actions/setup-python@v5
252
+ with :
253
+ python-version : ' 3.12'
254
+ cache : ' pip'
255
+ cache-dependency-path : |
256
+ **/pyproject.toml
257
+ **/requirements*.txt
258
+
259
+ - name : Install Linux dependencies
260
+ run : |
261
+ sudo apt-get update
262
+ sudo apt-get install -y --no-install-recommends -o Acquire::Retries=3 \
263
+ gdb gdbserver socat \
264
+ qemu-user-static \
265
+ binutils-aarch64-linux-gnu \
266
+ binutils-arm-linux-gnueabihf \
267
+ libc6-dbg
268
+
269
+ - name : Cache for avd
270
+ uses : actions/cache@v4
271
+ id : cache-avd
272
+ with :
273
+ path : |
274
+ ~/.android
275
+ /usr/local/lib/android/sdk/emulator
276
+ /usr/local/lib/android/sdk/platform-tools
277
+ /usr/local/lib/android/sdk/system-images
278
+ key : ${{ matrix.os }}-cache-avd-${{ hashFiles('travis/setup_avd*.sh') }}
279
+ restore-keys : |
280
+ ${{ matrix.os }}-cache-avd-
281
+
282
+ - name : Install Android AVD
283
+ run : |
284
+ sudo usermod -aG kvm $USER
285
+ source travis/setup_avd_fast.sh
286
+ sed -i 's/skip_android = True/skip_android = False/' docs/source/conf.py
287
+ set | grep ^PATH >.android.env
288
+
289
+ - name : Install dependencies
290
+ run : |
291
+ pip install --upgrade pip
292
+ pip install --upgrade wheel build
293
+ pip install --upgrade flake8 appdirs
294
+ pip install --upgrade --editable .
295
+
296
+ - name : Sanity checks
297
+ run : PWNLIB_NOTERM=1 python -c 'from pwn import *; print(pwnlib.term.term_mode)'
298
+
299
+ - name : Install documentation dependencies
300
+ run : pip install -r docs/requirements.txt
301
+
302
+ - name : Coverage Doctests (Android Only)
303
+ run : |
304
+ source .android.env
305
+ PWNLIB_NOTERM=1 coverage run -m sphinx -b doctest docs/source docs/build/doctest docs/source/adb.rst
306
+
307
+ - uses : actions/upload-artifact@v4
308
+ with :
309
+ name : coverage-android
310
+ path : .coverage*
311
+ include-hidden-files : true
312
+
270
313
windows-test :
271
314
runs-on : windows-latest
272
315
timeout-minutes : 30
@@ -283,12 +326,25 @@ jobs:
283
326
run : |
284
327
pip install --upgrade pip
285
328
pip install --upgrade --editable .
286
-
329
+
330
+ - name : Install documentation dependencies
331
+ run : pip install -r docs/requirements.txt
332
+
287
333
- name : Sanity checks
288
334
run : |
289
335
python -bb -c 'from pwn import *'
290
336
python -bb examples/text.py
291
337
338
+ - name : Coverage doctests
339
+ run : |
340
+ python -bb -m coverage run -m sphinx -b doctest docs/source docs/build/doctest
341
+
342
+ - uses : actions/upload-artifact@v4
343
+ with :
344
+ name : coverage-windows
345
+ path : .coverage*
346
+ include-hidden-files : true
347
+
292
348
upload-coverage :
293
349
runs-on : ubuntu-latest
294
350
needs : test
0 commit comments