@@ -240,6 +240,76 @@ jobs:
240
240
docker stop $container_id
241
241
sudo chown -R runner:runner /home/runner/libcdb-cache
242
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
+
243
313
windows-test :
244
314
runs-on : windows-latest
245
315
timeout-minutes : 30
@@ -269,13 +339,11 @@ jobs:
269
339
run : |
270
340
python -bb -m coverage run -m sphinx -b doctest docs/source docs/build/doctest
271
341
272
- # FIXME: Paths are broken when uploading coverage on ubuntu
273
- # coverage.exceptions.NoSource: No source for code: '/home/runner/work/pwntools/pwntools/D:\a\pwntools\pwntools\pwn\__init__.py'.
274
- # - uses: actions/upload-artifact@v4
275
- # with:
276
- # name: coverage-windows
277
- # path: .coverage*
278
- # include-hidden-files: true
342
+ - uses : actions/upload-artifact@v4
343
+ with :
344
+ name : coverage-windows
345
+ path : .coverage*
346
+ include-hidden-files : true
279
347
280
348
upload-coverage :
281
349
runs-on : ubuntu-latest
0 commit comments