Skip to content

Commit 870ca2a

Browse files
committed
[GHA] Add Debian Trixie build target
1 parent 0a9a1bd commit 870ca2a

File tree

4 files changed

+271
-0
lines changed

4 files changed

+271
-0
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
ARG BUILDER_IMAGE=debian:trixie-20250520
2+
3+
FROM ${BUILDER_IMAGE} AS builder
4+
ARG MAINTAINER_NAME="Andrey Volk"
5+
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
6+
7+
ARG CODENAME=trixie
8+
ARG ARCH=amd64
9+
10+
ARG BUILD_NUMBER=42
11+
ARG GIT_SHA=0000000000
12+
13+
ARG DATA_DIR=/data
14+
15+
LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
16+
17+
SHELL ["/bin/bash", "-c"]
18+
19+
ENV DEBIAN_FRONTEND=noninteractive
20+
21+
RUN apt-get -q update \
22+
&& apt-get -y -q install \
23+
apt-transport-https \
24+
autoconf \
25+
automake \
26+
build-essential \
27+
ca-certificates \
28+
cmake \
29+
curl \
30+
debhelper \
31+
devscripts \
32+
dh-autoreconf \
33+
docbook-xsl \
34+
dos2unix \
35+
doxygen \
36+
dpkg-dev \
37+
git \
38+
graphviz \
39+
libglib2.0-dev \
40+
libssl-dev \
41+
lsb-release \
42+
pkg-config \
43+
wget
44+
45+
RUN update-ca-certificates --fresh
46+
47+
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
48+
&& echo "export ARCH=${ARCH}" | tee -a ~/.env \
49+
&& chmod +x ~/.env
50+
51+
RUN git config --global --add safe.directory '*' \
52+
&& git config --global user.name "${MAINTAINER_NAME}" \
53+
&& git config --global user.email "${MAINTAINER_EMAIL}"
54+
55+
# Bootstrap and Build
56+
COPY . ${DATA_DIR}
57+
WORKDIR ${DATA_DIR}
58+
59+
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
60+
| tee -a ~/.env
61+
62+
RUN apt-get -q update \
63+
&& mk-build-deps \
64+
--install \
65+
--remove debian/control \
66+
--tool "apt-get -y --no-install-recommends" \
67+
&& apt-get -y -f install
68+
69+
ENV DEB_BUILD_OPTIONS="parallel=1"
70+
71+
RUN . ~/.env \
72+
&& dch \
73+
--controlmaint \
74+
--distribution "${CODENAME}" \
75+
--force-bad-version \
76+
--force-distribution \
77+
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
78+
"Nightly build, ${GIT_SHA}" \
79+
&& debuild \
80+
--no-tgz-check \
81+
--build=binary \
82+
--unsigned-source \
83+
--unsigned-changes \
84+
&& mkdir OUT \
85+
&& mv -v ../*.{deb,changes} OUT/.
86+
87+
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
88+
FROM scratch
89+
COPY --from=builder /data/OUT/ /
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
ARG BUILDER_IMAGE=arm32v7/debian:trixie-20250520
2+
3+
FROM --platform=linux/arm/v7 ${BUILDER_IMAGE} AS builder
4+
5+
ARG MAINTAINER_NAME="Andrey Volk"
6+
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
7+
8+
ARG CODENAME=trixie
9+
ARG ARCH=arm32
10+
11+
ARG BUILD_NUMBER=42
12+
ARG GIT_SHA=0000000000
13+
14+
ARG DATA_DIR=/data
15+
16+
LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
17+
18+
SHELL ["/bin/bash", "-c"]
19+
20+
ENV DEBIAN_FRONTEND=noninteractive
21+
22+
RUN apt-get -q update \
23+
&& apt-get -y -q install \
24+
apt-transport-https \
25+
autoconf \
26+
automake \
27+
build-essential \
28+
ca-certificates \
29+
cmake \
30+
curl \
31+
debhelper \
32+
devscripts \
33+
dh-autoreconf \
34+
docbook-xsl \
35+
dos2unix \
36+
doxygen \
37+
dpkg-dev \
38+
git \
39+
graphviz \
40+
libglib2.0-dev \
41+
libssl-dev \
42+
lsb-release \
43+
pkg-config \
44+
wget
45+
46+
RUN update-ca-certificates --fresh
47+
48+
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
49+
&& echo "export ARCH=${ARCH}" | tee -a ~/.env \
50+
&& chmod +x ~/.env
51+
52+
RUN git config --global --add safe.directory '*' \
53+
&& git config --global user.name "${MAINTAINER_NAME}" \
54+
&& git config --global user.email "${MAINTAINER_EMAIL}"
55+
56+
# Bootstrap and Build
57+
COPY . ${DATA_DIR}
58+
WORKDIR ${DATA_DIR}
59+
60+
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
61+
| tee -a ~/.env
62+
63+
RUN apt-get -q update \
64+
&& mk-build-deps \
65+
--install \
66+
--remove debian/control \
67+
--tool "apt-get -y --no-install-recommends" \
68+
&& apt-get -y -f install
69+
70+
ENV DEB_BUILD_OPTIONS="parallel=1"
71+
72+
RUN . ~/.env \
73+
&& dch \
74+
--controlmaint \
75+
--distribution "${CODENAME}" \
76+
--force-bad-version \
77+
--force-distribution \
78+
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
79+
"Nightly build, ${GIT_SHA}" \
80+
&& debuild \
81+
--no-tgz-check \
82+
--build=binary \
83+
--unsigned-source \
84+
--unsigned-changes \
85+
&& mkdir OUT \
86+
&& mv -v ../*.{deb,changes} OUT/.
87+
88+
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
89+
FROM scratch
90+
COPY --from=builder /data/OUT/ /
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
ARG BUILDER_IMAGE=arm64v8/debian:trixie-20250520
2+
3+
FROM --platform=linux/arm64 ${BUILDER_IMAGE} AS builder
4+
5+
ARG MAINTAINER_NAME="Andrey Volk"
6+
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
7+
8+
ARG CODENAME=trixie
9+
ARG ARCH=arm64
10+
11+
ARG BUILD_NUMBER=42
12+
ARG GIT_SHA=0000000000
13+
14+
ARG DATA_DIR=/data
15+
16+
LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
17+
18+
SHELL ["/bin/bash", "-c"]
19+
20+
ENV DEBIAN_FRONTEND=noninteractive
21+
22+
RUN apt-get -q update \
23+
&& apt-get -y -q install \
24+
apt-transport-https \
25+
autoconf \
26+
automake \
27+
build-essential \
28+
ca-certificates \
29+
cmake \
30+
curl \
31+
debhelper \
32+
devscripts \
33+
dh-autoreconf \
34+
docbook-xsl \
35+
dos2unix \
36+
doxygen \
37+
dpkg-dev \
38+
git \
39+
graphviz \
40+
libglib2.0-dev \
41+
libssl-dev \
42+
lsb-release \
43+
pkg-config \
44+
wget
45+
46+
RUN update-ca-certificates --fresh
47+
48+
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
49+
&& echo "export ARCH=${ARCH}" | tee -a ~/.env \
50+
&& chmod +x ~/.env
51+
52+
RUN git config --global --add safe.directory '*' \
53+
&& git config --global user.name "${MAINTAINER_NAME}" \
54+
&& git config --global user.email "${MAINTAINER_EMAIL}"
55+
56+
# Bootstrap and Build
57+
COPY . ${DATA_DIR}
58+
WORKDIR ${DATA_DIR}
59+
60+
RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
61+
| tee -a ~/.env
62+
63+
RUN apt-get -q update \
64+
&& mk-build-deps \
65+
--install \
66+
--remove debian/control \
67+
--tool "apt-get -y --no-install-recommends" \
68+
&& apt-get -y -f install
69+
70+
ENV DEB_BUILD_OPTIONS="parallel=1"
71+
72+
RUN . ~/.env \
73+
&& dch \
74+
--controlmaint \
75+
--distribution "${CODENAME}" \
76+
--force-bad-version \
77+
--force-distribution \
78+
--newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
79+
"Nightly build, ${GIT_SHA}" \
80+
&& debuild \
81+
--no-tgz-check \
82+
--build=binary \
83+
--unsigned-source \
84+
--unsigned-changes \
85+
&& mkdir OUT \
86+
&& mv -v ../*.{deb,changes} OUT/.
87+
88+
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
89+
FROM scratch
90+
COPY --from=builder /data/OUT/ /

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
os:
2727
- debian
2828
version:
29+
- trixie
2930
- bookworm
3031
- bullseye
3132
platform:
@@ -67,6 +68,7 @@ jobs:
6768
os:
6869
- debian
6970
version:
71+
- trixie
7072
- bookworm
7173
- bullseye
7274
platform:

0 commit comments

Comments
 (0)