Skip to content

Commit 7c99a39

Browse files
committed
repair GHA-CI (update versions, pip install using --break-system-packages, etc)
1 parent 7fa91c8 commit 7c99a39

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

.github/workflows/build.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,28 @@ permissions:
1414

1515
jobs:
1616
build:
17-
runs-on: ubuntu-20.04
17+
runs-on: ubuntu-latest
1818
concurrency:
1919
group: ${{ github.workflow }}-${{ matrix.python }}-${{ github.ref }}
2020
cancel-in-progress: true
2121
strategy:
2222
fail-fast: false
2323
matrix:
2424
python: [
25-
"3.7",
2625
"3.8",
2726
"3.9",
2827
"3.10",
29-
"3.11.0-rc.1",
28+
"3.11",
29+
"3.12",
30+
"3.13"
3031
]
3132
name: Python ${{ matrix.python }}
3233
steps:
3334
- name: Repository checkout
34-
uses: actions/checkout@v2
35+
uses: actions/checkout@v4
3536

3637
- name: Configure Python ${{ matrix.python }}
37-
uses: actions/setup-python@v2
38+
uses: actions/setup-python@v5
3839
with:
3940
python-version: ${{ matrix.python }}
4041
architecture: x64
@@ -43,6 +44,9 @@ jobs:
4344
run: |
4445
sudo apt -y update
4546
sudo apt -y install gcc libsystemd-dev
47+
if dpkg --compare-versions "${{ matrix.python }}" ge 3.12; then
48+
python -m pip install setuptools || echo "can't install setuptools"
49+
fi
4650
python -m pip install pytest sphinx
4751
4852
- name: Build (Python ${{ matrix.python }})

.github/workflows/install.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
container: [
2525
"archlinux:latest",
2626
"debian:testing",
27-
"quay.io/centos/centos:stream8",
27+
"quay.io/centos/centos:stream9",
2828
"quay.io/fedora/fedora:rawhide",
2929
"ubuntu:focal",
3030
]
@@ -33,7 +33,7 @@ jobs:
3333
name: ${{ matrix.container }}
3434
steps:
3535
- name: Repository checkout
36-
uses: actions/checkout@v2
36+
uses: actions/checkout@v4
3737

3838
- name: Install dependencies
3939
shell: bash
@@ -45,34 +45,39 @@ jobs:
4545
gcc
4646
git
4747
pkg-config
48-
python3
4948
systemd
5049
)
5150
5251
case "$DIST_ID" in
5352
arch)
53+
pacman --noconfirm -Sy python3 || echo "Issue installing/upgrading python3"
54+
pacman --noconfirm -Sy python-pip
55+
python3 -m pip install --upgrade pip || echo "can't upgrade pip"
5456
pacman --noconfirm -Sy "${DEPS_COMMON[@]}" systemd-libs
55-
python3 -m ensurepip
5657
;;
5758
centos|fedora)
58-
dnf -y install "${DEPS_COMMON[@]}" systemd-devel python3-devel python3-pip
59+
dnf -y install python3 python3-devel python3-pip
60+
python3 -m pip install --upgrade pip || echo "can't upgrade pip"
61+
dnf -y install "${DEPS_COMMON[@]}" systemd-devel
5962
;;
6063
ubuntu|debian)
6164
apt -y update
65+
DEBIAN_FRONTEND=noninteractive apt -y install python3 python3-dev python3-pip
66+
python3 -m pip install --upgrade pip || echo "can't upgrade pip"
6267
DEBIAN_FRONTEND=noninteractive apt -y install "${DEPS_COMMON[@]}" libsystemd-dev python3-dev python3-pip
6368
;;
6469
*)
6570
echo >&2 "Invalid distribution ID: $DISTRO_ID"
6671
exit 1
6772
esac
6873
69-
python3 -m pip install pytest sphinx
74+
python3 -m pip install --break-system-packages pytest sphinx
7075
7176
- name: Build & install
7277
shell: bash
7378
run: |
7479
set -x
75-
python3 -m pip install -I -v .
80+
python3 -m pip install --break-system-packages -I -v .
7681
# Avoid importing the systemd module from the git repository
7782
cd /
7883
python3 -c 'from systemd import journal; print(journal.__version__)'

0 commit comments

Comments
 (0)