[CI] Bump image and action versions

Updated the core dump storage to be enabled only when needed.
Fixed missing catchsegv on Ubuntu 22.04 by installing glibc-tools
This commit is contained in:
Calum Lind 2023-05-30 17:12:35 +01:00
parent 905a7dc3bc
commit d8b586e6ba
No known key found for this signature in database
GPG Key ID: 90597A687B836BA3
3 changed files with 26 additions and 27 deletions

View File

@ -19,7 +19,7 @@ on:
jobs: jobs:
windows_package: windows_package:
runs-on: windows-2019 runs-on: windows-2022
if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'package')) if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'package'))
strategy: strategy:
matrix: matrix:
@ -94,7 +94,7 @@ jobs:
python setup_nsis.py python setup_nsis.py
makensis /Darch=${{ matrix.arch }} deluge-win-installer.nsi makensis /Darch=${{ matrix.arch }} deluge-win-installer.nsi
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: deluge-py${{ matrix.python }}-lt${{ matrix.libtorrent }}-${{ matrix.arch }} name: deluge-py${{ matrix.python }}-lt${{ matrix.libtorrent }}-${{ matrix.arch }}
path: packaging/win/*.exe path: packaging/win/*.exe

View File

@ -6,22 +6,25 @@ on:
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: workflow_dispatch:
inputs:
core-dump:
description: "Set to 1 to enable retrieving core dump from crashes"
default: "0"
jobs: jobs:
test-linux: test-linux:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
python-version: ["3.7", "3.10"] python-version: ["3.7", "3.10"]
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
cache: "pip" cache: "pip"
@ -46,18 +49,21 @@ jobs:
TESTSSL_VER: 3.0.6 TESTSSL_VER: 3.0.6
TESTSSL_URL: https://codeload.github.com/drwetter/testssl.sh/tar.gz/refs/tags/v 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: | run: |
sudo mkdir /cores/ && sudo chmod 777 /cores/ sudo mkdir /cores/ && sudo chmod 777 /cores/
echo "/cores/%E.%p" | sudo tee /proc/sys/kernel/core_pattern 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 - name: Test with pytest
run: | run: |
ulimit -c unlimited # Enable core dumps to be captured
python -c 'from deluge._libtorrent import lt; print(lt.__version__)'; 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 # capture all crashes as build artifacts
if: failure() if: failure()
with: with:
@ -65,19 +71,19 @@ jobs:
path: /cores path: /cores
test-windows: test-windows:
runs-on: windows-2019 runs-on: windows-2022
strategy: strategy:
matrix: matrix:
python-version: ["3.7", "3.10"] python-version: ["3.7", "3.10"]
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
cache: "pip" cache: "pip"

View File

@ -15,22 +15,15 @@ jobs:
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with: with:
python-version: "3.8" python-version: "3.10"
- name: Cache pip cache: "pip"
uses: actions/cache@v2 cache-dependency-path: "requirements*.txt"
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 }}-
- name: Install dependencies - name: Install dependencies
run: | run: |
@ -38,7 +31,7 @@ jobs:
pip install tox pip install tox
sudo apt-get install enchant-2 sudo apt-get install enchant-2
- name: Test with tox - name: Build docs with tox
env: env:
TOX_ENV: docs TOX_ENV: docs
run: | run: |