mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
ci: drop distro LLVM packages, move Clang install up, set defaults
Also simplify the download and execution of `llvm.sh`
This commit is contained in:
parent
e2095bd68a
commit
440fd3fe21
@ -7,7 +7,6 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
|
|||||||
# (zlib1g-dev is needed for the Qt host binary builds, but should not be used by target binaries)
|
# (zlib1g-dev is needed for the Qt host binary builds, but should not be used by target binaries)
|
||||||
ENV APT_ARGS="-y --no-install-recommends --no-upgrade"
|
ENV APT_ARGS="-y --no-install-recommends --no-upgrade"
|
||||||
|
|
||||||
|
|
||||||
# Install packages for i386; disabled on aarch64 and arm64 hosts
|
# Install packages for i386; disabled on aarch64 and arm64 hosts
|
||||||
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || dpkg --add-architecture i386)
|
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || dpkg --add-architecture i386)
|
||||||
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || (apt-get update && apt-get install $APT_ARGS \
|
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || (apt-get update && apt-get install $APT_ARGS \
|
||||||
@ -23,13 +22,11 @@ RUN apt-get update && apt-get install $APT_ARGS \
|
|||||||
bsdmainutils \
|
bsdmainutils \
|
||||||
curl \
|
curl \
|
||||||
ccache \
|
ccache \
|
||||||
clang \
|
|
||||||
cmake \
|
cmake \
|
||||||
g++ \
|
g++ \
|
||||||
gettext \
|
gettext \
|
||||||
git \
|
git \
|
||||||
libc++-dev \
|
gnupg \
|
||||||
libc++abi-dev \
|
|
||||||
libtool \
|
libtool \
|
||||||
libxcb-icccm4 \
|
libxcb-icccm4 \
|
||||||
libxcb-image0 \
|
libxcb-image0 \
|
||||||
@ -42,12 +39,36 @@ RUN apt-get update && apt-get install $APT_ARGS \
|
|||||||
libxcb-xinerama0 \
|
libxcb-xinerama0 \
|
||||||
libxcb-xkb1 \
|
libxcb-xkb1 \
|
||||||
libxkbcommon-x11-0 \
|
libxkbcommon-x11-0 \
|
||||||
wget \
|
lsb-release \
|
||||||
|
software-properties-common \
|
||||||
unzip \
|
unzip \
|
||||||
|
wget \
|
||||||
m4 \
|
m4 \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
zlib1g-dev
|
zlib1g-dev
|
||||||
|
|
||||||
|
# Install Clang+LLVM and set it as default
|
||||||
|
# We don't need all packages but the default set doesn't include some
|
||||||
|
# packages we want so we will need to install some of them manually.
|
||||||
|
ARG LLVM_VERSION=16
|
||||||
|
RUN set -ex; \
|
||||||
|
echo "Installing LLVM and Clang ${LLVM_VERSION}..."; \
|
||||||
|
curl -sL https://apt.llvm.org/llvm.sh | bash -s "${LLVM_VERSION}"; \
|
||||||
|
echo "Installing additional packages..."; \
|
||||||
|
apt-get update && apt-get install $APT_ARGS \
|
||||||
|
"clang-format-${LLVM_VERSION}" \
|
||||||
|
"clang-tidy-${LLVM_VERSION}" \
|
||||||
|
"libc++-${LLVM_VERSION}-dev" \
|
||||||
|
"libc++abi-${LLVM_VERSION}-dev" \
|
||||||
|
"libclang-rt-${LLVM_VERSION}-dev"; \
|
||||||
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
|
echo "Setting defaults..."; \
|
||||||
|
lldbUpdAltArgs="update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${LLVM_VERSION} 100"; \
|
||||||
|
for binName in clang clang++ clang-format clang-tidy clangd ld.lld lldb lldb-server; do \
|
||||||
|
lldbUpdAltArgs="${lldbUpdAltArgs} --slave /usr/bin/${binName} ${binName} /usr/bin/${binName}-${LLVM_VERSION}"; \
|
||||||
|
done; \
|
||||||
|
sh -c "${lldbUpdAltArgs}";
|
||||||
|
|
||||||
# Python setup
|
# Python setup
|
||||||
# PYTHON_VERSION should match the value in .python-version
|
# PYTHON_VERSION should match the value in .python-version
|
||||||
ARG PYTHON_VERSION=3.9.18
|
ARG PYTHON_VERSION=3.9.18
|
||||||
@ -61,7 +82,6 @@ RUN apt-get update && apt-get install $APT_ARGS \
|
|||||||
libreadline-dev \
|
libreadline-dev \
|
||||||
libsqlite3-dev \
|
libsqlite3-dev \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
llvm \
|
|
||||||
make \
|
make \
|
||||||
tk-dev \
|
tk-dev \
|
||||||
xz-utils
|
xz-utils
|
||||||
@ -135,20 +155,6 @@ RUN \
|
|||||||
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix; \
|
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix; \
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
ARG LLVM_VERSION=16
|
|
||||||
# Setup Clang+LLVM support
|
|
||||||
RUN apt-get update && apt-get install $APT_ARGS \
|
|
||||||
lsb-release \
|
|
||||||
software-properties-common \
|
|
||||||
gnupg \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN cd /tmp && \
|
|
||||||
wget https://apt.llvm.org/llvm.sh && \
|
|
||||||
chmod +x llvm.sh && \
|
|
||||||
/tmp/llvm.sh ${LLVM_VERSION} && \
|
|
||||||
rm -rf /tmp/llvm.sh
|
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
mkdir -p /src/dash && \
|
mkdir -p /src/dash && \
|
||||||
mkdir -p /cache/ccache && \
|
mkdir -p /cache/ccache && \
|
||||||
|
Loading…
Reference in New Issue
Block a user