diff --git a/clang-extra-tools/Dockerfile b/clang-extra-tools/Dockerfile index 131e66e..ff07672 100644 --- a/clang-extra-tools/Dockerfile +++ b/clang-extra-tools/Dockerfile @@ -21,4 +21,4 @@ RUN apk add --no-cache \ zeromq-dev LABEL maintainer="helicsdevelopers@helics.org" -LABEL date="2023-03-03" \ No newline at end of file +LABEL date="2024-05-03" \ No newline at end of file diff --git a/clang-format/Dockerfile b/clang-format/Dockerfile index 1400385..f0aa7b8 100644 --- a/clang-format/Dockerfile +++ b/clang-format/Dockerfile @@ -6,3 +6,6 @@ RUN apk add --no-cache \ build-base \ cmake \ clang + +LABEL maintainer="helicsdevelopers@helics.org" +LABEL date="2024-05-03" \ No newline at end of file diff --git a/clang15-builder/Dockerfile b/clang15-builder/Dockerfile new file mode 100644 index 0000000..9720fe6 --- /dev/null +++ b/clang15-builder/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu:24.04 as clang15-builder + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && apt install -y \ + default-jdk python3-dev python3-pip libzmq5-dev build-essential \ + clang-15 clang-tidy-15 libc++-15-dev libc++abi-15-dev libstdc++-13-dev \ + libsodium-dev libssl-dev openssl \ + cmake git wget swig mpich libboost-dev ca-certificates \ + && apt-get clean && rm -rf /var/lib/apt/lists/* \ + && pip3 install pytest \ + && ln -s /usr/bin/llvm-symbolizer-15 /usr/bin/llvm-symbolizer \ + && ln -s /usr/bin/clang++-15 /usr/bin/clang++ \ + && ln -s /usr/bin/clang-15 /usr/bin/clang \ + && ln -s /usr/bin/clang-tidy-15 /usr/bin/clang-tidy + +ENV CC=/usr/bin/clang +ENV CXX=/usr/bin/clang++ + +LABEL maintainer="helicsdevelopers@helics.org" +LABEL date="2024-05-03" diff --git a/clang16-builder/Dockerfile b/clang16-builder/Dockerfile new file mode 100644 index 0000000..09a768a --- /dev/null +++ b/clang16-builder/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu:22.04 as clang14-builder + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && apt install -y \ + default-jdk python3-dev python3-pip libzmq5-dev build-essential \ + clang-16 clang-tidy-16 libc++-16-dev libc++abi-16-dev libstdc++-13-dev \ + libsodium-dev libssl-dev openssl \ + cmake git wget swig mpich libboost-dev ca-certificates \ + && apt-get clean && rm -rf /var/lib/apt/lists/* \ + && pip3 install pytest \ + && ln -s /usr/bin/llvm-symbolizer-16 /usr/bin/llvm-symbolizer \ + && ln -s /usr/bin/clang++-16 /usr/bin/clang++ \ + && ln -s /usr/bin/clang-16 /usr/bin/clang \ + && ln -s /usr/bin/clang-tidy-16 /usr/bin/clang-tidy + +ENV CC=/usr/bin/clang +ENV CXX=/usr/bin/clang++ + +LABEL maintainer="helicsdevelopers@helics.org" +LABEL date="2024-05-03" diff --git a/clang17-builder/Dockerfile b/clang17-builder/Dockerfile new file mode 100644 index 0000000..913b4df --- /dev/null +++ b/clang17-builder/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu:24.04 as clang14-builder + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && apt install -y \ + default-jdk python3-dev python3-pip libzmq5-dev build-essential \ + clang-17 clang-tidy-17 libc++-17-dev libc++abi-17-dev libstdc++-13-dev \ + libsodium-dev libssl-dev openssl \ + cmake git wget swig mpich libboost-dev ca-certificates \ + && apt-get clean && rm -rf /var/lib/apt/lists/* \ + && pip3 install pytest \ + && ln -s /usr/bin/llvm-symbolizer-17 /usr/bin/llvm-symbolizer \ + && ln -s /usr/bin/clang++-17 /usr/bin/clang++ \ + && ln -s /usr/bin/clang-17 /usr/bin/clang \ + && ln -s /usr/bin/clang-tidy-17 /usr/bin/clang-tidy + +ENV CC=/usr/bin/clang +ENV CXX=/usr/bin/clang++ + +LABEL maintainer="helicsdevelopers@helics.org" +LABEL date="2024-05-03" diff --git a/clang18-builder/Dockerfile b/clang18-builder/Dockerfile new file mode 100644 index 0000000..da1781a --- /dev/null +++ b/clang18-builder/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu:24.04 as clang14-builder + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && apt install -y \ + default-jdk python3-dev python3-pip libzmq5-dev build-essential \ + clang-18 clang-tidy-18 libc++-18-dev libc++abi-18-dev libstdc++-13-dev \ + libsodium-dev libssl-dev openssl \ + cmake git wget swig mpich libboost-dev ca-certificates \ + && apt-get clean && rm -rf /var/lib/apt/lists/* \ + && pip3 install pytest \ + && ln -s /usr/bin/llvm-symbolizer-18 /usr/bin/llvm-symbolizer \ + && ln -s /usr/bin/clang++-18 /usr/bin/clang++ \ + && ln -s /usr/bin/clang-18 /usr/bin/clang \ + && ln -s /usr/bin/clang-tidy-18 /usr/bin/clang-tidy + +ENV CC=/usr/bin/clang +ENV CXX=/usr/bin/clang++ + +LABEL maintainer="helicsdevelopers@helics.org" +LABEL date="2024-05-03" diff --git a/cppcheck2/Dockerfile b/cppcheck2/Dockerfile index fb86ff8..961797d 100644 --- a/cppcheck2/Dockerfile +++ b/cppcheck2/Dockerfile @@ -1,6 +1,6 @@ # This Dockerfile creates an image with cppcheck2.0 -FROM ubuntu:22.04 as builder +FROM ubuntu:24.04 as builder # Installs dependencies needed for building, with headers needed for development ENV DEBIAN_FRONTEND=noninteractive @@ -19,14 +19,14 @@ RUN make -j4 && make install # Create an image for generating HELICS interfaces -FROM ubuntu:22.04 as Hbase +FROM ubuntu:24.04 as Hbase # Install the tools for building RUN apt update && apt install -y libz3-4 libpcre3 \ && apt-get clean && rm -rf /var/lib/apt/lists/* LABEL maintainer="helicsdevelopers@helics.org" -LABEL date="2022-05-16" +LABEL date="2024-05-03" # Copy cppcheck to the install location COPY --from=builder /usr/local/share/Cppcheck /usr/local/share/Cppcheck diff --git a/cpplint/Dockerfile b/cpplint/Dockerfile index dfe3d6b..b14eaf3 100644 --- a/cpplint/Dockerfile +++ b/cpplint/Dockerfile @@ -1,7 +1,7 @@ FROM python LABEL maintainer="helicsdevelopers@helics.org" -LABEL date="2023-03-07" +LABEL date="2024-05-03" # currently version 1.6.1 RUN pip install cpplint diff --git a/gcc14-builder/Dockerfile b/gcc14-builder/Dockerfile new file mode 100644 index 0000000..edb258b --- /dev/null +++ b/gcc14-builder/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:24.04 as builder + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && apt install -y \ + default-jdk python3-dev python3-pip python3-pytest libzmq5-dev libboost-filesystem-dev \ + libboost-system-dev libboost-test-dev libboost-date-time-dev \ + g++-14 gcc-14 mpi-default-dev libsuitesparse-dev \ + libsodium-dev libssl-dev openssl \ + cmake git wget swig && apt-get install -y --no-install-recommends \ + pkg-config libboost-dev make && apt-get clean && rm -rf /var/lib/apt/lists/* + +RUN rm /usr/bin/gcc && ln -s /usr/bin/gcc-14 /usr/bin/gcc \ + && rm /usr/bin/g++ && ln -s /usr/bin/g++-14 /usr/bin/g++ \ + && rm /usr/bin/gcc-ar && ln -s /usr/bin/gcc-ar-14 /usr/bin/gcc-ar \ + && rm /usr/bin/gcc-nm && ln -s /usr/bin/gcc-nm-14 /usr/bin/gcc-nm \ + && rm /usr/bin/gcc-ranlib && ln -s /usr/bin/gcc-ranlib-14 /usr/bin/gcc-ranlib + +LABEL maintainer="helicsdevelopers@helics.org" +LABEL date="2024-05-03" diff --git a/octave-8/Dockerfile b/octave-8/Dockerfile new file mode 100644 index 0000000..e0a562a --- /dev/null +++ b/octave-8/Dockerfile @@ -0,0 +1,12 @@ +# Used for valgrind runs +FROM helics/buildenv:ubuntu24.04-default-builder as builder + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && apt install -y --no-install-recommends \ + libzmq5 octave liboctave-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +LABEL maintainer="helicsdevelopers@helics.org" +LABEL date="2024-05-03" diff --git a/sanitizers-18/Dockerfile b/sanitizers-18/Dockerfile new file mode 100644 index 0000000..8c281fa --- /dev/null +++ b/sanitizers-18/Dockerfile @@ -0,0 +1,60 @@ +FROM helics/buildenv:clang18-builder as builder + +WORKDIR /root/develop + +RUN apt update && apt install -y ninja-build + +RUN git clone https://github.com/llvm/llvm-project.git + +# Sets the number of threads for make to use +ARG MAKE_PARALLEL + +# Build the Memory sanitizer libraries +RUN mkdir libcxx_msan_build && mkdir libcxx_msan_install && cd libcxx_msan_build && cmake -GNinja -S runtimes ../llvm-project/runtimes -DCMAKE_INSTALL_PREFIX=/root/develop/libcxx_msan_install -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -DLLVM_USE_SANITIZER=MemoryWithOrigins -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ +RUN cd libcxx_msan_build && cmake --build . -j 3 -- cxx cxxabi +RUN cd libcxx_msan_build && ninja install-cxx install-cxxabi + +RUN mkdir -p /root/develop/libcxx_msan/include && cp -r /root/develop/libcxx_msan_install/include/* /root/develop/libcxx_msan/include/ +RUN mkdir -p /root/develop/libcxx_msan/lib && cp -r /root/develop/libcxx_msan_install/lib/* /root/develop/libcxx_msan/lib/ + +# Build the ASAN libraries +COPY asan_suppression.txt . +ENV ASAN_OPTIONS="detect_odr_violation=0" +RUN mkdir libcxx_asan_build && mkdir libcxx_asan_install && cd libcxx_asan_build && cmake -GNinja -S runtimes ../llvm-project/runtimes -DCMAKE_INSTALL_PREFIX=/root/develop/libcxx_asan_install -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-fsanitize-ignorelist=/root/develop/asan_suppression.txt" -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -DLLVM_USE_SANITIZER=Address -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ +RUN cd libcxx_asan_build && cmake --build . -j 3 -- cxx cxxabi +RUN cd libcxx_asan_build && ninja install-cxx install-cxxabi + +RUN mkdir -p /root/develop/libcxx_asan/include && cp -r /root/develop/libcxx_asan_install/include/* /root/develop/libcxx_asan/include/ +RUN mkdir -p /root/develop/libcxx_asan/lib && cp -r /root/develop/libcxx_asan_install/lib/* /root/develop/libcxx_asan/lib/ + +# Build the tsan libraries +RUN mkdir libcxx_tsan_build && mkdir libcxx_tsan_install&& cd libcxx_tsan_build && cmake -GNinja -S runtimes ../llvm-project/runtimes -DCMAKE_INSTALL_PREFIX=/root/develop/libcxx_tsan_install -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -DLLVM_USE_SANITIZER=Thread -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ +RUN cd libcxx_tsan_build && cmake --build . -j 2 -- cxx cxxabi +RUN cd libcxx_tsan_build && ninja install-cxx install-cxxabi + +RUN mkdir -p /root/develop/libcxx_tsan/include && cp -r /root/develop/libcxx_tsan_install/include/* /root/develop/libcxx_tsan/include/ +RUN mkdir -p /root/develop/libcxx_tsan/lib && cp -r /root/develop/libcxx_tsan_install/lib/* /root/develop/libcxx_tsan/lib/ + +FROM helics/buildenv:clang18-builder + +ENV DEBIAN_FRONTEND=noninteractive + +# last updated 2024-05-03 + +# Copy the built libraries from the builder images +COPY --from=builder /root/develop/libcxx_asan /root/develop/libcxx_asan +COPY --from=builder /root/develop/libcxx_tsan /root/develop/libcxx_tsan +COPY --from=builder /root/develop/libcxx_msan /root/develop/libcxx_msan + +# Copy scripts to build and run HELICS with the sanitizers +COPY helics_build_run_*.sh /root/develop/ + +ENV ASAN_CFLAGS="-fsanitize=undefined,address -nostdinc++ -nostdlib++ -L/root/develop/libcxx_asan/lib -lc++ -lc++abi -I/root/develop/libcxx_asan/include -fsanitize-address-use-after-scope -Wno-unused-command-line-argument -fno-omit-frame-pointer -g -O1 -Wl,-rpath,/root/develop/libcxx_asan/lib" + +ENV ASAN_OPTIONS="detect_odr_violation=0" +ENV MSAN_CFLAGS="-fsanitize=memory -nostdinc++ -nostdlib++ -L/root/develop/libcxx_msan/lib -lc++ -lc++abi -I/root/develop/libcxx_msan/include -I/root/develop/libcxx_msan/include/c++/v1 -Wno-unused-command-line-argument -fno-omit-frame-pointer -g -O1 -Wl,-rpath,/root/develop/libcxx_msan/lib" + +ENV TSAN_CFLAGS="-fsanitize=thread -nostdinc++ -nostdlib++ -L/root/develop/libcxx_tsan/lib -lc++ -lc++abi -I/root/develop/libcxx_tsan/include -I/root/develop/libcxx_tsan/include/c++/v1 -Wno-unused-command-line-argument -fno-omit-frame-pointer -g -O2 -Wl,-rpath,/root/develop/libcxx_tsan/lib" + +LABEL maintainer="helicsdevelopers@helics.org" +LABEL date="2024-05-03" diff --git a/sanitizers-18/asan_suppression.txt b/sanitizers-18/asan_suppression.txt new file mode 100644 index 0000000..ce60bf0 --- /dev/null +++ b/sanitizers-18/asan_suppression.txt @@ -0,0 +1,22 @@ +# Lines starting with # are ignored. +# Turn off checks for the source file (use absolute path or path relative +# to the current working directory): +src:*functional.cpp +# Turn off checks for a particular functions (use mangled names): +#fun:MyFooBar +#fun:_Z8MyFooBarv +# Extended regular expressions are supported: +#fun:bad_(foo|bar) +#src:bad_source[1-9].c +# Shell like usage of * is supported (* is treated as .*): +#src:bad/sources/* +#fun:*BadFunction* +# Specific sanitizer tools may introduce categories. +#src:/special/path/*=special_sources +# Sections can be used to limit ignorelist entries to specific sanitizers +#[address] +#fun:*BadASanFunc* +# Section names are regular expressions +#[cfi-vcall|cfi-icall] +#fun:*BadCfiCall +# Entries without sections are placed into [*] and apply to all sanitizers diff --git a/sanitizers-18/helics_build_run_asan.sh b/sanitizers-18/helics_build_run_asan.sh new file mode 100644 index 0000000..d30b4b2 --- /dev/null +++ b/sanitizers-18/helics_build_run_asan.sh @@ -0,0 +1,10 @@ +#!/usr/bin/bash +git clone https://github.com/GMLC-TDC/HELICS.git +cd HELICS +mkdir build-asan +cd build-asan +cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="${ASAN_CFLAGS}" -DHELICS_BUILD_TESTS=ON -DHELICS_ZMQ_SUBPROJECT=ON -DHELICS_ZMQ_FORCE_SUBPROJECT=ON +cd /root/develop/HELICS/build-asan +make -j2 + +./sanitizer_tests.sh diff --git a/sanitizers-18/helics_build_run_msan.sh b/sanitizers-18/helics_build_run_msan.sh new file mode 100644 index 0000000..482d5ff --- /dev/null +++ b/sanitizers-18/helics_build_run_msan.sh @@ -0,0 +1,10 @@ +#!/usr/bin/bash +git git clone --recurse-submodules --branch develop https://github.com/GMLC-TDC/HELICS.git +cd HELICS +mkdir build-msan +cd build-msan +cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="${MSAN_CFLAGS}" -DHELICS_BUILD_TESTS=ON -DHELICS_ZMQ_SUBPROJECT=ON -DHELICS_ZMQ_FORCE_SUBPROJECT=ON +cd /root/develop/HELICS/build-msan +make -j2 + +./sanitizer_tests.sh diff --git a/sanitizers-18/helics_build_run_tsan.sh b/sanitizers-18/helics_build_run_tsan.sh new file mode 100644 index 0000000..3b64cab --- /dev/null +++ b/sanitizers-18/helics_build_run_tsan.sh @@ -0,0 +1,10 @@ +#!/usr/bin/bash +git clone --recurse-submodules --branch develop https://github.com/GMLC-TDC/HELICS.git +cd HELICS +mkdir build-tsan +cd build-tsan +cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="${TSAN_CFLAGS}" -DHELICS_BUILD_TESTS=ON -DHELICS_ZMQ_SUBPROJECT=ON -DHELICS_ZMQ_FORCE_SUBPROJECT=ON +cd /root/develop/HELICS/build-tsan +make -j2 + +./sanitizer_tests.sh diff --git a/sanitizers-18/sanitizer_tests.sh b/sanitizers-18/sanitizer_tests.sh new file mode 100644 index 0000000..a3a6dc7 --- /dev/null +++ b/sanitizers-18/sanitizer_tests.sh @@ -0,0 +1,19 @@ +#!/bin/bash +tests=( + tests/helics/core/core-tests + tests/helics/common/common-tests + "tests/helics/system_tests/system-tests --gtest_filter=-*realtime*" + build/tests/helics/apps/helics_apps-tests +) + +SUMRESULT=0 +for test in "${tests[@]}"; do + echo "${test}" + eval "${test}" + RESULT=$? + echo "***Latest test result: "${RESULT} + SUMRESULT=$(( SUMRESULT + RESULT )) +done +# Return 0 or a positive integer for failure +exit ${SUMRESULT} + diff --git a/tumbleweed-builder/Dockerfile b/tumbleweed-builder/Dockerfile index e78221e..40fe0fe 100644 --- a/tumbleweed-builder/Dockerfile +++ b/tumbleweed-builder/Dockerfile @@ -1,8 +1,8 @@ FROM opensuse/tumbleweed:latest -# 2022-05-21 +# 2024-05-03 LABEL maintainer="helicsdevelopers@helics.org" -LABEL date="2022-05-21" +LABEL date="2024-05-03" #install the required components for building HELICS RUN zypper mr -d openSUSE-Tumbleweed-Update && zypper install -y make gcc-c++ boost-devel cmake git libzmq5 zeromq-devel && zypper clean -a diff --git a/ubuntu24.04-default-builder/Dockerfile b/ubuntu24.04-default-builder/Dockerfile new file mode 100644 index 0000000..2997782 --- /dev/null +++ b/ubuntu24.04-default-builder/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:24.04 as builder + +ENV DEBIAN_FRONTEND=noninteractive + +ENV PYTHONPATH /usr/local/python + +RUN apt update && apt install -y \ + default-jdk python3-full python3-dev python3-pip libzmq5-dev libboost-filesystem-dev \ + libboost-system-dev libboost-test-dev libboost-date-time-dev \ + g++ gcc cmake git curl wget swig lcov mpi-default-dev \ + libsodium-dev libssl-dev openssl python3-pytest \ + && apt-get install -y --no-install-recommends \ + pkg-config libboost-dev make \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +LABEL maintainer="helicsdevelopers@helics.org" +LABEL date="2024-05-04" diff --git a/valgrind-builder/Dockerfile b/valgrind-builder/Dockerfile index 63cf02c..e44aca6 100644 --- a/valgrind-builder/Dockerfile +++ b/valgrind-builder/Dockerfile @@ -1,17 +1,12 @@ # Used for valgrind runs -FROM ubuntu:22.04 as builder +FROM helics/buildenv:ubuntu24.04-default-builder as builder ENV DEBIAN_FRONTEND=noninteractive RUN apt update && apt install -y \ - default-jdk python3-dev python3-pip libzmq5-dev libboost-filesystem-dev \ - libboost-system-dev libboost-test-dev libboost-date-time-dev \ - g++ gcc cmake git wget swig mpi-default-dev valgrind \ - && apt-get install -y --no-install-recommends \ - pkg-config libboost-dev make \ + valgrind \ && apt-get clean \ - && pip3 install pytest \ && rm -rf /var/lib/apt/lists/* LABEL maintainer="helicsdevelopers@helics.org" -LABEL date="2022-03-16" +LABEL date="2024-05-03"