Skip to content

Commit 8367d22

Browse files
committed
Add Debian
Ubuntu is based on Debian, so the entire build process for Debian is pretty much the same as it is for Ubuntu. Instead of creating a separate job, just hook into the Ubuntu job, for now. Additional small changes: * For the sake of consistency, use codenames for both. * Adjusted the version string. * Use standard /etc/os-release instead of lsb_release.
1 parent 83fcde4 commit 8367d22

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,37 +127,56 @@ jobs:
127127
name: fedora_${{ matrix.container }}
128128
path: build/libdigidocpp*.rpm
129129
ubuntu:
130-
name: Build on Ubuntu ${{ matrix.container }} ${{ matrix.arch }}
130+
name: Build on ${{ matrix.dist }} ${{ matrix.rel }} ${{ matrix.arch }}
131131
runs-on: ubuntu-24.04${{ matrix.arch == 'arm64' && '-arm' || '' }}
132-
container: ubuntu:${{ matrix.container }}
132+
container: ${{ matrix.dist }}:${{ matrix.rel }}
133133
strategy:
134134
matrix:
135-
container: ['22.04', '24.04', '25.04']
136-
arch: ['amd64', 'arm64']
135+
include:
136+
# ubuntu x64
137+
- {arch: amd64, dist: ubuntu, rel: oracular}
138+
- {arch: amd64, dist: ubuntu, rel: noble}
139+
- {arch: amd64, dist: ubuntu, rel: jammy}
140+
141+
# ubuntu arm
142+
- {arch: arm64, dist: ubuntu, rel: oracular}
143+
- {arch: arm64, dist: ubuntu, rel: noble}
144+
- {arch: arm64, dist: ubuntu, rel: jammy}
145+
146+
# debian x64
147+
- {arch: amd64, dist: debian, rel: forky}
148+
- {arch: amd64, dist: debian, rel: trixie}
149+
- {arch: amd64, dist: debian, rel: bookworm}
150+
151+
# debian arm
152+
- {arch: arm64, dist: debian, rel: forky}
153+
- {arch: arm64, dist: debian, rel: trixie}
154+
- {arch: arm64, dist: debian, rel: bookworm}
137155
env:
138156
DEBIAN_FRONTEND: noninteractive
139157
DEBFULLNAME: github-actions
140158
141159
steps:
142160
- name: Install dependencies
143-
run: apt update -qq && apt install --no-install-recommends -y lsb-release build-essential devscripts debhelper lintian pkg-config ${UBUNTU_DEPS} doxygen swig openjdk-17-jdk-headless libpython3-dev python3-setuptools libboost-test-dev
161+
run: apt update -qq && apt install --no-install-recommends -y ${UBUNTU_DEPS} lsb-release build-essential devscripts debhelper lintian pkg-config doxygen swig default-jdk-headless libpython3-dev python3-setuptools libboost-test-dev
144162
- name: Checkout
145163
uses: actions/checkout@v4
146164
- name: Setup changelog
147165
run: |
166+
. /etc/os-release
148167
export VERSION=$(grep project CMakeLists.txt | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")
149-
export VERSIONEX=${VERSION}.${BUILD_NUMBER}.$(lsb_release -rs)
150-
dch --distribution $(lsb_release -cs) -v ${VERSIONEX} "Release ${VERSIONEX}."
168+
export VERSIONEX=${VERSION}+${VERSION_CODENAME}.${BUILD_NUMBER}
169+
dch --distribution ${VERSION_CODENAME} -v ${VERSIONEX} "Release ${VERSIONEX}."
151170
- name: Build packages
152171
run: |
153-
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-${{ matrix.arch }} dpkg-buildpackage -us -uc
172+
JAVA_HOME=/usr/lib/jvm/default-java dpkg-buildpackage -us -uc
154173
mv ../libdigidocpp*.* .
155174
- name: Lintian
156175
run: lintian *.deb;
157176
- name: Archive artifacts
158177
uses: actions/upload-artifact@v4
159178
with:
160-
name: ubuntu_${{ matrix.container }}_${{ matrix.arch }}
179+
name: ${{ matrix.dist }}_${{ matrix.rel }}_${{ matrix.arch }}
161180
path: libdigidocpp*.*
162181
windows:
163182
name: Build on Windows

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Build-Depends:
1010
libxmlsec1-dev,
1111
doxygen,
1212
swig,
13-
java17-sdk-headless,
13+
default-jdk-headless,
1414
libpython3-dev,
1515
python3-setuptools
1616
Standards-Version: 4.6.1

0 commit comments

Comments
 (0)