-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Based them on opensuse tumbleweed to get recent versions of their packages. - Update clang/llvm to 17 - Add build-images-opensuse-tw script
- Loading branch information
1 parent
b94a620
commit 5524e5f
Showing
14 changed files
with
297 additions
and
7 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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
|
||
# This script is used to build the openSUSE Tumbleweed images | ||
|
||
set -xeuo pipefail | ||
|
||
declare -r DOCKER_REPOSITORY=ghcr.io/ornladios/adios2 | ||
declare -u ENABLE_PUSH= | ||
|
||
#============================================================================= | ||
# Functions | ||
|
||
# Function to build a docker image | ||
function docker_build() { | ||
local docker_file=$1 | ||
local docker_tag=$2 | ||
local args=(--progress=plain --rm) | ||
|
||
if [[ -n "${ENABLE_PUSH}" ]]; then | ||
args+=("--push") | ||
fi | ||
|
||
sudo docker build "${args[@]}" \ | ||
--file "${docker_file}" \ | ||
--tag "${DOCKER_REPOSITORY}:${docker_tag}-$(date +"%Y%m%d")" \ | ||
. | ||
} | ||
|
||
function usage() { | ||
echo "Usage: $0 [-p <PROJECT>] [-m <MILESTONE>]" | ||
echo " -p Push to the docker registry" | ||
exit 0 | ||
} | ||
|
||
#============================================================================= | ||
# Main | ||
while getopts "p" o; do | ||
case "${o}" in | ||
p) ENABLE_PUSH=true ;; | ||
*) usage ;; | ||
esac | ||
done | ||
|
||
docker_build opensuse-tw-sanitizer-base.dockerfile ci-opensuse-tw-sanitizer-base | ||
docker_build opensuse-tw-full-stack-onbuild.dockerfile ci-opensuse-tw-full-stack-onbuild | ||
docker_build opensuse-tw-asan.dockerfile ci-opensuse-tw-asan | ||
docker_build opensuse-tw-msan.dockerfile ci-opensuse-tw-msan | ||
docker_build opensuse-tw-tsan.dockerfile ci-opensuse-tw-tsan | ||
docker_build opensuse-tw-ubsan.dockerfile ci-opensuse-tw-ubsan |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM ghcr.io/ornladios/adios2:ci-opensuse-tw-sanitizer-base | ||
|
||
# Install core dev packages | ||
RUN zypper install -y --no-recommends libasan8 hdf5-devel && \ | ||
zypper clean --all | ||
|
||
# Install ZFP | ||
WORKDIR /opt/zfp | ||
RUN curl -L https://github.com/LLNL/zfp/releases/download/0.5.5/zfp-0.5.5.tar.gz | tar -xvz && \ | ||
cmake -GNinja -S zfp-0.5.5 -B build \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=/opt/zfp/0.5.5 \ | ||
&& \ | ||
cmake --build build && \ | ||
cmake --install build && \ | ||
rm -rf zfp-0.5.5 build | ||
ENV PATH=/opt/zfp/0.5.5/bin:${PATH} \ | ||
LD_LIBRARY_PATH=/opt/zfp/0.5.5/lib64:${LD_LIBRARY_PATH} \ | ||
CMAKE_PREFIX_PATH=/opt/zfp/0.5.5:${CMAKE_PREFIX_PATH} |
125 changes: 125 additions & 0 deletions
125
scripts/ci/images/opensuse-tw/opensuse-tw-full-stack-onbuild.dockerfile
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 |
---|---|---|
@@ -0,0 +1,125 @@ | ||
FROM ghcr.io/ornladios/adios2:ci-opensuse-tw-sanitizer-base | ||
|
||
# Set up some arguments | ||
ONBUILD ARG INSTALL_PREFIX | ||
ONBUILD ARG TOOLCHAIN_FILE | ||
ONBUILD ARG CFLAGS | ||
ONBUILD ARG CXXFLAGS | ||
ONBUILD ARG LLVM_USE_SANITIZER | ||
|
||
ENV CC=clang | ||
ENV CXX=clang++ | ||
|
||
# Build and install libc++ | ||
ONBUILD WORKDIR /root/llvm | ||
ONBUILD RUN git clone --branch llvmorg-17.0.6 --depth 1 \ | ||
https://github.com/llvm/llvm-project.git source | ||
ONBUILD RUN cmake -GNinja -B build -S source/runtimes \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ | ||
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \ | ||
-DLLVM_USE_SANITIZER=${LLVM_USE_SANITIZER} \ | ||
&& \ | ||
cmake --build build --target install-cxxabi install-cxx | ||
|
||
# Copy in the toolchain | ||
ONBUILD COPY \ | ||
${TOOLCHAIN_FILE} \ | ||
${INSTALL_PREFIX}/toolchain.cmake | ||
|
||
# Build and install zlib | ||
ONBUILD WORKDIR /root/zlib | ||
ONBUILD RUN git clone --branch v1.2.11 --depth 1 \ | ||
https://github.com/madler/zlib.git source && \ | ||
cmake -GNinja -S source -B build \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_TOOLCHAIN_FILE=${INSTALL_PREFIX}/toolchain.cmake \ | ||
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ | ||
&& \ | ||
cmake --build build && \ | ||
cmake --install build | ||
|
||
# Build and install bzip2 | ||
ONBUILD WORKDIR /root/bzip2 | ||
ONBUILD RUN git clone --branch bzip2-1.0.8 --depth 1 \ | ||
https://sourceware.org/git/bzip2.git source && \ | ||
cd source && \ | ||
sed -e "s_^CC=.*\$_CC=/usr/bin/clang_" \ | ||
-e "s_^CFLAGS=.*\$_CFLAGS=-fpic -fPIC -Wall -Winline -O2 ${CFLAGS} \$(BIGFILES)_" \ | ||
-i Makefile-libbz2_so && \ | ||
make -f Makefile-libbz2_so && \ | ||
sed -e "s_^CC=.*\$_CC=/usr/bin/clang_" \ | ||
-e "s_^PREFIX=.*\$_PREFIX=${INSTALL_PREFIX}_" \ | ||
-e "s_^CFLAGS=.*\$_CFLAGS=-Wall -Winline -O2 ${CFLAGS} \$(BIGFILES)_" \ | ||
-i Makefile && \ | ||
make install && \ | ||
install libbz2.so.1.0.8 ${INSTALL_PREFIX}/lib && \ | ||
ln -s -T libbz2.so.1.0.8 ${INSTALL_PREFIX}/lib/libbz2.so.1.0 && \ | ||
ln -s -T libbz2.so.1.0 ${INSTALL_PREFIX}/lib/libbz2.so | ||
|
||
# Build and install zeromq | ||
ONBUILD WORKDIR /root/zeromq | ||
ONBUILD RUN git clone --branch v4.3.2 --depth 1 \ | ||
https://github.com/zeromq/libzmq.git source && \ | ||
cmake -GNinja -S source -B build \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_TOOLCHAIN_FILE=${INSTALL_PREFIX}/toolchain.cmake \ | ||
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ | ||
&& \ | ||
cmake --build build && \ | ||
cmake --install build | ||
|
||
|
||
# Build and install libpng | ||
ONBUILD WORKDIR /root/libpng | ||
ONBUILD RUN git clone --branch v1.6.9 --depth 1 \ | ||
https://git.code.sf.net/p/libpng/code.git source && \ | ||
cmake -GNinja -S source -B build \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_TOOLCHAIN_FILE=${INSTALL_PREFIX}/toolchain.cmake \ | ||
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ | ||
&& \ | ||
cmake --build build && \ | ||
cmake --install build | ||
|
||
# Build and install hdf5 | ||
ONBUILD WORKDIR /root/hdf5 | ||
ONBUILD RUN git clone --branch hdf5-1_14_3 --depth=1 \ | ||
https://github.com/HDFGroup/hdf5.git source && \ | ||
cmake -GNinja -S source -B build \ | ||
-DBUILD_TESTING=OFF \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_TOOLCHAIN_FILE=${INSTALL_PREFIX}/toolchain.cmake \ | ||
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ | ||
&& \ | ||
cmake --build build && \ | ||
cmake --install build | ||
|
||
# Build and install libfabric | ||
ONBUILD WORKDIR /root/libfabric | ||
ONBUILD RUN mkdir -p source build && \ | ||
curl -L \ | ||
https://github.com/ofiwg/libfabric/releases/download/v1.18.1/libfabric-1.18.1.tar.bz2 | \ | ||
tar -C source -xj --strip-components=1 && \ | ||
cd build && \ | ||
../source/configure \ | ||
--prefix=${INSTALL_PREFIX} \ | ||
--disable-efa \ | ||
--disable-shm \ | ||
--disable-verbs \ | ||
CC="/usr/bin/clang ${CFLAGS} -L${INSTALL_PREFIX}/lib -Wl,-rpath,${INSTALL_PREFIX}/lib -Wno-unused-command-line-argument" \ | ||
CXX="/usr/bin/clang++ ${CXXFLAGS} -L${INSTALL_PREFIX}/lib -Wl,-rpath,${INSTALL_PREFIX}/lib -Wno-unused-command-line-argument -nostdinc++ -isystem ${INSTALL_PREFIX}/include/c++/v1 -stdlib=libc++" && \ | ||
make -j4 install | ||
|
||
# Build and install libffi | ||
ONBUILD WORKDIR /root/libffi | ||
ONBUILD RUN mkdir -p source build && \ | ||
curl -L \ | ||
https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz | \ | ||
tar -C source -xz --strip-components=1 && \ | ||
cd build && \ | ||
../source/configure \ | ||
--prefix=${INSTALL_PREFIX} \ | ||
CC="/usr/bin/clang ${CFLAGS} -L${INSTALL_PREFIX}/lib -Wl,-rpath,${INSTALL_PREFIX}/lib -Wno-unused-command-line-argument" \ | ||
CXX="/usr/bin/clang++ ${CXXFLAGS} -L${INSTALL_PREFIX}/lib -Wl,-rpath,${INSTALL_PREFIX}/lib -Wno-unused-command-line-argument -nostdinc++ -isystem ${INSTALL_PREFIX}/include/c++/v1 -stdlib=libc++" && \ | ||
make -j4 install |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARG INSTALL_PREFIX=/opt/msan | ||
ARG TOOLCHAIN_FILE=toolchain-msan.cmake | ||
ARG CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins" | ||
ARG CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins" | ||
ARG LLVM_USE_SANITIZER=MemoryWithOrigins | ||
|
||
FROM ghcr.io/ornladios/adios2:ci-opensuse-tw-full-stack-onbuild AS tmp-stage | ||
FROM ghcr.io/ornladios/adios2:ci-opensuse-tw-sanitizer-base | ||
COPY --from=tmp-stage /opt/msan/ /opt/msan/ |
33 changes: 33 additions & 0 deletions
33
scripts/ci/images/opensuse-tw/opensuse-tw-sanitizer-base.dockerfile
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM opensuse/tumbleweed | ||
LABEL maintainer "Vicente Adolfo Bolea Sanchez<vicente.bolea@kitware.com>" | ||
|
||
# Base dependencies for building ADIOS2 projects | ||
RUN zypper refresh && \ | ||
zypper update -y && \ | ||
zypper install -y --no-recommends \ | ||
awk \ | ||
bzip2 \ | ||
gzip \ | ||
bzip3-devel \ | ||
clang17 \ | ||
cmake \ | ||
curl \ | ||
file \ | ||
gcc \ | ||
gcc-c++ \ | ||
git \ | ||
git-lfs \ | ||
hdf5-devel \ | ||
libffi-devel \ | ||
libpng16-devel \ | ||
libunwind-devel \ | ||
llvm17 \ | ||
ninja \ | ||
patch \ | ||
python3-devel \ | ||
python3-numpy \ | ||
tar \ | ||
zeromq-devel \ | ||
zlib-devel \ | ||
&& \ | ||
zypper clean --all |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARG INSTALL_PREFIX=/opt/tsan | ||
ARG TOOLCHAIN_FILE=toolchain-tsan.cmake | ||
ARG CFLAGS="-fsanitize=thread" | ||
ARG CXXFLAGS="-fsanitize=thread" | ||
ARG LLVM_USE_SANITIZER=Thread | ||
|
||
FROM ghcr.io/ornladios/adios2:ci-opensuse-tw-full-stack-onbuild AS tmp-stage | ||
FROM ghcr.io/ornladios/adios2:ci-opensuse-tw-sanitizer-base | ||
COPY --from=tmp-stage /opt/tsan/ /opt/tsan/ |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM ghcr.io/ornladios/adios2:ci-opensuse-tw-sanitizer-base | ||
|
||
# Install core dev packages | ||
RUN zypper install -y --no-recommends libubsan1 libasan8 hdf5-devel zfp-devel && \ | ||
zypper clean --all |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
set(CMAKE_C_COMPILER /usr/bin/clang) | ||
set(CMAKE_CXX_COMPILER /usr/bin/clang++) | ||
set(_link_flags "-stdlib=libc++ -L /opt/msan/lib -lc++abi -Wl,-rpath,/opt/msan/lib -Wno-unused-command-line-argument") | ||
set(_compile_flags "-nostdinc++ -isystem /opt/msan/include -isystem /opt/msan/include/c++/v1 -fsanitize=memory -fsanitize-memory-track-origins") | ||
set(CMAKE_EXE_LINKER_FLAGS_INIT ${_link_flags}) | ||
set(CMAKE_SHARED_LINKER_FLAGS_INIT ${_link_flags}) | ||
set(CMAKE_C_FLAGS_INIT ${_compile_flags}) | ||
set(CMAKE_CXX_FLAGS_INIT ${_compile_flags}) | ||
set(CMAKE_PREFIX_PATH /opt/msan) |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
set(CMAKE_C_COMPILER /usr/bin/clang) | ||
set(CMAKE_CXX_COMPILER /usr/bin/clang++) | ||
set(_link_flags "-stdlib=libc++ -L /opt/tsan/lib -Wl,-rpath,/opt/tsan/lib -Wno-unused-command-line-argument") | ||
set(_compile_flags "-nostdinc++ -isystem /opt/tsan/include/c++/v1 -fsanitize=thread") | ||
set(CMAKE_EXE_LINKER_FLAGS_INIT ${_link_flags}) | ||
set(CMAKE_SHARED_LINKER_FLAGS_INIT ${_link_flags}) | ||
set(CMAKE_C_FLAGS_INIT ${_compile_flags}) | ||
set(CMAKE_CXX_FLAGS_INIT ${_compile_flags}) | ||
set(CMAKE_PREFIX_PATH /opt/tsan) |