diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-04-27 20:00:03 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-04-29 15:16:44 (GMT) |
commit | 6af91c7c4dc1c04c446d4994f2650234b9f10183 (patch) | |
tree | 18585630a74977538714bbe816bdd85ee518be94 /.gitlab | |
parent | 68903ae23884bcbb8bb47e0ce188da5151947bfd (diff) | |
download | CMake-6af91c7c4dc1c04c446d4994f2650234b9f10183.zip CMake-6af91c7c4dc1c04c446d4994f2650234b9f10183.tar.gz CMake-6af91c7c4dc1c04c446d4994f2650234b9f10183.tar.bz2 |
ci: add an image for Debian 10
This image is primarily for the include-what-you-use build.
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/docker/debian10/Dockerfile | 15 | ||||
-rwxr-xr-x | .gitlab/ci/docker/debian10/install_deps.sh | 22 | ||||
-rwxr-xr-x | .gitlab/ci/docker/debian10/install_iwyu.sh | 32 |
3 files changed, 69 insertions, 0 deletions
diff --git a/.gitlab/ci/docker/debian10/Dockerfile b/.gitlab/ci/docker/debian10/Dockerfile new file mode 100644 index 0000000..e8c3851 --- /dev/null +++ b/.gitlab/ci/docker/debian10/Dockerfile @@ -0,0 +1,15 @@ +FROM debian:10 as iwyu-build +MAINTAINER Ben Boeckel <ben.boeckel@kitware.com> + +COPY install_iwyu.sh /root/install_iwyu.sh +RUN sh /root/install_iwyu.sh + +FROM debian:10 +MAINTAINER Ben Boeckel <ben.boeckel@kitware.com> + +COPY install_deps.sh /root/install_deps.sh +RUN sh /root/install_deps.sh + +COPY --from=iwyu-build /root/iwyu.tar.gz /root/iwyu.tar.gz +RUN tar -C / -xf /root/iwyu.tar.gz +RUN ln -s /usr/lib/llvm-6.0/bin/include-what-you-use /usr/bin/include-what-you-use-6.0 diff --git a/.gitlab/ci/docker/debian10/install_deps.sh b/.gitlab/ci/docker/debian10/install_deps.sh new file mode 100755 index 0000000..9c32d64 --- /dev/null +++ b/.gitlab/ci/docker/debian10/install_deps.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e + +apt-get update + +# Install build requirements. +apt-get install -y \ + libssl-dev + +# Install development tools. +apt-get install -y \ + g++ \ + curl \ + git + +# Install iwyu runtime deps. +apt-get install -y \ + clang-6.0 \ + libncurses6 + +apt-get clean diff --git a/.gitlab/ci/docker/debian10/install_iwyu.sh b/.gitlab/ci/docker/debian10/install_iwyu.sh new file mode 100755 index 0000000..54d26ef --- /dev/null +++ b/.gitlab/ci/docker/debian10/install_iwyu.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +# Install development tools. +apt-get update +apt-get install -y \ + clang-6.0 \ + libclang-6.0-dev \ + llvm-6.0-dev \ + libz-dev \ + g++ \ + cmake \ + ninja-build \ + git + +cd /root +git clone "https://github.com/include-what-you-use/include-what-you-use.git" +cd include-what-you-use +readonly llvm_version="$( clang-6.0 --version | head -n1 | cut -d' ' -f3 | cut -d. -f-2 )" +git checkout "clang_$llvm_version" +mkdir build +cd build + +cmake -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + "-DCMAKE_INSTALL_PREFIX=/usr/lib/llvm-$llvm_version" \ + "-DIWYU_LLVM_ROOT_PATH=/usr/lib/llvm-$llvm_version" \ + .. +ninja +DESTDIR=/root/iwyu-destdir ninja install +tar -C /root/iwyu-destdir -cf /root/iwyu.tar.gz . |