From ca06260eeba6a4f44da490a4ca5cf36a177fce05 Mon Sep 17 00:00:00 2001 From: s3rj1k Date: Thu, 29 May 2025 23:16:48 +0200 Subject: [PATCH] [GHA] Add Debian `Trixie` build target --- .github/docker/debian/trixie/amd64/Dockerfile | 89 +++++++++++++++++++ .../docker/debian/trixie/arm32v7/Dockerfile | 89 +++++++++++++++++++ .../docker/debian/trixie/arm64v8/Dockerfile | 89 +++++++++++++++++++ .github/workflows/build.yml | 2 + 4 files changed, 269 insertions(+) create mode 100644 .github/docker/debian/trixie/amd64/Dockerfile create mode 100644 .github/docker/debian/trixie/arm32v7/Dockerfile create mode 100644 .github/docker/debian/trixie/arm64v8/Dockerfile diff --git a/.github/docker/debian/trixie/amd64/Dockerfile b/.github/docker/debian/trixie/amd64/Dockerfile new file mode 100644 index 000000000..f1384fc16 --- /dev/null +++ b/.github/docker/debian/trixie/amd64/Dockerfile @@ -0,0 +1,89 @@ +ARG BUILDER_IMAGE=debian:trixie-20250520 + +FROM ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=trixie +ARG ARCH=amd64 + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +# Bootstrap and Build +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \ + | tee -a ~/.env + +RUN apt-get -q update \ + && mk-build-deps \ + --install \ + --remove debian/control \ + --tool "apt-get -y --no-install-recommends" \ + && apt-get -y -f install + +ENV DEB_BUILD_OPTIONS="parallel=1" + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + "Nightly build, ${GIT_SHA}" \ + && debuild \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/trixie/arm32v7/Dockerfile b/.github/docker/debian/trixie/arm32v7/Dockerfile new file mode 100644 index 000000000..f6bd28406 --- /dev/null +++ b/.github/docker/debian/trixie/arm32v7/Dockerfile @@ -0,0 +1,89 @@ +ARG BUILDER_IMAGE=arm32v7/debian:trixie-20250520 + +FROM --platform=linux/arm/v7 ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=trixie +ARG ARCH=arm32 + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +# Bootstrap and Build +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \ + | tee -a ~/.env + +RUN apt-get -q update \ + && mk-build-deps \ + --install \ + --remove debian/control \ + --tool "apt-get -y --no-install-recommends" \ + && apt-get -y -f install + +ENV DEB_BUILD_OPTIONS="parallel=1" + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + "Nightly build, ${GIT_SHA}" \ + && debuild \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/docker/debian/trixie/arm64v8/Dockerfile b/.github/docker/debian/trixie/arm64v8/Dockerfile new file mode 100644 index 000000000..b3556234a --- /dev/null +++ b/.github/docker/debian/trixie/arm64v8/Dockerfile @@ -0,0 +1,89 @@ +ARG BUILDER_IMAGE=arm64v8/debian:trixie-20250520 + +FROM --platform=linux/arm64 ${BUILDER_IMAGE} AS builder + +ARG MAINTAINER_NAME="Andrey Volk" +ARG MAINTAINER_EMAIL="andrey@signalwire.com" + +ARG CODENAME=trixie +ARG ARCH=arm64 + +ARG BUILD_NUMBER=42 +ARG GIT_SHA=0000000000 + +ARG DATA_DIR=/data + +LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>" + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update \ + && apt-get -y -q install \ + apt-transport-https \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + devscripts \ + dh-autoreconf \ + dos2unix \ + doxygen \ + dpkg-dev \ + git \ + graphviz \ + libglib2.0-dev \ + libssl-dev \ + lsb-release \ + pkg-config \ + wget + +RUN update-ca-certificates --fresh + +RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \ + && echo "export ARCH=${ARCH}" | tee -a ~/.env \ + && chmod +x ~/.env + +RUN git config --global --add safe.directory '*' \ + && git config --global user.name "${MAINTAINER_NAME}" \ + && git config --global user.email "${MAINTAINER_EMAIL}" + +# Bootstrap and Build +COPY . ${DATA_DIR} +WORKDIR ${DATA_DIR} + +RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \ + | tee -a ~/.env + +RUN apt-get -q update \ + && mk-build-deps \ + --install \ + --remove debian/control \ + --tool "apt-get -y --no-install-recommends" \ + && apt-get -y -f install + +ENV DEB_BUILD_OPTIONS="parallel=1" + +RUN . ~/.env \ + && dch \ + --controlmaint \ + --distribution "${CODENAME}" \ + --force-bad-version \ + --force-distribution \ + --newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \ + "Nightly build, ${GIT_SHA}" \ + && debuild \ + --no-tgz-check \ + --build=binary \ + --unsigned-source \ + --unsigned-changes \ + && mkdir OUT \ + && mv -v ../*.{deb,changes} OUT/. + +# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) +FROM scratch +COPY --from=builder /data/OUT/ / diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae35f8138..a9addc175 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,6 +34,7 @@ jobs: version: - bookworm - bullseye + - trixie platform: - name: amd64 runner: ubuntu-latest @@ -83,6 +84,7 @@ jobs: version: - bookworm - bullseye + - trixie platform: - name: amd64 runner: ubuntu-latest