Skip to content

Commit 2c90f6b

Browse files
committed
ci: Modernize & update distro versions
1 parent 3474d21 commit 2c90f6b

File tree

5 files changed

+47
-34
lines changed

5 files changed

+47
-34
lines changed

.github/workflows/build-test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build-test:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
distro:
12+
- fedora
13+
- debian
14+
fail-fast: false
15+
16+
steps:
17+
- name: Get this version
18+
uses: actions/checkout@v4
19+
20+
- name: Create Build Environment
21+
run: podman build -t packagekitqt-${{ matrix.distro }} -f tests/ci/Dockerfile-${{ matrix.distro }} .
22+
23+
- name: Build & Test
24+
run: podman run -t -v `pwd`:/build packagekitqt-${{ matrix.distro }}
25+
./tests/ci/build-and-test.sh

.github/workflows/main.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

tests/ci/Dockerfile-debian

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
FROM debian:bullseye
2-
3-
# allow fetching source packages
4-
RUN echo "deb-src http://deb.debian.org/debian/ bullseye main" >> /etc/apt/sources.list
1+
FROM debian:trixie
52

63
# prepare
74
RUN apt-get update -qq
85

9-
# install build essentials
10-
RUN apt-get install -yq build-essential
6+
# install essentials
7+
RUN apt-get install -yq eatmydata build-essential
118

12-
# install PackageKit-Qt dependencies
13-
RUN apt-get build-dep -yq packagekit-qt
14-
RUN apt-get install -yq cmake ninja-build
9+
# install build dependencies
10+
RUN eatmydata apt-get install -yq --no-install-recommends \
11+
cmake \
12+
ninja-build \
13+
packagekit \
14+
pkgconf \
15+
qt6-base-dev
1516

1617
# finish
1718
RUN mkdir /build

tests/ci/Dockerfile-fedora

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM fedora:31
1+
FROM fedora:42
22

33
RUN dnf -y update
44
RUN dnf -y install dnf-plugins-core libdnf-devel redhat-rpm-config cmake gcc-c++ ninja-build

tests/ci/build-and-test.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@ set -e
44
if [ -d "build" ]; then
55
rm build -rf
66
fi
7-
cmake -S . -B build -GNinja -DMAINTAINER:BOOL=ON $@
7+
set -x
8+
9+
cmake -S . -B build -GNinja \
10+
-DMAINTAINER:BOOL=ON \
11+
$@
812

913
# Build, Test & Install
1014
cmake --build build
15+
1116
## No tests yet
1217
#cd build && ctest && cd -
1318

14-
DESTDIR=/tmp/install_root/ cmake --install build
19+
DUMMY_DESTDIR=/tmp/install-root/
20+
rm -rf $DUMMY_DESTDIR
21+
22+
# Test installation
23+
DESTDIR=$DUMMY_DESTDIR cmake --install build

0 commit comments

Comments
 (0)