Merge branch 'OM6.0-with-python' into 'master'
Om6.0 with python Merge with some disabled python tests in ci See merge request !36
This commit is contained in:
161
CI/ci-linux.sh
161
CI/ci-linux.sh
@@ -7,11 +7,18 @@ LANGUAGE=$2
|
||||
set -e
|
||||
|
||||
OPTIONS=""
|
||||
MAKE_OPTIONS=""
|
||||
BUILDPATH=""
|
||||
|
||||
if [ "$COMPILER" == "gcc" ]; then
|
||||
echo "Building with GCC";
|
||||
BUILDPATH="gcc"
|
||||
|
||||
# without icecc: no options required
|
||||
OPTIONS="-DCMAKE_CXX_COMPILER=/usr/lib/icecc/bin/g++ -DCMAKE_C_COMPILER=/usr/lib/icecc/bin/gcc"
|
||||
MAKE_OPTIONS="-j16"
|
||||
export ICECC_CXX=/usr/bin/g++ ; export ICECC_CC=/usr/bin/gcc
|
||||
|
||||
elif [ "$COMPILER" == "clang" ]; then
|
||||
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang"
|
||||
@@ -28,45 +35,140 @@ elif [ "$LANGUAGE" == "C++11" ]; then
|
||||
BUILDPATH="$BUILDPATH-cpp11"
|
||||
fi
|
||||
|
||||
#########################################
|
||||
#=====================================
|
||||
# Color Settings:
|
||||
#=====================================
|
||||
NC='\033[0m'
|
||||
OUTPUT='\033[0;32m'
|
||||
WARNING='\033[0;93m'
|
||||
|
||||
# Make release build folder
|
||||
if [ ! -d build-release-$BUILDPATH ]; then
|
||||
mkdir build-release-$BUILDPATH
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Release version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ ! -d build-release-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-release-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-release-$BUILDPATH
|
||||
cd build-release-$BUILDPATH-Vector-Checks
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON $OPTIONS ../
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_BINDINGS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make
|
||||
make $MAKE_OPTIONS
|
||||
|
||||
#build the unit tests
|
||||
make unittests
|
||||
make $MAKE_OPTIONS unittests
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests Release version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
#########################################
|
||||
# Run Release Unittests
|
||||
#########################################
|
||||
cd Unittests
|
||||
|
||||
#execute tests
|
||||
./unittests --gtest_color=yes --gtest_output=xml
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Release version with vectorchecks disabled for python tests"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ ! -d build-release-$BUILDPATH ]; then
|
||||
mkdir build-release-$BUILDPATH
|
||||
fi
|
||||
|
||||
cd build-release-$BUILDPATH
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON -DBUILD_APPS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make $MAKE_OPTIONS
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running Python unittests Release version "
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ "$LANGUAGE" == "C++11" ] || [ "$COMPILER" == "gcc" ] ; then
|
||||
|
||||
# Execute Python unittests
|
||||
cd Python-Unittests
|
||||
#python -m unittest discover -v
|
||||
|
||||
python -m unittest discover -v
|
||||
|
||||
cd ..
|
||||
|
||||
else
|
||||
echo -e "${WARNING}"
|
||||
echo "WARNING! Python unittests disabled !!"
|
||||
echo -e "${NC}"
|
||||
fi
|
||||
|
||||
|
||||
cd ..
|
||||
|
||||
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Debug version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ ! -d build-debug-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-debug-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-debug-$BUILDPATH-Vector-Checks
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_BINDINGS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make $MAKE_OPTIONS
|
||||
|
||||
#build the unit tests
|
||||
make $MAKE_OPTIONS unittests
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests Debug version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
cd Unittests
|
||||
|
||||
#execute tests
|
||||
./unittests --gtest_color=yes --gtest_output=xml
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
|
||||
#########################################
|
||||
# Build Debug version and Unittests
|
||||
#########################################
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Debug version with vectorchecks disabled for python tests"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ ! -d build-debug-$BUILDPATH ]; then
|
||||
mkdir build-debug-$BUILDPATH
|
||||
@@ -74,19 +176,28 @@ fi
|
||||
|
||||
cd build-debug-$BUILDPATH
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON $OPTIONS ../
|
||||
cmake -DCMAKE_BUILD_TYPE=DEBUG -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON -DBUILD_APPS=OFF $OPTIONS ../
|
||||
|
||||
#build the unit tests
|
||||
make unittests
|
||||
#build it
|
||||
make $MAKE_OPTIONS
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running Python unittests Debug version "
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
#########################################
|
||||
# Run Debug Unittests
|
||||
#########################################
|
||||
if [ "$LANGUAGE" == "C++11" ] || [ "$COMPILER" == "gcc" ] ; then
|
||||
|
||||
cd Unittests
|
||||
# Execute Python unittests
|
||||
cd Python-Unittests
|
||||
|
||||
# Run the unittests
|
||||
./unittests --gtest_color=yes --gtest_output=xml
|
||||
python -m unittest discover -v
|
||||
else
|
||||
|
||||
echo -e "${WARNING}"
|
||||
echo "WARNING! Python unittests disabled !!"
|
||||
echo -e "${NC}"
|
||||
|
||||
fi
|
||||
|
||||
150
CI/ci-mac.sh
150
CI/ci-mac.sh
@@ -5,6 +5,7 @@ set -e
|
||||
|
||||
LANGUAGE=$1
|
||||
|
||||
|
||||
PATH=$PATH:/opt/local/bin
|
||||
export PATH
|
||||
|
||||
@@ -12,23 +13,36 @@ OPTIONS=""
|
||||
|
||||
if [ "$LANGUAGE" == "C++98" ]; then
|
||||
echo "Building with C++98";
|
||||
BUILDPATH="$BUILDPATH-cpp98"
|
||||
elif [ "$LANGUAGE" == "C++11" ]; then
|
||||
echo "Building with C++11";
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++11' "
|
||||
BUILDPATH="$BUILDPATH-cpp11"
|
||||
fi
|
||||
|
||||
#=====================================
|
||||
# Color Settings:
|
||||
#=====================================
|
||||
NC='\033[0m'
|
||||
OUTPUT='\033[0;32m'
|
||||
WARNING='\033[0;93m'
|
||||
|
||||
#########################################
|
||||
# Build release version
|
||||
#########################################
|
||||
|
||||
if [ ! -d build-release ]; then
|
||||
mkdir build-release
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Release version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ ! -d build-release-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-release-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-release
|
||||
cd build-release-$BUILDPATH-Vector-Checks
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON $OPTIONS ../
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make
|
||||
@@ -36,38 +50,84 @@ make
|
||||
#build the unit tests
|
||||
make unittests
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests Release version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
#########################################
|
||||
# Run Release Unittests
|
||||
#########################################
|
||||
cd Unittests
|
||||
|
||||
#execute tests
|
||||
./unittests --gtest_color=yes --gtest_output=xml
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Release version with vectorchecks disabled for python tests"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ ! -d build-release-$BUILDPATH ]; then
|
||||
mkdir build-release-$BUILDPATH
|
||||
fi
|
||||
|
||||
cd build-release-$BUILDPATH
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON -DBUILD_APPS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running Python unittests Release version "
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ "$LANGUAGE" == "C++11" ]; then
|
||||
|
||||
# Execute Python unittests
|
||||
cd Python-Unittests
|
||||
|
||||
rm -f openmesh.so
|
||||
cp ../Build/python/openmesh.so .
|
||||
#python -m unittest discover -v
|
||||
python -m unittest discover -v
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
|
||||
#########################################
|
||||
# Build Debug version and Unittests
|
||||
#########################################
|
||||
|
||||
if [ ! -d build-debug ]; then
|
||||
mkdir build-debug
|
||||
else
|
||||
echo -e "${WARNING}"
|
||||
echo "WARNING! Python unittests disabled for clang on Mac with c++98 !!"
|
||||
echo -e "${NC}"
|
||||
fi
|
||||
|
||||
cd build-debug
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON $OPTIONS ../
|
||||
cd ..
|
||||
|
||||
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Debug version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ ! -d build-debug-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-debug-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-debug-$BUILDPATH-Vector-Checks
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make
|
||||
@@ -75,21 +135,59 @@ make
|
||||
#build the unit tests
|
||||
make unittests
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests Debug version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
#########################################
|
||||
# Run Debug Unittests
|
||||
#########################################
|
||||
|
||||
cd Unittests
|
||||
|
||||
# Run the unittests
|
||||
#execute tests
|
||||
./unittests --gtest_color=yes --gtest_output=xml
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Debug version with vectorchecks disabled for python tests"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ ! -d build-debug-$BUILDPATH ]; then
|
||||
mkdir build-debug-$BUILDPATH
|
||||
fi
|
||||
|
||||
cd build-debug-$BUILDPATH
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=DEBUG -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON -DBUILD_APPS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running Python unittests Debug version "
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ "$LANGUAGE" == "C++11" ]; then
|
||||
|
||||
# Execute Python unittests
|
||||
cd Python-Unittests
|
||||
|
||||
rm -f openmesh.so
|
||||
cp ../Build/python/openmesh.so .
|
||||
#python -m unittest discover -v
|
||||
python -m unittest discover -v
|
||||
else
|
||||
|
||||
echo -e "${WARNING}"
|
||||
echo "WARNING! Python unittests disabled for clang on Mac with c++98 !!"
|
||||
echo -e "${NC}"
|
||||
|
||||
fi
|
||||
|
||||
@@ -134,15 +134,19 @@ if (UNIX)
|
||||
set ( STL_VECTOR_CHECKS false CACHE BOOL "Include full stl vector checks in debug mode (This option is only used in debug Mode!)" )
|
||||
endif ( NOT STL_VECTOR_CHECKS )
|
||||
|
||||
# Add a flag to check stl vectors in debugging mode
|
||||
# Add a flag to check stl vectors
|
||||
if ( STL_VECTOR_CHECKS AND NOT CMAKE_SYSTEM MATCHES "SunOS*" )
|
||||
list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS "-D_GLIBCXX_DEBUG" )
|
||||
list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC")
|
||||
list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS "-D_GLIBCXX_DEBUG" )
|
||||
list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC")
|
||||
list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-D_GLIBCXX_DEBUG" )
|
||||
list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC")
|
||||
|
||||
list(APPEND ADDITIONAL_C_DEBUG_FLAGS "-D_GLIBCXX_DEBUG" )
|
||||
list(APPEND ADDITIONAL_C_DEBUG_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC")
|
||||
list(APPEND ADDITIONAL_C_RELEASE_FLAGS "-D_GLIBCXX_DEBUG" )
|
||||
list(APPEND ADDITIONAL_C_RELEASE_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC")
|
||||
list(APPEND ADDITIONAL_C_RELWITHDEBINFO_FLAGS "-D_GLIBCXX_DEBUG" )
|
||||
list(APPEND ADDITIONAL_C_RELWITHDEBINFO_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user