fix: satiate hadolint
Build Container Image / build_oldstable_amd64 (push) Successful in 5m51s Details
Build Container Image / build_oldstable_i386 (push) Successful in 5m17s Details
Build Container Image / push_oldstable_amd64 (push) Successful in 1m25s Details
Build Container Image / build_oldstable_arm64 (push) Successful in 14m22s Details
Build Container Image / push_oldstable_i386 (push) Successful in 1m46s Details
Build Container Image / push_oldstable_arm64 (push) Successful in 1m33s Details
Build Container Image / build_stable_amd64 (push) Successful in 7m22s Details
Build Container Image / build_oldstable_armhf (push) Successful in 26m30s Details
Build Container Image / build_unstable_riscv64 (push) Successful in 30m45s Details
Build Container Image / build_stable_i386 (push) Successful in 7m55s Details
Build Container Image / push_oldstable_armhf (push) Successful in 1m20s Details
Build Container Image / build_stable_arm64 (push) Successful in 19m23s Details
Build Container Image / build_oldstable (push) Successful in 3m30s Details
Build Container Image / push_stable_amd64 (push) Successful in 1m56s Details
Build Container Image / push_stable_i386 (push) Successful in 1m48s Details
Build Container Image / push_stable_arm64 (push) Successful in 1m45s Details
Build Container Image / build_testing_amd64 (push) Successful in 8m7s Details
Build Container Image / build_testing_arm64 (push) Failing after 15m33s Details
Build Container Image / push_testing_arm64 (push) Has been skipped Details
Build Container Image / build_testing_llvm_arm64 (push) Has been skipped Details
Build Container Image / push_testing_llvm_arm64 (push) Has been skipped Details
Build Container Image / build_unstable_llvm_riscv64 (push) Successful in 15m2s Details
Build Container Image / build_testing_armhf (push) Failing after 1m15s Details
Build Container Image / push_testing_armhf (push) Has been skipped Details
Build Container Image / build_testing_llvm_armhf (push) Has been skipped Details
Build Container Image / push_testing_llvm_armhf (push) Has been skipped Details
Build Container Image / build_llvm_stable_armhf (push) Has been skipped Details
Build Container Image / push_llvm_stable_armhf (push) Has been skipped Details
Build Container Image / build_testing_i386 (push) Successful in 8m22s Details
Build Container Image / build_testing (push) Has been skipped Details
Build Container Image / push_testing_amd64 (push) Successful in 1m48s Details
Build Container Image / push_testing_i386 (push) Successful in 1m44s Details
Build Container Image / push_testing (push) Has been skipped Details
Build Container Image / build_unstable_amd64 (push) Successful in 8m15s Details
Build Container Image / build_unstable_arm64 (push) Failing after 15m50s Details
Build Container Image / push_unstable_arm64 (push) Has been skipped Details
Build Container Image / build_unstable_llvm_arm64 (push) Has been skipped Details
Build Container Image / push_unstable_llvm_arm64 (push) Has been skipped Details
Build Container Image / build_llvm_stable_riscv64 (push) Successful in 17m52s Details
Build Container Image / push_oldstable (push) Successful in 2m1s Details
Build Container Image / build_stable_armhf (push) Successful in 45m51s Details
Build Container Image / build_stable (push) Successful in 1m52s Details
Build Container Image / build_unstable_i386 (push) Successful in 8m49s Details
Build Container Image / build_combination (push) Successful in 1m29s Details
Build Container Image / push_stable_armhf (push) Successful in 1m34s Details
Build Container Image / push_unstable_amd64 (push) Successful in 1m41s Details
Build Container Image / push_unstable_i386 (push) Successful in 1m38s Details
Build Container Image / push_unstable_riscv64 (push) Successful in 1m34s Details
Build Container Image / push_combination (push) Successful in 1m36s Details
Build Container Image / build_oldstable_llvm_amd64 (push) Successful in 2m13s Details
Build Container Image / build_oldstable_llvm_i386 (push) Successful in 2m13s Details
Build Container Image / build_oldstable_llvm_armhf (push) Successful in 13m54s Details
Build Container Image / push_oldstable_llvm_amd64 (push) Successful in 1m29s Details
Build Container Image / push_oldstable_llvm_i386 (push) Successful in 1m33s Details
Build Container Image / build_unstable_armhf (push) Successful in 23m48s Details
Build Container Image / build_unstable (push) Has been skipped Details
Build Container Image / push_oldstable_llvm_armhf (push) Successful in 1m33s Details
Build Container Image / push_unstable_armhf (push) Successful in 1m28s Details
Build Container Image / push_unstable (push) Has been skipped Details
Build Container Image / build_stable_llvm_amd64 (push) Successful in 2m14s Details
Build Container Image / build_oldstable_llvm_arm64 (push) Successful in 5m19s Details
Build Container Image / build_stable_llvm_i386 (push) Successful in 2m35s Details
Build Container Image / build_oldstable_llvm (push) Successful in 2m17s Details
Build Container Image / push_oldstable_llvm_arm64 (push) Successful in 1m18s Details
Build Container Image / build_combination_llvm11 (push) Successful in 46s Details
Build Container Image / push_stable_llvm_amd64 (push) Successful in 1m40s Details
Build Container Image / push_oldstable_llvm (push) Successful in 1m51s Details
Build Container Image / push_combination_llvm11 (push) Successful in 39s Details
Build Container Image / push_stable_llvm_i386 (push) Successful in 1m36s Details
Build Container Image / build_stable_llvm_arm64 (push) Successful in 7m25s Details
Build Container Image / build_testing_llvm_amd64 (push) Successful in 2m42s Details
Build Container Image / build_stable_llvm_armhf (push) Successful in 19m27s Details
Build Container Image / push_stable_llvm_arm64 (push) Successful in 1m45s Details
Build Container Image / build_combination_llvm14 (push) Successful in 1m27s Details
Build Container Image / push_stable_llvm_armhf (push) Successful in 1m32s Details
Build Container Image / build_stable_llvm (push) Successful in 2m27s Details
Build Container Image / push_combination_llvm14 (push) Successful in 38s Details
Build Container Image / push_testing_llvm_amd64 (push) Successful in 1m43s Details
Build Container Image / build_unstable_llvm_armhf (push) Successful in 7m4s Details
Build Container Image / push_stable_llvm (push) Successful in 2m36s Details
Build Container Image / build_testing_llvm_i386 (push) Successful in 2m39s Details
Build Container Image / build_testing_llvm (push) Has been skipped Details
Build Container Image / build_combination_llvm16 (push) Has been skipped Details
Build Container Image / build_unstable_llvm_amd64 (push) Successful in 2m17s Details
Build Container Image / push_testing_llvm_i386 (push) Successful in 1m46s Details
Build Container Image / push_testing_llvm (push) Has been skipped Details
Build Container Image / push_unstable_llvm_amd64 (push) Successful in 1m44s Details
Build Container Image / build_llvm_stable_arm64 (push) Successful in 8m55s Details
Build Container Image / build_unstable_llvm_i386 (push) Successful in 2m35s Details
Build Container Image / push_unstable_llvm_armhf (push) Successful in 1m33s Details
Build Container Image / push_unstable_llvm_i386 (push) Successful in 1m47s Details
Build Container Image / push_unstable_llvm_riscv64 (push) Successful in 1m42s Details
Build Container Image / build_unstable_llvm (push) Has been skipped Details
Build Container Image / push_unstable_llvm (push) Has been skipped Details
Build Container Image / push_combination_llvm16 (push) Has been skipped Details
Build Container Image / build_llvm_stable_amd64 (push) Successful in 2m40s Details
Build Container Image / build_llvm_stable_i386 (push) Successful in 2m45s Details
Build Container Image / build_llvm_stable (push) Has been skipped Details
Build Container Image / push_llvm_stable_amd64 (push) Successful in 2m0s Details
Build Container Image / push_llvm_stable_i386 (push) Successful in 1m58s Details
Build Container Image / push_llvm_stable_arm64 (push) Successful in 1m55s Details
Build Container Image / push_llvm_stable_riscv64 (push) Successful in 2m6s Details
Build Container Image / push_llvm_stable (push) Has been skipped Details
Build Container Image / push_stable (push) Failing after 10s Details
Build Container Image / update_readme (push) Has been skipped Details

This commit is contained in:
Daniel Wolf 2024-03-31 11:16:00 -04:00
parent 62467b4ab1
commit 2a3eb13246
Signed by: nephatrine
GPG Key ID: 59D70EC2E4AAB4D0
4 changed files with 172 additions and 139 deletions

View File

@ -1,21 +1,22 @@
# SPDX-FileCopyrightText: 2023 Daniel Wolf <nephatrine@gmail.com>
# SPDX-FileCopyrightText: 2023 - 2024 Daniel Wolf <nephatrine@gmail.com>
#
# SPDX-License-Identifier: ISC
FROM debian:bookworm-slim AS debbase
ARG DEBIAN_FRONTEND=noninteractive
RUN echo "====== INSTALL BASE PACKAGES ======" \
&& apt-get update \
# hadolint ignore=DL3005,DL3008
RUN apt-get update \
&& apt-get -o Dpkg::Options::="--force-confnew" dist-upgrade -y \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
apt-utils bash ca-certificates curl file gawk git git-lfs jq libarchive-tools \
lsb-release npm p7zip-full subversion unzip wget zip \
&& update-ca-certificates \
&& rm -rf /tmp/* /var/tmp/*
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo "====== INSTALL BUILD PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
autoconf automake binutils bison build-essential cmake debsigs dpkg-dev flex \
libtool nasm ninja-build pkgconf texinfo \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
@ -25,52 +26,54 @@ RUN echo "====== INSTALL BUILD PACKAGES ======" \
&& rm -rf /tmp/* /var/tmp/*
ENV PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin
RUN echo "====== INSTALL PYTHON PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008,DL3013
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
pipx reuse \
&& apt-get autoremove -y && apt-get clean \
&& pipx install cmakelang \
&& rm -rf /tmp/* /var/tmp/*
ENV CGO_ENABLED=1 CGO_CFLAGS="-D_LARGEFILE64_SOURCE" GOPATH=/go
RUN echo "====== INSTALL GOLANG PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
golang \
&& apt-get autoremove -y && apt-get clean \
&& go install github.com/mdomke/git-semver/v6@latest \
&& rm -rf /tmp/* /var/tmp/*
ENV PATH ${GOPATH}/bin:$PATH
RUN echo "====== INSTALL DOCUMENTATION PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
doxygen-latex graphviz imagemagick librsvg2-bin mscgen python3-jinja2 \
python3-pygments \
&& apt-get autoremove -y && apt-get clean \
&& git -C "${HOME}" clone --single-branch --depth=1 https://github.com/mosra/m.css && cd "${HOME}/m.css" \
&& rm -rf documentation/test* \
&& git -C "${HOME}" clone --single-branch --depth=1 https://github.com/mosra/m.css \
&& rm -rf "${HOME}"/m.css/documentation/test* \
&& mkdir /opt/m.css \
&& mv documentation /opt/m.css/bin && mv COPYING /opt/m.css/ \
&& mv css /opt/m.css/css && mv plugins /opt/m.css/plugins \
&& cd .. && rm -rf /tmp/* /var/tmp/* "${HOME}/m.css"
&& mv "${HOME}/m.css/documentation" /opt/m.css/bin && mv "${HOME}/m.css/COPYING" /opt/m.css/ \
&& mv "${HOME}/m.css/css" /opt/m.css/css && mv "${HOME}/m.css/plugins" /opt/m.css/plugins \
&& rm -rf /tmp/* /var/tmp/* "${HOME}/m.css"
ENV PATH=/opt/m.css/bin:$PATH
RUN echo "====== NephNET Setup ======" \
&& export DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& curl https://code.nephatrine.net/api/packages/NephNET/debian/repository.key -o /etc/apt/keyrings/gitea-NephNET.asc \
&& cd /tmp && wget --progress=dot:giga "https://code.nephatrine.net/api/packages/NephNET/debian/pool/${DEBIAN_CODENAME}/dists/Release" || true \
&& if [ -e "/tmp/Release" ]; then echo "deb [signed-by=/etc/apt/keyrings/gitea-NephNET.asc] https://code.nephatrine.net/api/packages/NephNET/debian ${DEBIAN_CODENAME} main" >/etc/apt/sources.list.d/gitea.list \
RUN DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& export DEBIAN_CODENAME \
&& if curl --output /dev/null --silent --fail -r 0-0 "https://code.nephatrine.net/api/packages/NephNET/debian/pool/${DEBIAN_CODENAME}/dists/Release"; then echo "Installing NephNET" \
&& curl https://code.nephatrine.net/api/packages/NephNET/debian/repository.key -o /etc/apt/keyrings/gitea-NephNET.asc \
&& echo "deb [signed-by=/etc/apt/keyrings/gitea-NephNET.asc] https://code.nephatrine.net/api/packages/NephNET/debian ${DEBIAN_CODENAME} main" >/etc/apt/sources.list.d/NephNET.list \
&& apt-get update; fi \
&& rm -rf /tmp/* /var/tmp/*
FROM debbase AS llvm
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV LLVM_MAJOR=14
RUN echo "====== INSTALL LLVM PACKAGES ======" \
&& export DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key >/etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& cd /tmp && wget --progress=dot:giga "https://apt.llvm.org/${DEBIAN_CODENAME}/dists/llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR}/Release" || true \
&& if [ -e "/tmp/Release" ]; then echo "deb http://apt.llvm.org/${DEBIAN_CODENAME}/ llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
# hadolint ignore=DL3008
RUN DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& export DEBIAN_CODENAME \
&& if curl --output /dev/null --silent --fail -r 0-0 "https://apt.llvm.org/${DEBIAN_CODENAME}/dists/llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR}/Release"; then echo "Installing LLVM" \
&& curl https://apt.llvm.org/llvm-snapshot.gpg.key -o /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& echo "deb http://apt.llvm.org/${DEBIAN_CODENAME}/ llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
&& apt-get update; fi \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"llvm-${LLVM_MAJOR}-dev" "clang-${LLVM_MAJOR}" "clang-tools-${LLVM_MAJOR}" \
@ -80,7 +83,11 @@ RUN echo "====== INSTALL LLVM PACKAGES ======" \
"libc++abi-${LLVM_MAJOR}-dev" "libomp-${LLVM_MAJOR}-dev" \
&& if [ ${LLVM_MAJOR} -gt 11 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclc-${LLVM_MAJOR}-dev" "libunwind-${LLVM_MAJOR}-dev"; fi \
&& if [ ${LLVM_MAJOR} -gt 13 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
&& if [ ${LLVM_MAJOR} -eq 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" || true; fi \
&& if [ ${LLVM_MAJOR} -eq 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" "libpolly-${LLVM_MAJOR}-dev" || true; fi \
&& if [ ${LLVM_MAJOR} -gt 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" "libpolly-${LLVM_MAJOR}-dev"; fi \
&& apt-get autoremove -y && apt-get clean \
&& ls "/usr/lib/clang/${LLVM_MAJOR}" \
@ -185,8 +192,8 @@ RUN echo "====== INSTALL LLVM PACKAGES ======" \
&& rm -rf /tmp/* /var/tmp/*
COPY override /
RUN echo "====== TEST TOOLCHAINS ======" \
&& git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
# hadolint ignore=DL3003
RUN git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
&& mkdir "/tmp/build-$(uname -m)-clang" && cd "/tmp/build-$(uname -m)-clang" \
&& "nxbuild-linux-$(uname -m)" -GNinja "${HOME}/hello-test" \
&& ninja && ninja test \
@ -196,8 +203,8 @@ FROM debbase
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
COPY override/usr/local/bin/uname /usr/local/bin/uname
RUN echo "====== INSTALL MULTILIB PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
clang-format clang-tidy \
&& if [ "$(uname -m)" = "x86_64" ]; then dpkg --add-architecture i386 \
&& apt-get update \
@ -223,8 +230,8 @@ RUN echo "====== INSTALL MULTILIB PACKAGES ======" \
&& rm -rf /tmp/* /var/tmp/*
COPY override /
RUN echo "====== TEST TOOLCHAINS ======" \
&& git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
# hadolint ignore=DL3003
RUN git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
&& mkdir "/tmp/build-$(uname -m)" && cd "/tmp/build-$(uname -m)" \
&& "nxbuild-linux-$(uname -m)" -GNinja "${HOME}/hello-test" \
&& ninja && ninja test \

View File

@ -1,21 +1,22 @@
# SPDX-FileCopyrightText: 2024 Daniel Wolf <nephatrine@gmail.com>
# SPDX-FileCopyrightText: 2023 - 2024 Daniel Wolf <nephatrine@gmail.com>
#
# SPDX-License-Identifier: ISC
FROM debian:bullseye-slim AS debbase
ARG DEBIAN_FRONTEND=noninteractive
RUN echo "====== INSTALL BASE PACKAGES ======" \
&& apt-get update \
# hadolint ignore=DL3005,DL3008
RUN apt-get update \
&& apt-get -o Dpkg::Options::="--force-confnew" dist-upgrade -y \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
apt-utils bash ca-certificates curl file gawk git git-lfs jq libarchive-tools \
lsb-release npm p7zip-full subversion unzip wget zip \
&& update-ca-certificates \
&& rm -rf /tmp/* /var/tmp/*
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo "====== INSTALL BUILD PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
autoconf automake binutils bison build-essential cmake debsigs dpkg-dev flex \
libtool nasm ninja-build pkgconf texinfo \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
@ -24,53 +25,55 @@ RUN echo "====== INSTALL BUILD PACKAGES ======" \
&& apt-get autoremove -y && apt-get clean \
&& rm -rf /tmp/* /var/tmp/*
RUN echo "====== INSTALL PYTHON PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008,DL3013
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
python3-pip \
&& apt-get autoremove -y && apt-get clean \
&& pip3 install cmakelang \
&& pip3 install reuse \
&& pip3 install --no-cache-dir cmakelang \
&& pip3 install --no-cache-dir reuse \
&& rm -rf /tmp/* /var/tmp/*
ENV CGO_ENABLED=1 CGO_CFLAGS="-D_LARGEFILE64_SOURCE" GOPATH=/go GO111MODULE=on
RUN echo "====== INSTALL GOLANG PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
golang \
&& apt-get autoremove -y && apt-get clean \
&& go get github.com/mdomke/git-semver/v5@latest \
&& rm -rf /tmp/* /var/tmp/*
ENV PATH ${GOPATH}/bin:$PATH
RUN echo "====== INSTALL DOCUMENTATION PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
doxygen-latex graphviz imagemagick librsvg2-bin mscgen python3-jinja2 \
python3-pygments \
&& apt-get autoremove -y && apt-get clean \
&& git -C "${HOME}" clone --single-branch --depth=1 https://github.com/mosra/m.css && cd "${HOME}/m.css" \
&& rm -rf documentation/test* \
&& git -C "${HOME}" clone --single-branch --depth=1 https://github.com/mosra/m.css \
&& rm -rf "${HOME}"/m.css/documentation/test* \
&& mkdir /opt/m.css \
&& mv documentation /opt/m.css/bin && mv COPYING /opt/m.css/ \
&& mv css /opt/m.css/css && mv plugins /opt/m.css/plugins \
&& cd .. && rm -rf /tmp/* /var/tmp/* "${HOME}/m.css"
&& mv "${HOME}/m.css/documentation" /opt/m.css/bin && mv "${HOME}/m.css/COPYING" /opt/m.css/ \
&& mv "${HOME}/m.css/css" /opt/m.css/css && mv "${HOME}/m.css/plugins" /opt/m.css/plugins \
&& rm -rf /tmp/* /var/tmp/* "${HOME}/m.css"
ENV PATH=/opt/m.css/bin:$PATH
RUN echo "====== NephNET Setup ======" \
&& export DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& curl https://code.nephatrine.net/api/packages/NephNET/debian/repository.key -o /etc/apt/keyrings/gitea-NephNET.asc \
&& cd /tmp && wget --progress=dot:giga "https://code.nephatrine.net/api/packages/NephNET/debian/pool/${DEBIAN_CODENAME}/dists/Release" || true \
&& if [ -e "/tmp/Release" ]; then echo "deb [signed-by=/etc/apt/keyrings/gitea-NephNET.asc] https://code.nephatrine.net/api/packages/NephNET/debian ${DEBIAN_CODENAME} main" >/etc/apt/sources.list.d/gitea.list \
RUN DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& export DEBIAN_CODENAME \
&& if curl --output /dev/null --silent --fail -r 0-0 "https://code.nephatrine.net/api/packages/NephNET/debian/pool/${DEBIAN_CODENAME}/dists/Release"; then echo "Installing NephNET" \
&& curl https://code.nephatrine.net/api/packages/NephNET/debian/repository.key -o /etc/apt/keyrings/gitea-NephNET.asc \
&& echo "deb [signed-by=/etc/apt/keyrings/gitea-NephNET.asc] https://code.nephatrine.net/api/packages/NephNET/debian ${DEBIAN_CODENAME} main" >/etc/apt/sources.list.d/NephNET.list \
&& apt-get update; fi \
&& rm -rf /tmp/* /var/tmp/*
FROM debbase AS llvm
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV LLVM_MAJOR=11
RUN echo "====== INSTALL LLVM PACKAGES ======" \
&& export DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key >/etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& cd /tmp && wget --progress=dot:giga "https://apt.llvm.org/${DEBIAN_CODENAME}/dists/llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR}/Release" || true \
&& if [ -e "/tmp/Release" ]; then echo "deb http://apt.llvm.org/${DEBIAN_CODENAME}/ llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
# hadolint ignore=DL3008
RUN DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& export DEBIAN_CODENAME \
&& if curl --output /dev/null --silent --fail -r 0-0 "https://apt.llvm.org/${DEBIAN_CODENAME}/dists/llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR}/Release"; then echo "Installing LLVM" \
&& curl https://apt.llvm.org/llvm-snapshot.gpg.key -o /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& echo "deb http://apt.llvm.org/${DEBIAN_CODENAME}/ llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
&& apt-get update; fi \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"llvm-${LLVM_MAJOR}-dev" "clang-${LLVM_MAJOR}" "clang-tools-${LLVM_MAJOR}" \
@ -80,7 +83,11 @@ RUN echo "====== INSTALL LLVM PACKAGES ======" \
"libc++abi-${LLVM_MAJOR}-dev" "libomp-${LLVM_MAJOR}-dev" \
&& if [ ${LLVM_MAJOR} -gt 11 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclc-${LLVM_MAJOR}-dev" "libunwind-${LLVM_MAJOR}-dev"; fi \
&& if [ ${LLVM_MAJOR} -gt 13 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
&& if [ ${LLVM_MAJOR} -eq 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" || true; fi \
&& if [ ${LLVM_MAJOR} -eq 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" "libpolly-${LLVM_MAJOR}-dev" || true; fi \
&& if [ ${LLVM_MAJOR} -gt 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" "libpolly-${LLVM_MAJOR}-dev"; fi \
&& apt-get autoremove -y && apt-get clean \
&& ls "/usr/lib/clang/${LLVM_MAJOR}" \
@ -185,8 +192,8 @@ RUN echo "====== INSTALL LLVM PACKAGES ======" \
&& rm -rf /tmp/* /var/tmp/*
COPY override /
RUN echo "====== TEST TOOLCHAINS ======" \
&& git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
# hadolint ignore=DL3003
RUN git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
&& mkdir "/tmp/build-$(uname -m)-clang" && cd "/tmp/build-$(uname -m)-clang" \
&& "nxbuild-linux-$(uname -m)" -GNinja "${HOME}/hello-test" \
&& ninja && ninja test \
@ -196,8 +203,8 @@ FROM debbase
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
COPY override/usr/local/bin/uname /usr/local/bin/uname
RUN echo "====== INSTALL MULTILIB PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
clang-format clang-tidy \
&& if [ "$(uname -m)" = "x86_64" ]; then dpkg --add-architecture i386 \
&& apt-get update \
@ -223,8 +230,8 @@ RUN echo "====== INSTALL MULTILIB PACKAGES ======" \
&& rm -rf /tmp/* /var/tmp/*
COPY override /
RUN echo "====== TEST TOOLCHAINS ======" \
&& git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
# hadolint ignore=DL3003
RUN git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
&& mkdir "/tmp/build-$(uname -m)" && cd "/tmp/build-$(uname -m)" \
&& "nxbuild-linux-$(uname -m)" -GNinja "${HOME}/hello-test" \
&& ninja && ninja test \

View File

@ -1,21 +1,22 @@
# SPDX-FileCopyrightText: 2024 Daniel Wolf <nephatrine@gmail.com>
# SPDX-FileCopyrightText: 2023 - 2024 Daniel Wolf <nephatrine@gmail.com>
#
# SPDX-License-Identifier: ISC
FROM debian:trixie-slim AS debbase
ARG DEBIAN_FRONTEND=noninteractive
RUN echo "====== INSTALL BASE PACKAGES ======" \
&& apt-get update \
# hadolint ignore=DL3005,DL3008
RUN apt-get update \
&& apt-get -o Dpkg::Options::="--force-confnew" dist-upgrade -y \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
apt-utils bash ca-certificates curl file gawk git git-lfs jq libarchive-tools \
lsb-release npm p7zip-full subversion unzip wget zip \
&& update-ca-certificates \
&& rm -rf /tmp/* /var/tmp/*
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo "====== INSTALL BUILD PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
autoconf automake binutils bison build-essential cmake debsigs dpkg-dev flex \
libtool nasm ninja-build pkgconf texinfo \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
@ -25,55 +26,58 @@ RUN echo "====== INSTALL BUILD PACKAGES ======" \
&& rm -rf /tmp/* /var/tmp/*
ENV PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin
RUN echo "====== INSTALL PYTHON PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008,DL3013
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
pipx reuse \
&& apt-get autoremove -y && apt-get clean \
&& pipx install cmakelang \
&& rm -rf /tmp/* /var/tmp/*
ENV CGO_ENABLED=1 CGO_CFLAGS="-D_LARGEFILE64_SOURCE" GOPATH=/go
RUN echo "====== INSTALL GOLANG PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
golang \
&& apt-get autoremove -y && apt-get clean \
&& go install github.com/mdomke/git-semver/v6@latest \
&& rm -rf /tmp/* /var/tmp/*
ENV PATH ${GOPATH}/bin:$PATH
RUN echo "====== INSTALL DOCUMENTATION PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
doxygen-latex graphviz imagemagick librsvg2-bin mscgen python3-jinja2 \
python3-pygments \
&& apt-get autoremove -y && apt-get clean \
&& git -C "${HOME}" clone --single-branch --depth=1 https://github.com/mosra/m.css && cd "${HOME}/m.css" \
&& rm -rf documentation/test* \
&& git -C "${HOME}" clone --single-branch --depth=1 https://github.com/mosra/m.css \
&& rm -rf "${HOME}"/m.css/documentation/test* \
&& mkdir /opt/m.css \
&& mv documentation /opt/m.css/bin && mv COPYING /opt/m.css/ \
&& mv css /opt/m.css/css && mv plugins /opt/m.css/plugins \
&& cd .. && rm -rf /tmp/* /var/tmp/* "${HOME}/m.css"
&& mv "${HOME}/m.css/documentation" /opt/m.css/bin && mv "${HOME}/m.css/COPYING" /opt/m.css/ \
&& mv "${HOME}/m.css/css" /opt/m.css/css && mv "${HOME}/m.css/plugins" /opt/m.css/plugins \
&& rm -rf /tmp/* /var/tmp/* "${HOME}/m.css"
ENV PATH=/opt/m.css/bin:$PATH
RUN echo "====== NephNET Setup ======" \
&& export DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& curl https://code.nephatrine.net/api/packages/NephNET/debian/repository.key -o /etc/apt/keyrings/gitea-NephNET.asc \
&& cd /tmp && wget --progress=dot:giga "https://code.nephatrine.net/api/packages/NephNET/debian/pool/${DEBIAN_CODENAME}/dists/Release" || true \
&& if [ -e "/tmp/Release" ]; then echo "deb [signed-by=/etc/apt/keyrings/gitea-NephNET.asc] https://code.nephatrine.net/api/packages/NephNET/debian ${DEBIAN_CODENAME} main" >/etc/apt/sources.list.d/gitea.list \
RUN DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& export DEBIAN_CODENAME \
&& if curl --output /dev/null --silent --fail -r 0-0 "https://code.nephatrine.net/api/packages/NephNET/debian/pool/${DEBIAN_CODENAME}/dists/Release"; then echo "Installing NephNET" \
&& curl https://code.nephatrine.net/api/packages/NephNET/debian/repository.key -o /etc/apt/keyrings/gitea-NephNET.asc \
&& echo "deb [signed-by=/etc/apt/keyrings/gitea-NephNET.asc] https://code.nephatrine.net/api/packages/NephNET/debian ${DEBIAN_CODENAME} main" >/etc/apt/sources.list.d/NephNET.list \
&& apt-get update; fi \
&& rm -rf /tmp/* /var/tmp/*
FROM debbase AS llvm
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV LLVM_MAJOR=16
RUN echo "====== INSTALL LLVM PACKAGES ======" \
&& export DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key >/etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& cd /tmp && wget --progress=dot:giga "https://apt.llvm.org/${DEBIAN_CODENAME}/dists/llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR}/Release" || true \
&& if [ -e "/tmp/Release" ]; then echo "deb http://apt.llvm.org/${DEBIAN_CODENAME}/ llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
&& apt-get update; else cd /tmp && wget --progress=dot:giga "https://apt.llvm.org/unstable/dists/llvm-toolchain-${LLVM_MAJOR}/Release" || true \
&& if [ -e "/tmp/Release" ]; then echo "deb http://apt.llvm.org/unstable/ llvm-toolchain-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
&& apt-get update; fi; fi \
# hadolint ignore=DL3008
RUN DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& export DEBIAN_CODENAME \
&& if curl --output /dev/null --silent --fail -r 0-0 "https://apt.llvm.org/${DEBIAN_CODENAME}/dists/llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR}/Release"; then echo "Installing LLVM" \
&& curl https://apt.llvm.org/llvm-snapshot.gpg.key -o /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& echo "deb http://apt.llvm.org/${DEBIAN_CODENAME}/ llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
&& apt-get update; elif curl --output /dev/null --silent --fail -r 0-0 "https://apt.llvm.org/unstable/dists/llvm-toolchain-${LLVM_MAJOR}/Release"; then echo "Installing LLVM (Unstable)" \
&& curl https://apt.llvm.org/llvm-snapshot.gpg.key -o /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& echo "deb http://apt.llvm.org/unstable/ llvm-toolchain-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
&& apt-get update; fi \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"llvm-${LLVM_MAJOR}-dev" "clang-${LLVM_MAJOR}" "clang-tools-${LLVM_MAJOR}" \
"libclang-common-${LLVM_MAJOR}-dev" "libclang-${LLVM_MAJOR}-dev" \
@ -82,7 +86,11 @@ RUN echo "====== INSTALL LLVM PACKAGES ======" \
"libc++abi-${LLVM_MAJOR}-dev" "libomp-${LLVM_MAJOR}-dev" \
&& if [ ${LLVM_MAJOR} -gt 11 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclc-${LLVM_MAJOR}-dev" "libunwind-${LLVM_MAJOR}-dev"; fi \
&& if [ ${LLVM_MAJOR} -gt 13 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
&& if [ ${LLVM_MAJOR} -eq 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" || true; fi \
&& if [ ${LLVM_MAJOR} -eq 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" "libpolly-${LLVM_MAJOR}-dev" || true; fi \
&& if [ ${LLVM_MAJOR} -gt 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" "libpolly-${LLVM_MAJOR}-dev"; fi \
&& apt-get autoremove -y && apt-get clean \
&& ls "/usr/lib/clang/${LLVM_MAJOR}" \
@ -187,8 +195,8 @@ RUN echo "====== INSTALL LLVM PACKAGES ======" \
&& rm -rf /tmp/* /var/tmp/*
COPY override /
RUN echo "====== TEST TOOLCHAINS ======" \
&& git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
# hadolint ignore=DL3003
RUN git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
&& mkdir "/tmp/build-$(uname -m)-clang" && cd "/tmp/build-$(uname -m)-clang" \
&& "nxbuild-linux-$(uname -m)" -GNinja "${HOME}/hello-test" \
&& ninja && ninja test \
@ -198,8 +206,8 @@ FROM debbase
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
COPY override/usr/local/bin/uname /usr/local/bin/uname
RUN echo "====== INSTALL MULTILIB PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
clang-format clang-tidy \
&& if [ "$(uname -m)" = "x86_64" ]; then dpkg --add-architecture i386 \
&& apt-get update \
@ -225,8 +233,8 @@ RUN echo "====== INSTALL MULTILIB PACKAGES ======" \
&& rm -rf /tmp/* /var/tmp/*
COPY override /
RUN echo "====== TEST TOOLCHAINS ======" \
&& git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
# hadolint ignore=DL3003
RUN git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
&& mkdir "/tmp/build-$(uname -m)" && cd "/tmp/build-$(uname -m)" \
&& "nxbuild-linux-$(uname -m)" -GNinja "${HOME}/hello-test" \
&& ninja && ninja test \

View File

@ -5,17 +5,18 @@
FROM debian:sid-slim AS debbase
ARG DEBIAN_FRONTEND=noninteractive
RUN echo "====== INSTALL BASE PACKAGES ======" \
&& apt-get update \
# hadolint ignore=DL3005,DL3008
RUN apt-get update \
&& apt-get -o Dpkg::Options::="--force-confnew" dist-upgrade -y \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
apt-utils bash ca-certificates curl file gawk git git-lfs jq libarchive-tools \
lsb-release npm p7zip-full subversion unzip wget zip \
&& update-ca-certificates \
&& rm -rf /tmp/* /var/tmp/*
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo "====== INSTALL BUILD PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
autoconf automake binutils bison build-essential cmake debsigs dpkg-dev flex \
libtool nasm ninja-build pkgconf texinfo \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
@ -25,55 +26,58 @@ RUN echo "====== INSTALL BUILD PACKAGES ======" \
&& rm -rf /tmp/* /var/tmp/*
ENV PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin
RUN echo "====== INSTALL PYTHON PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008,DL3013
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
pipx reuse \
&& apt-get autoremove -y && apt-get clean \
&& pipx install cmakelang \
&& rm -rf /tmp/* /var/tmp/*
ENV CGO_ENABLED=1 CGO_CFLAGS="-D_LARGEFILE64_SOURCE" GOPATH=/go
RUN echo "====== INSTALL GOLANG PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
golang \
&& apt-get autoremove -y && apt-get clean \
&& go install github.com/mdomke/git-semver/v6@latest \
&& rm -rf /tmp/* /var/tmp/*
ENV PATH ${GOPATH}/bin:$PATH
RUN echo "====== INSTALL DOCUMENTATION PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
doxygen-latex graphviz imagemagick librsvg2-bin mscgen python3-jinja2 \
python3-pygments \
&& apt-get autoremove -y && apt-get clean \
&& git -C "${HOME}" clone --single-branch --depth=1 https://github.com/mosra/m.css && cd "${HOME}/m.css" \
&& rm -rf documentation/test* \
&& git -C "${HOME}" clone --single-branch --depth=1 https://github.com/mosra/m.css \
&& rm -rf "${HOME}"/m.css/documentation/test* \
&& mkdir /opt/m.css \
&& mv documentation /opt/m.css/bin && mv COPYING /opt/m.css/ \
&& mv css /opt/m.css/css && mv plugins /opt/m.css/plugins \
&& cd /tmp && rm -rf /tmp/* /var/tmp/* "${HOME}/m.css"
&& mv "${HOME}/m.css/documentation" /opt/m.css/bin && mv "${HOME}/m.css/COPYING" /opt/m.css/ \
&& mv "${HOME}/m.css/css" /opt/m.css/css && mv "${HOME}/m.css/plugins" /opt/m.css/plugins \
&& rm -rf /tmp/* /var/tmp/* "${HOME}/m.css"
ENV PATH=/opt/m.css/bin:$PATH
RUN echo "====== NephNET Setup ======" \
&& export DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& curl https://code.nephatrine.net/api/packages/NephNET/debian/repository.key -o /etc/apt/keyrings/gitea-NephNET.asc \
&& cd /tmp && wget --progress=dot:giga "https://code.nephatrine.net/api/packages/NephNET/debian/pool/${DEBIAN_CODENAME}/dists/Release" || true \
&& if [ -e "/tmp/Release" ]; then echo "deb [signed-by=/etc/apt/keyrings/gitea-NephNET.asc] https://code.nephatrine.net/api/packages/NephNET/debian ${DEBIAN_CODENAME} main" >/etc/apt/sources.list.d/gitea.list \
RUN DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& export DEBIAN_CODENAME \
&& if curl --output /dev/null --silent --fail -r 0-0 "https://code.nephatrine.net/api/packages/NephNET/debian/pool/${DEBIAN_CODENAME}/dists/Release"; then echo "Installing NephNET" \
&& curl https://code.nephatrine.net/api/packages/NephNET/debian/repository.key -o /etc/apt/keyrings/gitea-NephNET.asc \
&& echo "deb [signed-by=/etc/apt/keyrings/gitea-NephNET.asc] https://code.nephatrine.net/api/packages/NephNET/debian ${DEBIAN_CODENAME} main" >/etc/apt/sources.list.d/NephNET.list \
&& apt-get update; fi \
&& rm -rf /tmp/* /var/tmp/*
FROM debbase AS llvm
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV LLVM_MAJOR=16
RUN echo "====== INSTALL LLVM PACKAGES ======" \
&& export DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key >/etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& cd /tmp && wget --progress=dot:giga "https://apt.llvm.org/${DEBIAN_CODENAME}/dists/llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR}/Release" || true \
&& if [ -e "/tmp/Release" ]; then echo "deb http://apt.llvm.org/${DEBIAN_CODENAME}/ llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
&& apt-get update; else cd /tmp && wget --progress=dot:giga "https://apt.llvm.org/unstable/dists/llvm-toolchain-${LLVM_MAJOR}/Release" || true \
&& if [ -e "/tmp/Release" ]; then echo "deb http://apt.llvm.org/unstable/ llvm-toolchain-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
&& apt-get update; fi; fi \
# hadolint ignore=DL3008
RUN DEBIAN_CODENAME="$(lsb_release -c | awk '{print $2}')" \
&& export DEBIAN_CODENAME \
&& if curl --output /dev/null --silent --fail -r 0-0 "https://apt.llvm.org/${DEBIAN_CODENAME}/dists/llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR}/Release"; then echo "Installing LLVM" \
&& curl https://apt.llvm.org/llvm-snapshot.gpg.key -o /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& echo "deb http://apt.llvm.org/${DEBIAN_CODENAME}/ llvm-toolchain-${DEBIAN_CODENAME}-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
&& apt-get update; elif curl --output /dev/null --silent --fail -r 0-0 "https://apt.llvm.org/unstable/dists/llvm-toolchain-${LLVM_MAJOR}/Release"; then echo "Installing LLVM (Unstable)" \
&& curl https://apt.llvm.org/llvm-snapshot.gpg.key -o /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& echo "deb http://apt.llvm.org/unstable/ llvm-toolchain-${LLVM_MAJOR} main" >/etc/apt/sources.list.d/LLVM.list \
&& apt-get update; fi \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"llvm-${LLVM_MAJOR}-dev" "clang-${LLVM_MAJOR}" "clang-tools-${LLVM_MAJOR}" \
"libclang-common-${LLVM_MAJOR}-dev" "libclang-${LLVM_MAJOR}-dev" \
@ -82,7 +86,11 @@ RUN echo "====== INSTALL LLVM PACKAGES ======" \
"libc++abi-${LLVM_MAJOR}-dev" "libomp-${LLVM_MAJOR}-dev" \
&& if [ ${LLVM_MAJOR} -gt 11 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclc-${LLVM_MAJOR}-dev" "libunwind-${LLVM_MAJOR}-dev"; fi \
&& if [ ${LLVM_MAJOR} -gt 13 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
&& if [ ${LLVM_MAJOR} -eq 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" || true; fi \
&& if [ ${LLVM_MAJOR} -eq 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" "libpolly-${LLVM_MAJOR}-dev" || true; fi \
&& if [ ${LLVM_MAJOR} -gt 14 ]; then apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
"libclang-rt-${LLVM_MAJOR}-dev" "libpolly-${LLVM_MAJOR}-dev"; fi \
&& apt-get autoremove -y && apt-get clean \
&& ls "/usr/lib/clang/${LLVM_MAJOR}" \
@ -187,8 +195,8 @@ RUN echo "====== INSTALL LLVM PACKAGES ======" \
&& rm -rf /tmp/* /var/tmp/*
COPY override /
RUN echo "====== TEST TOOLCHAINS ======" \
&& git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
# hadolint ignore=DL3003
RUN git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
&& mkdir "/tmp/build-$(uname -m)-clang" && cd "/tmp/build-$(uname -m)-clang" \
&& "nxbuild-linux-$(uname -m)" -GNinja "${HOME}/hello-test" \
&& ninja && ninja test \
@ -198,8 +206,8 @@ FROM debbase
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
COPY override/usr/local/bin/uname /usr/local/bin/uname
RUN echo "====== INSTALL MULTILIB PACKAGES ======" \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
# hadolint ignore=DL3008
RUN apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends \
clang-format clang-tidy \
&& if [ "$(uname -m)" = "x86_64" ]; then dpkg --add-architecture i386 \
&& apt-get update \
@ -225,12 +233,15 @@ RUN echo "====== INSTALL MULTILIB PACKAGES ======" \
&& rm -rf /tmp/* /var/tmp/*
COPY override /
RUN echo "====== TEST TOOLCHAINS ======" \
&& git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
# hadolint ignore=DL3003
RUN git -C "${HOME}" clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
&& mkdir "/tmp/build-$(uname -m)" && cd "/tmp/build-$(uname -m)" \
&& "nxbuild-linux-$(uname -m)" -GNinja "${HOME}/hello-test" \
&& ninja && ninja test \
&& if [ "$(uname -m)" = "x86_64" ]; then mkdir /tmp/build-i686 && cd /tmp/build-i686 \
&& nxbuild-linux-i686 -GNinja "${HOME}/hello-test" \
&& ninja && ninja test; fi \
&& if [ "$(uname -m)" = "aarch64" ]; then mkdir /tmp/build-armv7l && cd /tmp/build-armv7l \
&& nxbuild-linux-armv7l -GNinja "${HOME}/hello-test" \
&& ninja && ninja test; fi \
&& cd .. && rm -rf /tmp/* /var/tmp/* "${HOME}/hello-test"