diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index aeb0b700cc..2abfac0f3c 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -19,7 +19,7 @@ on: jobs: windows_package: - runs-on: windows-2019 + runs-on: windows-2022 if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'package')) strategy: matrix: @@ -94,7 +94,7 @@ jobs: python setup_nsis.py makensis /Darch=${{ matrix.arch }} deluge-win-installer.nsi - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: deluge-py${{ matrix.python }}-lt${{ matrix.libtorrent }}-${{ matrix.arch }} path: packaging/win/*.exe diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82a9fd99af..8ad554e0c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,22 +6,25 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: - + inputs: + core-dump: + description: "Set to 1 to enable retrieving core dump from crashes" + default: "0" jobs: test-linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: python-version: ["3.7", "3.10"] steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} cache: "pip" @@ -46,18 +49,21 @@ jobs: TESTSSL_VER: 3.0.6 TESTSSL_URL: https://codeload.github.com/drwetter/testssl.sh/tar.gz/refs/tags/v - - name: Setup core dump directory + - name: Setup core dump catch and store + if: github.event.inputs.core-dump == '1' run: | sudo mkdir /cores/ && sudo chmod 777 /cores/ echo "/cores/%E.%p" | sudo tee /proc/sys/kernel/core_pattern + ulimit -c unlimited + sudo apt install glibc-tools + echo "DEBUG_PREFIX=catchsegv python -X dev -m" >> $GITHUB_ENV - name: Test with pytest run: | - ulimit -c unlimited # Enable core dumps to be captured python -c 'from deluge._libtorrent import lt; print(lt.__version__)'; - catchsegv python -X dev -m pytest -v -m "not (todo or gtkui)" deluge + $DEBUG_PREFIX pytest -v -m "not (todo or gtkui)" deluge - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 # capture all crashes as build artifacts if: failure() with: @@ -65,19 +71,19 @@ jobs: path: /cores test-windows: - runs-on: windows-2019 + runs-on: windows-2022 strategy: matrix: python-version: ["3.7", "3.10"] steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} cache: "pip" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3cccc8e40a..9afa069365 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,22 +15,15 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: actions/setup-python@v2 - with: - python-version: "3.8" - - name: Cache pip - uses: actions/cache@v2 + + - uses: actions/setup-python@v4 with: - # This path is specific to Ubuntu - path: ~/.cache/pip - # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - ${{ runner.os }}- + python-version: "3.10" + cache: "pip" + cache-dependency-path: "requirements*.txt" - name: Install dependencies run: | @@ -38,7 +31,7 @@ jobs: pip install tox sudo apt-get install enchant-2 - - name: Test with tox + - name: Build docs with tox env: TOX_ENV: docs run: |