Fixes SIGSEGV and improve thread safety of journal.Reader class #94
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # vi: ts=2 sw=2 et: | |
| # SPDX-License-Identifier: LGPL-2.1-or-later | |
| # | |
| name: Install test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ matrix.container }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| container: [ | |
| "archlinux:latest", | |
| "debian:testing", | |
| "quay.io/centos/centos:stream9", | |
| "quay.io/fedora/fedora:rawhide", | |
| "ubuntu:focal", | |
| ] | |
| container: | |
| image: ${{ matrix.container }} | |
| name: ${{ matrix.container }} | |
| steps: | |
| - name: Repository checkout | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| DIST_ID="$(sed -nr 's/^ID="?(\w+)"?/\1/p' /etc/os-release)" | |
| echo "Distribution ID: $DIST_ID" | |
| DEPS_COMMON=( | |
| gcc | |
| git | |
| pkg-config | |
| systemd | |
| ) | |
| case "$DIST_ID" in | |
| arch) | |
| pacman --noconfirm -Sy python3 || echo "Issue installing/upgrading python3" | |
| pacman --noconfirm -Sy python-pip | |
| python3 -m pip install --upgrade pip || echo "can't upgrade pip" | |
| pacman --noconfirm -Sy "${DEPS_COMMON[@]}" systemd-libs | |
| ;; | |
| centos|fedora) | |
| dnf -y install python3 python3-devel python3-pip | |
| python3 -m pip install --upgrade pip || echo "can't upgrade pip" | |
| dnf -y install "${DEPS_COMMON[@]}" systemd-devel | |
| ;; | |
| ubuntu|debian) | |
| apt -y update | |
| DEBIAN_FRONTEND=noninteractive apt -y install python3 python3-dev python3-pip | |
| python3 -m pip install --upgrade pip || echo "can't upgrade pip" | |
| DEBIAN_FRONTEND=noninteractive apt -y install "${DEPS_COMMON[@]}" libsystemd-dev python3-dev python3-pip | |
| ;; | |
| *) | |
| echo >&2 "Invalid distribution ID: $DISTRO_ID" | |
| exit 1 | |
| esac | |
| python3 -m pip install --break-system-packages pytest sphinx | |
| - name: Build & install | |
| shell: bash | |
| run: | | |
| set -x | |
| python3 -m pip install --break-system-packages -I -v . | |
| # Avoid importing the systemd module from the git repository | |
| cd / | |
| python3 -c 'from systemd import journal; print(journal.__version__)' | |
| pytest -v --pyargs systemd |