-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile.ubuntu-2204.clang-14
36 lines (28 loc) · 1.48 KB
/
Dockerfile.ubuntu-2204.clang-14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This Dockerfile provides an illustrative example of how to build cath-tools
FROM ubuntu:22.04
ENV TZ="UTC"
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
RUN apt-get update && apt-get install -y \
clang \
cmake \
git \
libc++-dev \
libc++1 \
libc++abi-dev \
libgsl-dev \
ninja-build \
python3-pip
RUN /usr/bin/pip3 install --upgrade conan==1.59.0
RUN conan profile new default --detect && conan profile update settings.compiler.libcxx=libstdc++11 default
ARG CC=/usr/bin/clang
ARG CXX=/usr/bin/clang++
WORKDIR /cath-tools
ARG BUILD_EXTRA_CATH_TESTS=ON
ARG BUILD_EXTRA_CATH_TOOLS=ON
ADD . /cath-tools
RUN conan install --update --build outdated --build cascade --install-folder docker-build-dir . --profile .github/conan-profiles/ubuntu-22.04.clang.release.conan-profile
RUN cmake -GNinja -B docker-build-dir -S . -D CMAKE_TOOLCHAIN_FILE:FILEPATH=.github/cmake-toolchain-files/ubuntu-22.04.clang.release.cmake -D CMAKE_MODULE_PATH:PATH=/cath-tools/docker-build-dir
RUN ninja -C docker-build-dir -k 0
RUN ( cd docker-build-dir && ctest -j 6 --output-on-failure )