Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,50 @@ permissions:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
concurrency:
group: ${{ github.workflow }}-${{ matrix.python }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
python: [
"3.7",
"3.8",
"3.9",
"3.10",
"3.11.0-rc.1",
"3.11",
"3.12",
"3.13"
]
name: Python ${{ matrix.python }}
steps:
- name: Repository checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Configure Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: x64

- name: Install dependencies
run: |
sudo apt -y update
sudo apt -y install gcc libsystemd-dev
python -m pip install pytest sphinx

sudo apt -y install gcc libsystemd-dev python3-setuptools
- name: Create virtualenv
run: |
python3 -m venv ~/${{ matrix.python }}
- name: Install python dependencies
run: |
source ~/${{ matrix.python }}/bin/activate
python3 -m pip install pytest sphinx setuptools
- name: Build (Python ${{ matrix.python }})
run: |
set -x
source ~/${{ matrix.python }}/bin/activate
make -j
make doc SPHINXOPTS="-W -v"

- name: Test (Python ${{ matrix.python }})
run: |
source ~/${{ matrix.python }}/bin/activate
make check
19 changes: 13 additions & 6 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
concurrency:
group: ${{ github.workflow }}-${{ matrix.container }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -24,16 +24,16 @@ jobs:
container: [
"archlinux:latest",
"debian:testing",
"quay.io/centos/centos:stream8",
"quay.io/centos/centos:stream9",
"quay.io/fedora/fedora:rawhide",
"ubuntu:focal",
"ubuntu:noble",
]
container:
image: ${{ matrix.container }}
name: ${{ matrix.container }}
steps:
- name: Repository checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
shell: bash
Expand All @@ -52,14 +52,20 @@ jobs:
case "$DIST_ID" in
arch)
pacman --noconfirm -Sy "${DEPS_COMMON[@]}" systemd-libs
python3 -m venv ~/venv
source ~/venv/bin/activate
python3 -m ensurepip
;;
centos|fedora)
dnf -y install "${DEPS_COMMON[@]}" systemd-devel python3-devel python3-pip
dnf -y install "${DEPS_COMMON[@]}" systemd-devel python3-devel python3-pip python3-setuptools
python3 -m venv ~/venv
source ~/venv/bin/activate
;;
ubuntu|debian)
apt -y update
DEBIAN_FRONTEND=noninteractive apt -y install "${DEPS_COMMON[@]}" libsystemd-dev python3-dev python3-pip
DEBIAN_FRONTEND=noninteractive apt -y install "${DEPS_COMMON[@]}" libsystemd-dev python3-dev python3-pip python3-setuptools python3-venv
python3 -m venv ~/venv
source ~/venv/bin/activate
;;
*)
echo >&2 "Invalid distribution ID: $DISTRO_ID"
Expand All @@ -71,6 +77,7 @@ jobs:
- name: Build & install
shell: bash
run: |
source ~/venv/bin/activate
set -x
python3 -m pip install -I -v .
# Avoid importing the systemd module from the git repository
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PYTHON = python
PYTHON = python3
SED = sed
ETAGS = etags
INCLUDE_DIR := $(shell pkg-config --variable=includedir libsystemd)
Expand Down
Loading