forked from kokkos/kokkos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace ubuntu:18.04 with ubuntu:20.04 as base image for clang-format
- Loading branch information
Showing
1 changed file
with
3 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,13 @@ | ||
FROM ubuntu:18.04 | ||
FROM ubuntu:20.04 | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
bc \ | ||
git \ | ||
build-essential \ | ||
clang-format-8 \ | ||
wget \ | ||
ccache \ | ||
&& \ | ||
apt-get clean && \ | ||
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}* | ||
|
||
ARG CMAKE_VERSION=3.16.8 | ||
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} && \ | ||
sh ${CMAKE_SCRIPT} --skip-license --prefix=${CMAKE_DIR} && \ | ||
rm cmake* | ||
ENV PATH=${CMAKE_DIR}/bin:$PATH | ||
|
||
ENV LLVM_DIR=/opt/llvm | ||
RUN LLVM_VERSION=8.0.0 && \ | ||
LLVM_URL=https://releases.llvm.org/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-18.04.tar.xz && \ | ||
LLVM_ARCHIVE=llvm-${LLVM_VERSION}.tar.xz && \ | ||
SCRATCH_DIR=/scratch && mkdir -p ${SCRATCH_DIR} && cd ${SCRATCH_DIR} && \ | ||
wget --quiet ${LLVM_URL} --output-document=${LLVM_ARCHIVE} && \ | ||
wget --quiet ${LLVM_URL}.sig --output-document=${LLVM_ARCHIVE}.sig && \ | ||
gpg --verify ${LLVM_ARCHIVE}.sig ${LLVM_ARCHIVE} && \ | ||
mkdir -p ${LLVM_DIR} && \ | ||
tar -xvf ${LLVM_ARCHIVE} -C ${LLVM_DIR} --strip-components=1 && \ | ||
echo "${LLVM_DIR}/lib" > /etc/ld.so.conf.d/llvm.conf && ldconfig && \ | ||
rm -rf /root/.gnupg && \ | ||
rm -rf ${SCRATCH_DIR} | ||
ENV PATH=${LLVM_DIR}/bin:$PATH | ||
ENV CLANG_FORMAT_EXE=clang-format-8 |