-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre-push
executable file
·19 lines (16 loc) · 4.76 KB
/
pre-push
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export OMPI_MCA_btl="self,sm" # TODO(correaa) add to cmakelist.txt
export MPIOVER="" # --oversubscribe"
# -*-indent-tabs-mode:t;c-basic-offset:4;tab-width:4;autowrap:nil;-*-
(mkdir -p .build.g++ && cd .build.g++ && CXX=g++ cmake .. -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" && cmake --build . && ctest -j 6 --output-on-failure) || exit 666
(mkdir -p .build.clang++-13 && cd .build.clang++-13 && CXX=clang++ MPI_OVERSUBSCRIBE=${MPIOVER} cmake .. -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" -DCMAKE_BUILD_TYPE=Debug && cmake --build . && ctest -j 6 --output-on-failure) || exit 666
(mkdir -p .build.g++.plus && cd .build.g++.plus && CXX=g++ cmake .. -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_CPPCHECK="cppcheck;--force;--enable=all;--inline-suppr;--language=c++;--suppress=missingIncludeSystem;--suppress=normalCheckLevelMaxBranches;--suppress=syntaxError;--suppress=unusedFunction;--suppress=unmatchedSuppression;--std=c++17;--error-exitcode=666;-UEXCLUDE_CPPCHECK;-UMPI_DOUBLE_COMPLEX;-UMPI_C_DOUBLE_COMPLEX;-UMPI_C_LONG_DOUBLE_COMPLEX;-UMPI_C_FLOAT_COMPLEX;-UMPI_COMPLEX" && cmake --build . && ctest -j 6 --output-on-failure) || exit 666
(mkdir -p .build.clang++.tidy && cd .build.clang++.tidy && CXX=clang++ MPI_OVERSUBSCRIBE=${MPIOVER} cmake .. -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" -DCMAKE_CXX_CLANG_TIDY="clang-tidy" -DCMAKE_BUILD_TYPE=Debug && cmake --build . && ctest -j 6 --output-on-failure) || exit 666
(mkdir -p .build.nvcc && cd .build.nvcc && CUDACXX=nvcc MPI_OVERSUBSCRIBE=${MPIOVER} cmake .. -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" -DCMAKE_BUILD_TYPE=Debug -DENABLE_CUDA=1 && cmake --build . && ctest -j 6 --output-on-failure) || exit 666
(mkdir -p .build.clang++20 && cd .build.clang++20 && CXX=clang++ MPI_OVERSUBSCRIBE=${MPIOVER} cmake .. -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=Debug && cmake --build . && ctest -j 6 --output-on-failure) || exit 666
(mkdir -p .build.g++20 && cd .build.g++20 && CXX=clang++ MPI_OVERSUBSCRIBE=${MPIOVER} cmake .. -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=Debug && cmake --build . && ctest -j 6 --output-on-failure) || exit 666
# vvv don't try this test connected to vpn
# (mkdir -p .build.g++mpich && cd .build.g++mpich && CXX=g++ cmake .. -DMPI_EXECUTABLE_SUFFIX=.mpich && (make -j $(($(nproc) - 2)) || make VERBOSE=1) && ctest -j 6 --output-on-failure) || exit 666
# vvv valgrind and mpich do not work well together in WSL2
#(mkdir -p .build.g++mpichvalgrind && cd .build.g++mpichvalgrind && CXX=g++ VALGRIND_EXE="valgrind --leak-check=full --track-origins=yes --show-leak-kinds=all --error-exitcode=1" cmake .. -DMPI_EXECUTABLE_SUFFIX=.mpich && (make -j $(($(nproc) - 2)) || make VERBOSE=1) && ctest -j 2 --output-on-failure --timeout 60) || exit 666
#. /opt/intel/oneapi/setvars.sh
#(mkdir -p .build.icpx && cd .build.icpx && CXX=/opt/intel/oneapi/compiler/latest/linux/bin/icpx MPICXX=/opt/intel/oneapi/mpi/latest/bin/mpicxx cmake .. && make -j $(($(nproc) - 2)) VERBOSE=1 && ctest -j 12 --output-on-failure) || exit 666