Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.*/
build/
Dockerfile*
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build
on:
- push
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
include:
- image_name: debian
image_tag: 11
- image_name: debian
image_tag: 12
- image_name: debian
image_tag: 13
- image_name: ubuntu
image_tag: 20.04
- image_name: ubuntu
image_tag: 22.04
- image_name: ubuntu
image_tag: 24.04
- image_name: ubuntu
image_tag: 26.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Build
run: |
set -euxo pipefail
export DOCKER_BUILDKIT=1
docker build \
--progress=plain \
--output=build \
--target=artifacts \
--build-arg=IMAGE=${{ matrix.image_name }}:${{ matrix.image_tag }} \
.
for p in build/*.deb; do
mv "$p" "${p/-Linux\.deb/-${{ matrix.image_name }}-${{ matrix.image_tag }}.deb}"
done
- name: Archive
uses: actions/upload-artifact@v6
with:
name: artifacts-${{ matrix.image_name }}-${{ matrix.image_tag }}
path: |
build/*.deb
52 changes: 52 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
ARG IMAGE=debian:13
ARG NETWORK_NM=OFF
ARG NETWORK_CM=OFF
FROM ${IMAGE} AS build
ARG IMAGE
ENV DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC
RUN apt-get update && \
apt-get install -y \
cmake \
file \
g++ \
git \
python3 \
devscripts \
libace-dev \
libglib2.0-dev \
libcurl4-openssl-dev \
libxerces-c-dev \
libnl-3-dev \
libnl-route-3-dev \
libxml2-dev \
libidn2-0-dev
COPY . /lms/
RUN set -x && \
cd /lms && \
if [ "${IMAGE}" = "ubuntu:26.04" ]; then sed -i -E 's,libxml2,libxml2-16,g' CMakeLists.txt; fi && \
mkdir build && \
cd build && \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DNETWORK_NM=${NETWORK_NM} \
-DNETWORK_CM=${NETWORK_CM} \
.. && \
make -j$(nproc) package && \
ldd UNS/lms && \
dpkg-deb --info *.deb && \
dpkg-deb --contents *.deb

FROM ${IMAGE} AS test
ENV DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC
RUN apt-get update && \
apt-get install -y \
dpkg-dev
COPY --from=build /lms/build/*.deb /test/
RUN cd /test && \
dpkg-scanpackages . >Packages && \
echo 'deb [trusted=yes] file:/test ./' >/etc/apt/sources.list.d/test.list && \
apt-get update
RUN apt-get install -y lms

FROM scratch AS artifacts
COPY --from=test /test/*.deb /