Skip to content

Commit ab62f4b

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 ab62f4b

File tree

2 files changed

+31
-10
lines changed

2 files changed

+31
-10
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,37 +127,58 @@ 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: sid}
148+
- {arch: amd64, dist: debian, rel: forky}
149+
- {arch: amd64, dist: debian, rel: trixie}
150+
- {arch: amd64, dist: debian, rel: bookworm}
151+
152+
# debian arm
153+
- {arch: arm64, dist: debian, rel: sid}
154+
- {arch: arm64, dist: debian, rel: forky}
155+
- {arch: arm64, dist: debian, rel: trixie}
156+
- {arch: arm64, dist: debian, rel: bookworm}
137157
env:
138158
DEBIAN_FRONTEND: noninteractive
139159
DEBFULLNAME: github-actions
140160
141161
steps:
142162
- 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
163+
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
144164
- name: Checkout
145165
uses: actions/checkout@v4
146166
- name: Setup changelog
147167
run: |
168+
. /etc/os-release
148169
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}."
170+
export VERSIONEX=${VERSION}+${VERSION_CODENAME}.${BUILD_NUMBER}
171+
dch --distribution ${VERSION_CODENAME} -v ${VERSIONEX} "Release ${VERSIONEX}."
151172
- name: Build packages
152173
run: |
153-
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-${{ matrix.arch }} dpkg-buildpackage -us -uc
174+
JAVA_HOME=/usr/lib/jvm/default-java dpkg-buildpackage -us -uc
154175
mv ../libdigidocpp*.* .
155176
- name: Lintian
156177
run: lintian *.deb;
157178
- name: Archive artifacts
158179
uses: actions/upload-artifact@v4
159180
with:
160-
name: ubuntu_${{ matrix.container }}_${{ matrix.arch }}
181+
name: ${{ matrix.dist }}_${{ matrix.rel }}_${{ matrix.arch }}
161182
path: libdigidocpp*.*
162183
windows:
163184
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)