Skip to content

Commit

Permalink
simplify Dockerfile for clang CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuuichi Asahi committed Jan 22, 2025
1 parent d991b0c commit 1da2195
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions docker/clang/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,17 @@ RUN apt-get update && apt-get install -y \
clang-tidy-19 \
&& rm -rf /var/lib/apt/lists/*

RUN KEYDUMP_URL=https://cloud.cees.ornl.gov/download && \
KEYDUMP_FILE=keydump && \
wget --quiet ${KEYDUMP_URL}/${KEYDUMP_FILE} && \
wget --quiet ${KEYDUMP_URL}/${KEYDUMP_FILE}.sig && \
gpg --import ${KEYDUMP_FILE} && \
gpg --verify ${KEYDUMP_FILE}.sig ${KEYDUMP_FILE} && \
rm ${KEYDUMP_FILE}*

# Install newer CMake manually
ARG CMAKE_VERSION=3.23.2
ARG build_dir=/tmp/build

ENV CMAKE_DIR=/opt/cmake
RUN CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION} && \
CMAKE_SCRIPT=cmake-${CMAKE_VERSION}-Linux-x86_64.sh && \
CMAKE_SHA256=cmake-${CMAKE_VERSION}-SHA-256.txt && \
wget --quiet ${CMAKE_URL}/${CMAKE_SHA256} && \
wget --quiet ${CMAKE_URL}/${CMAKE_SHA256}.asc && \
wget --quiet ${CMAKE_URL}/${CMAKE_SCRIPT} && \
gpg --verify ${CMAKE_SHA256}.asc ${CMAKE_SHA256} && \
grep -i ${CMAKE_SCRIPT} ${CMAKE_SHA256} | sed -e s/linux/Linux/ | sha256sum --check && \
mkdir -p ${CMAKE_DIR} && \
RUN CMAKE_SCRIPT=cmake-${CMAKE_VERSION}-linux-x86_64.sh && \
mkdir -p ${build_dir} && mkdir -p ${CMAKE_DIR} \
cd ${build_dir} && \
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_SCRIPT} && \
sh ${CMAKE_SCRIPT} --skip-license --prefix=${CMAKE_DIR} && \
rm cmake*
cd ${HOME} && rm -rf ${build_dir}
ENV PATH=${CMAKE_DIR}/bin:$PATH

# Set Clang 19 as the default Clang and Clang++
Expand Down

0 comments on commit 1da2195

Please sign in to comment.