From cb75192df491fd97d3c76d9d2a5a36d2932b8ac7 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Fri, 10 Sep 2021 19:06:21 +0100 Subject: [PATCH] [CI] Add core dump capture to GH job Add further debugging to trace segfaults with lt 1.2 --- .github/workflows/ci.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06763eb2f..a6ca45f94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: repo-name: libtorrent keys: 58E5430D9667FAEFFCA0B93F32309D6B9E009EDB key-server: keyserver.ubuntu.com - install: python3-libtorrent + install: python3-libtorrent-dbg - name: Install dependencies run: | @@ -47,11 +47,24 @@ jobs: pip install -r requirements.txt -r requirements-tests.txt pip install -e . + - name: Setup core dump directory + run: | + sudo mkdir /cores/ && sudo chmod 777 /cores/ + echo "/cores/%E.%p" | sudo tee /proc/sys/kernel/core_pattern + - name: Test with pytest run: | + ulimit -c unlimited # Enable core dumps to be captured cp /usr/lib/python3/dist-packages/libtorrent*.so $GITHUB_WORKSPACE/deluge python -c 'from deluge._libtorrent import lt; print(lt.__version__)'; - catchsegv pytest -m "not (todo or gtkui or security)" deluge + catchsegv python -X dev -m pytest -v -m "not (todo or gtkui or security)" deluge + + - uses: actions/upload-artifact@v2 + # capture all crashes as build artifacts + if: failure() + with: + name: crashes + path: /cores test-windows: runs-on: windows-latest