File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ . * /
2+ build /
3+ Dockerfile *
Original file line number Diff line number Diff line change 1+ name : Build
2+ on :
3+ - push
4+ jobs :
5+ build :
6+ name : Build
7+ strategy :
8+ fail-fast : false
9+ matrix :
10+ include :
11+ - image_name : debian
12+ image_tag : 11
13+ - image_name : ubuntu
14+ image_tag : 20.04
15+ - image_name : ubuntu
16+ image_tag : 22.04
17+ runs-on : ubuntu-20.04
18+ steps :
19+ - uses : actions/checkout@v3
20+ - name : Build
21+ run : |
22+ set -euxo pipefail
23+ export DOCKER_BUILDKIT=1
24+ docker build \
25+ --progress=plain \
26+ --output=build \
27+ --target=artifacts \
28+ --build-arg=IMAGE=${{ matrix.image_name }}:${{ matrix.image_tag }} \
29+ .
30+ for p in build/*.deb; do
31+ mv "$p" "${p/-Linux\.deb/-${{ matrix.image_name }}-${{ matrix.image_tag }}.deb}"
32+ done
33+ - name : Archive
34+ uses : actions/upload-artifact@v3
35+ with :
36+ name : Artifacts
37+ path : |
38+ build/*.deb
Original file line number Diff line number Diff line change 1+ ARG IMAGE=debian:11
2+ ARG NETWORK_NM=OFF
3+ ARG NETWORK_CM=OFF
4+ FROM ${IMAGE} as build
5+ ENV DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC
6+ RUN apt-get update && \
7+ apt-get install -y \
8+ cmake \
9+ file \
10+ g++ \
11+ git \
12+ python3 \
13+ devscripts \
14+ libace-dev \
15+ libglib2.0-dev \
16+ libcurl4-openssl-dev \
17+ libxerces-c-dev \
18+ libnl-3-dev \
19+ libnl-route-3-dev \
20+ libxml2-dev
21+ COPY . /lms/
22+ RUN set -x && \
23+ cd /lms && \
24+ mkdir build && \
25+ cd build && \
26+ cmake \
27+ -DCMAKE_INSTALL_PREFIX=/usr \
28+ -DNETWORK_NM=${NETWORK_NM} \
29+ -DNETWORK_CM=${NETWORK_CM} \
30+ .. && \
31+ make -j$(nproc) package && \
32+ ldd UNS/lms && \
33+ dpkg-deb --info *.deb && \
34+ dpkg-deb --contents *.deb
35+
36+ FROM ${IMAGE} as test
37+ ENV DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC
38+ RUN apt-get update && \
39+ apt-get install -y \
40+ dpkg-dev
41+ COPY --from=build /lms/build/*.deb /test/
42+ RUN cd /test && \
43+ dpkg-scanpackages . >Packages && \
44+ echo 'deb [trusted=yes] file:/test ./' >/etc/apt/sources.list.d/test.list && \
45+ apt-get update
46+ RUN apt-get install -y lms
47+
48+ FROM scratch as artifacts
49+ COPY --from=test /test/*.deb /
You can’t perform that action at this time.
0 commit comments