Commit 1d14a6eb authored by Jan Möbius's avatar Jan Möbius

Moved CI subdir into OpenFlipper Directory

parent c2becb2c
git submodule init
git submodule update --remote
mkdir rel
cd rel
del *.exe
set ARCHITECTURE=x64
set ARCH_VS= Win64
set STRING_ARCH=64-Bit
set QT_REV=5.5
set QT_SUFFIX=
set LIBPATH_BASE=C:\libs\VS2013
set GTESTVERSION=gtest-1.6.0
set GENERATOR=Visual Studio 12%ARCH_VS%
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com"
set QT_VERSION=Qt5.5.1
set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=C:\Qt\%QT_VERSION%-vs2013-%STRING_ARCH%\%QT_REV%\msvc2013_64%QT_SUFFIX%
set GLUT_INCLUDE_DIR=C:\libs\VS2013\%ARCHITECTURE%\freeglut-2.8.1\include
set GLUT_GLUT_LIBRARY=C:\libs\VS2013\%ARCHITECTURE%\freeglut-2.8.1\lib\freeglut.lib
set GLEW_INCLUDE_DIR=C:\libs\VS2013\%ARCHITECTURE%\glew-1.10.0\include
set GLEW_LIBRARY_DIR=C:\libs\VS2013\%ARCHITECTURE%\glew-1.10.0\lib\glew32.lib
set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DGLUT_INCLUDE_DIR="%GLUT_INCLUDE_DIR%" -DGLUT_glut_LIBRARY="%GLUT_GLUT_LIBRARY%" -DGLEW_INCLUDE_DIR="%GLEW_INCLUDE_DIR%" -DGLEW_LIBRARY="%GLEW_LIBRARY_DIR%"
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH_BASE%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE %CMAKE_CONFIGURATION% ..
IF %errorlevel% NEQ 0 exit /b %errorlevel%
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "ALL_BUILD"
IF %errorlevel% NEQ 0 exit /b %errorlevel%
set BUILD_PLATFORM=VS2013
del *.exe
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "PACKAGE"
IF %errorlevel% NEQ 0 exit /b %errorlevel%
move OpenFlipper-*.exe "OpenFlipper-Free-Git-Master-%CI_BUILD_REF%-%BUILD_PLATFORM%-%STRING_ARCH%-%QT_VERSION%.exe"
cd tests
copy ..\Build\Qt*.dll testBinaries
copy ..\Build\icu*.dll testBinaries
run_tests.bat
IF %errorlevel% NEQ 0 exit /b %errorlevel%
git submodule init
git submodule update --remote
mkdir rel
cd rel
del *.exe
set ARCHITECTURE=x32
set ARCH_VS=
set STRING_ARCH=32-Bit
set QT_REV=5.6
set QT_SUFFIX=
set LIBPATH_BASE=C:\libs\VS2015
set GTESTVERSION=gtest-1.7.0
set GENERATOR=Visual Studio 14%ARCH_VS%
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
set QT_VERSION=Qt5.6.0
set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=C:\Qt\%QT_VERSION%-vs2015-%STRING_ARCH%\%QT_REV%\msvc2015%QT_SUFFIX%
set GLUT_INCLUDE_DIR=C:\libs\VS2015\%ARCHITECTURE%\freeglut-3.0.0\include
set GLUT_GLUT_LIBRARY=C:\libs\VS2015\%ARCHITECTURE%\freeglut-3.0.0\lib\freeglut.lib
set GLEW_INCLUDE_DIR=C:\libs\VS2015\%ARCHITECTURE%\glew-1.13.0\include
set GLEW_LIBRARY_DIR=C:\libs\VS2015\%ARCHITECTURE%\glew-1.13.0\lib\glew32.lib
set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DGLUT_INCLUDE_DIR="%GLUT_INCLUDE_DIR%" -DGLUT_glut_LIBRARY="%GLUT_GLUT_LIBRARY%" -DGLEW_INCLUDE_DIR="%GLEW_INCLUDE_DIR%" -DGLEW_LIBRARY="%GLEW_LIBRARY_DIR%"
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH_BASE%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE %CMAKE_CONFIGURATION% ..
IF %errorlevel% NEQ 0 exit /b %errorlevel%
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "ALL_BUILD"
IF %errorlevel% NEQ 0 exit /b %errorlevel%
set BUILD_PLATFORM=VS2015
del *.exe
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "PACKAGE"
IF %errorlevel% NEQ 0 exit /b %errorlevel%
move OpenFlipper-*.exe "OpenFlipper-Free-Git-Master-%CI_BUILD_REF%-%BUILD_PLATFORM%-%STRING_ARCH%-%QT_VERSION%.exe"
cd tests
copy ..\Build\Qt*.dll testBinaries
copy ..\Build\icu*.dll testBinaries
run_tests.bat
IF %errorlevel% NEQ 0 exit /b %errorlevel%
git submodule init
git submodule update --remote
mkdir rel
cd rel
del *.exe
set ARCHITECTURE=x64
set ARCH_VS= Win64
set STRING_ARCH=64-Bit
set QT_REV=5.6
set QT_SUFFIX=
set LIBPATH_BASE=C:\libs\VS2015
set GTESTVERSION=gtest-1.7.0
set GENERATOR=Visual Studio 14%ARCH_VS%
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
set QT_VERSION=Qt5.6.0
set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=C:\Qt\%QT_VERSION%-vs2015-%STRING_ARCH%\%QT_REV%\msvc2015_64%QT_SUFFIX%
set GLUT_INCLUDE_DIR=C:\libs\VS2015\%ARCHITECTURE%\freeglut-3.0.0\include
set GLUT_GLUT_LIBRARY=C:\libs\VS2015\%ARCHITECTURE%\freeglut-3.0.0\lib\freeglut.lib
set GLEW_INCLUDE_DIR=C:\libs\VS2015\%ARCHITECTURE%\glew-1.13.0\include
set GLEW_LIBRARY_DIR=C:\libs\VS2015\%ARCHITECTURE%\glew-1.13.0\lib\glew32.lib
set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DGLUT_INCLUDE_DIR="%GLUT_INCLUDE_DIR%" -DGLUT_glut_LIBRARY="%GLUT_GLUT_LIBRARY%" -DGLEW_INCLUDE_DIR="%GLEW_INCLUDE_DIR%" -DGLEW_LIBRARY="%GLEW_LIBRARY_DIR%"
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH_BASE%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE %CMAKE_CONFIGURATION% ..
IF %errorlevel% NEQ 0 exit /b %errorlevel%
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "ALL_BUILD"
IF %errorlevel% NEQ 0 exit /b %errorlevel%
set BUILD_PLATFORM=VS2015
del *.exe
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "PACKAGE"
IF %errorlevel% NEQ 0 exit /b %errorlevel%
move OpenFlipper-*.exe "OpenFlipper-Free-Git-Master-%CI_BUILD_REF%-%BUILD_PLATFORM%-%STRING_ARCH%-%QT_VERSION%.exe"
cd tests
copy ..\Build\Qt*.dll testBinaries
copy ..\Build\icu*.dll testBinaries
run_tests.bat
IF %errorlevel% NEQ 0 exit /b %errorlevel%
#!/bin/bash
# Exit script on any error
set -e
#=====================================
# Color Settings:
#=====================================
NC='\033[0m'
OUTPUT='\033[0;32m'
WARNING='\033[0;93m'
echo -e "${OUTPUT}"
echo "=============================================================================="
echo "Running cppcheck"
echo "=============================================================================="
echo -e "${NC}"
echo "Started: $(date)"
echo "Please Wait ..."
# Run cppcheck and output into file
cppcheck --enable=all \
-j4 \
--quiet \
-i libs_required \
-i build-release \
-i build-debug \
-i .svn \
-i .git \
--force \
-UDOXY_IGNORE_THIS \
--suppress=unusedPrivateFunction \
--suppress=ConfigurationNotChecked \
--suppress=missingIncludeSystem \
-DOPENMESHDLLEXPORT="" \
-Umin -Umax -UBMPOSTFIX \
-DACGDLLEXPORT=""\
-DDLLEXPORTONLY=""\
-DDLLEXPORT=""\
. &> cppcheck.log
echo "Finished: $(date)"
echo -e "${OUTPUT}"
echo "=============================================================================="
echo "CPPCHECK Messages"
echo "=============================================================================="
echo -e "${NC}"
# Echo output to command line for simple analysis via gitlab
cat cppcheck.log
COUNT=$(wc -l < cppcheck.log )
echo -e "${OUTPUT}"
echo "=============================================================================="
echo "CPPCHECK Summary"
echo "=============================================================================="
echo -e "${NC}"
if [ $COUNT -gt 25 ]; then
echo -e ${WARNING}
echo "Total CPPCHECK error Count is $COUNT, which is too High! CPPCHECK Run failed";
echo -e "${NC}"
exit 1;
else
echo "Total CPPCHECK error Count is $COUNT ... OK"
fi
#!/bin/bash
# Script abort on error
set -e
COMPILER=$1
LANGUAGE=$2
QTVERSION=$3
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 -DGTEST_PREFIX=~/sw/gtest-1.7.0-clang/ "
# Build options with icecc /not working due to strange symbol errors
# OPTIONS="$OPTIONS -DCMAKE_CXX_COMPILER=/usr/lib/icecc/bin/g++ -DCMAKE_C_COMPILER=/usr/lib/icecc/bin/gcc -DGTEST_PREFIX=~/sw/gtest-1.7.0-clang/ "
# export ICECC_CXX=/usr/bin/clang++ ; export ICECC_CC=/usr/bin/clang
BUILDPATH="clang"
MAKE_OPTIONS="-j6"
echo "Building with CLANG";
fi
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
if [ "$QTVERSION" == "QT4" ]; then
echo "Building with QT4";
OPTIONS="$OPTIONS -DFORCE_QT4=TRUE "
BUILDPATH="$BUILDPATH-qt4"
elif [ "$QTVERSION" == "QT5" ]; then
echo "Building with QT5";
BUILDPATH="$BUILDPATH-qt5"
OPTIONS="$OPTIONS -DFORCE_QT4=FALSE -DQWT6_INCLUDE_DIR=~/sw/qwt-6.1.2-qt5/include -DQWT6_LIBRARY_DIR=~/sw/qwt-6.1.2-qt5/lib -DQWT6_LIBRARY=~/sw/qwt-6.1.2-qt5/lib/libqwt-qt5.so -DQT5_INSTALL_PATH=~/sw/qt-5.5.1/5.5/gcc_64"
fi
echo "Building with path: build-release-$BUILDPATH"
echo "Full cmake options: $OPTIONS "
########################################
# Fetch submodules
########################################
git submodule init
git submodule update --remote
########################################
# Fetch test data
########################################
rm -rf TestData
git clone git@roosevelt:moebius/OpenFlipper-Test-Data.git TestData
#########################################
# Build Release version and Unittests
#########################################
# Make release build folder
if [ ! -d build-release-$BUILDPATH ]; then
mkdir build-release-$BUILDPATH
fi
cd build-release-$BUILDPATH
cmake -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
#build it
make $MAKE_OPTIONS
#########################################
# Run Release Unittests
#########################################
# Run tests
cd tests
bash run_tests.sh
cd ..
########################################
# Fetch submodules
########################################
git submodule init
git submodule update --remote
########################################
# Fetch test data
########################################
rm -rf TestData
git clone git@roosevelt:moebius/OpenFlipper-Test-Data.git TestData
########################################
# Build
########################################
if [ ! -d build-release ]; then
mkdir build-release
fi
cd build-release
# Build without ports to avoid qt4 collision
/opt/local/bin/cmake ../ -DCMAKE_CXX_FLAGS='-std=c++11' -DQWT6_INCLUDE_DIR=/Users/jenkins/sw/qwt-6.1.2-Qt5-installed/lib/qwt.framework/Headers -DQWT6_LIBRARY=/Users/jenkins/sw/qwt-6.1.2-Qt5-installed/lib/qwt.framework -DQT5_INSTALL_PATH=/Qt/Qt5.5.1/5.5/clang_64 -DGLEW_INCLUDE_DIR=/Users/jenkins/sw/glew-1.10.0-installed/include/ -DGLEW_LIBRARY=/Users/jenkins/sw/glew-1.10.0-installed/lib/libGLEW.dylib
make
# Required for the tests to build, if a package was generated
make fixbundle
########################################
# Test
########################################
# Run tests
cd tests
bash run_tests.sh
cd ..
########################################
# Doc
########################################
make doc >> ../Doxygen-warning.log 2> ../Doxygen-error.log
########################################
# Package
########################################
rm -f *.dmg
make OpenFlipper_package
mv *.dmg OpenFlipper-Free-GIT-$CI_BUILD_REF-QT5.5.1-CPP11.dmg
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment