55 test :
66 strategy :
77 matrix :
8- python_version : ['3.10', '3.12']
8+ python_version : ['3.10', '3.12', '3.13', '3.14' ]
99 os : [ubuntu-latest]
10- include :
11- - python_version : ' 2.7'
12- os : ubuntu-22.04
1310 runs-on : ${{ matrix.os }}
1411 timeout-minutes : 30
1512 services :
@@ -29,23 +26,23 @@ jobs:
2926 PWN_UBUNTU_ARCHIVE_URL : http://localhost:3002/
3027 PWN_GITLAB_LIBCDB_URL : http://localhost:3003/
3128 steps :
32- - uses : actions/checkout@v4
29+ - uses : actions/checkout@v6
3330 with :
3431 fetch-depth : 20
3532
3633 - name : Git History
3734 run : |
3835 git fetch origin
3936 git log --oneline --graph -10
40-
37+
4138 - name : Fix libcdb-cache permissions
4239 id : fix-perms
4340 run : |
4441 sudo chown -R runner:runner /home/runner/libcdb-cache
4542 echo "date=$(/bin/date -u "+%Y%m%d%H%M%S")" >> $GITHUB_OUTPUT
4643
4744 - name : Cache for libcdb requests
48- uses : actions/cache@v4
45+ uses : actions/cache@v5
4946 with :
5047 path : ~/libcdb-cache
5148 key : libcdb-python${{ matrix.python_version }}-${{ steps.fix-perms.outputs.date }}
@@ -67,36 +64,16 @@ jobs:
6764 sudo apt-get update && sudo apt-get install -y python3-pip gdb gdbserver
6865 /usr/bin/python -m pip install --break-system-packages rpyc || /usr/bin/python -m pip install rpyc
6966 gdb --batch --quiet --nx --nh --ex 'py import rpyc; print(rpyc.version.version)'
70-
71- - name : Cache for pip
72- uses : actions/cache@v4
73- if : matrix.python_version == '2.7'
74- with :
75- path : ~/.cache/pip
76- key : ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }}
77- restore-keys : ${{ matrix.os }}-${{ matrix.python_version }}-cache-pip-
7867
7968 - name : Set up Python ${{ matrix.python_version }}
80- if : matrix.python_version != '2.7'
81- uses : actions/setup-python@v5
69+ uses : actions/setup-python@v6
8270 with :
8371 python-version : ${{ matrix.python_version }}
8472 cache : ' pip'
8573 cache-dependency-path : |
8674 **/pyproject.toml
8775 **/requirements*.txt
8876
89- - name : Set up Python 2.7
90- if : matrix.python_version == '2.7'
91- run : |
92- sudo apt-get update
93- sudo apt-get install -y \
94- python2.7 python2.7-dev python2-pip-whl
95- sudo ln -sf python2.7 /usr/bin/python
96- export PYTHONPATH=`echo /usr/share/python-wheels/pip-*py2*.whl`
97- sudo --preserve-env=PYTHONPATH python -m pip install --upgrade pip setuptools wheel
98- sudo chown -R $USER /usr/local/lib/python2.7
99-
10077
10178 - name : Verify tag against version
10279 if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
@@ -127,18 +104,20 @@ jobs:
127104 binutils-s390x-linux-gnu \
128105 binutils-sparc64-linux-gnu \
129106 binutils-riscv64-linux-gnu \
107+ binutils-loongarch64-linux-gnu \
130108 gcc-multilib \
131109 libc6-dbg \
132110 elfutils \
133111 patchelf
134-
112+
113+ # Print diagnostics to help when Corefile doctests fail.
135114 - name : Testing Corefiles
136115 run : |
137116 ulimit -a
138117 ulimit -c unlimited
139118 cat /proc/sys/kernel/core_pattern
140119 cat /proc/sys/kernel/core_uses_pid
141- ( cd $(mktemp -d); sh -c 'kill -11 $$' || true; ls -la ./*core* /var/crash/*.crash /var/lib/apport/coredump/core*) || true
120+ ( cd $(mktemp -d); sh -c 'kill -11 $$' || true; ls -la ./*core* /var/crash/*.crash /var/lib/apport/coredump/core* || coredumpctl list sh ) || true
142121
143122 - name : Set up SSH
144123 run : |
@@ -157,10 +136,6 @@ jobs:
157136 - name : Install documentation dependencies
158137 run : pip install -r docs/requirements.txt
159138
160- - name : Manually install non-broken Unicorn
161- if : matrix.python_version == '2.7'
162- run : pip install unicorn==2.0.0rc7
163-
164139 - name : Disable yama ptrace_scope
165140 run : |
166141 echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope # required by some gdb doctests
@@ -246,60 +221,141 @@ jobs:
246221 pwn libcdb hash b229d1da1e161f95e839cf90cded5f719e5de308
247222
248223 - name : Build source and wheel distributions
249- if : matrix.python_version != '2.7'
250224 run : |
251225 python -m build
252226
253- - uses : actions/upload-artifact@v4
227+ - uses : actions/upload-artifact@v7
254228 if : matrix.python_version == '3.10'
255229 with :
256230 name : packages
257231 path : dist/
258232 include-hidden-files : true
259233
260- - uses : actions/upload-artifact@v4
234+ - uses : actions/upload-artifact@v7
261235 with :
262236 name : coverage-${{ matrix.python_version }}
263237 path : .coverage*
264238 include-hidden-files : true
265-
239+
266240 - name : Fix libcdb-cache permissions
267241 run : |
268242 container_id=$(docker ps --filter volume=/home/runner/libcdb-cache --no-trunc --format "{{.ID}}")
269243 docker stop $container_id
270244 sudo chown -R runner:runner /home/runner/libcdb-cache
271245
246+ android-test :
247+ runs-on : ubuntu-latest
248+ timeout-minutes : 30
249+ continue-on-error : true
250+ steps :
251+ - uses : actions/checkout@v6
252+
253+ - name : Set up Python 3.12
254+ uses : actions/setup-python@v6
255+ with :
256+ python-version : ' 3.12'
257+ cache : ' pip'
258+ cache-dependency-path : |
259+ **/pyproject.toml
260+ **/requirements*.txt
261+
262+ - name : Install Linux dependencies
263+ run : |
264+ sudo apt-get update
265+ sudo apt-get install -y --no-install-recommends -o Acquire::Retries=3 \
266+ gdb gdbserver socat \
267+ qemu-user-static \
268+ binutils-aarch64-linux-gnu \
269+ binutils-arm-linux-gnueabihf \
270+ libc6-dbg
271+
272+ - name : Cache for avd
273+ uses : actions/cache@v5
274+ id : cache-avd
275+ with :
276+ path : |
277+ ~/.android
278+ /usr/local/lib/android/sdk/emulator
279+ /usr/local/lib/android/sdk/platform-tools
280+ /usr/local/lib/android/sdk/system-images
281+ key : ${{ matrix.os }}-cache-avd-${{ hashFiles('travis/setup_avd*.sh') }}
282+ restore-keys : |
283+ ${{ matrix.os }}-cache-avd-
284+
285+ - name : Install Android AVD
286+ run : |
287+ sudo usermod -aG kvm $USER
288+ source travis/setup_avd_fast.sh
289+ sed -i 's/skip_android = True/skip_android = False/' docs/source/conf.py
290+ set | grep ^PATH >.android.env
291+
292+ - name : Install dependencies
293+ run : |
294+ pip install --upgrade pip
295+ pip install --upgrade wheel build
296+ pip install --upgrade flake8 appdirs
297+ pip install --upgrade --editable .
298+
299+ - name : Sanity checks
300+ run : PWNLIB_NOTERM=1 python -c 'from pwn import *; print(pwnlib.term.term_mode)'
301+
302+ - name : Install documentation dependencies
303+ run : pip install -r docs/requirements.txt
304+
305+ - name : Coverage Doctests (Android Only)
306+ run : |
307+ source .android.env
308+ PWNLIB_NOTERM=1 coverage run -m sphinx -b doctest docs/source docs/build/doctest docs/source/adb.rst
309+
310+ - uses : actions/upload-artifact@v7
311+ with :
312+ name : coverage-android
313+ path : .coverage*
314+ include-hidden-files : true
315+
272316 windows-test :
273317 runs-on : windows-latest
274318 timeout-minutes : 30
275- continue-on-error : true
276319 steps :
277- - uses : actions/checkout@v4
320+ - uses : actions/checkout@v6
278321
279322 - name : Set up Python 3.12
280- uses : actions/setup-python@v5
323+ uses : actions/setup-python@v6
281324 with :
282325 python-version : ' 3.12'
283326
284327 - name : Install dependencies
285328 run : |
286329 pip install --upgrade pip
287330 pip install --upgrade --editable .
288-
331+
332+ - name : Install documentation dependencies
333+ run : pip install -r docs/requirements.txt
334+
289335 - name : Sanity checks
290336 run : |
291337 python -bb -c 'from pwn import *'
292338 python -bb examples/text.py
293339
340+ - name : Coverage doctests
341+ run : |
342+ python -bb -m coverage run -m sphinx -b doctest docs/source docs/build/doctest
343+
344+ - uses : actions/upload-artifact@v7
345+ with :
346+ name : coverage-windows
347+ path : .coverage*
348+ include-hidden-files : true
349+
294350 upload-coverage :
295351 runs-on : ubuntu-latest
296- needs : test
352+ needs : [ test, android-test, windows-test]
297353 steps :
298- - uses : actions/checkout@v4
354+ - uses : actions/checkout@v6
299355 with :
300356 fetch-depth : 20
301357
302- - uses : actions/download-artifact@v4
358+ - uses : actions/download-artifact@v8
303359 with :
304360 pattern : coverage-*
305361 merge-multiple : true
@@ -319,7 +375,7 @@ jobs:
319375 if : github.repository_owner == 'Gallopsled' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/heads/') && endsWith(github.event.ref, '-staging')
320376 needs : test
321377 steps :
322- - uses : actions/checkout@v4
378+ - uses : actions/checkout@v6
323379 with :
324380 fetch-depth : 20
325381 - name : Push changes to protected branch
@@ -341,7 +397,7 @@ jobs:
341397 needs : test
342398 steps :
343399 - name : Download artifacts
344- uses : actions/download-artifact@v4
400+ uses : actions/download-artifact@v8
345401 with :
346402 name : packages
347403 path : dist
0 commit comments