Commit e1202bcb authored by Martin Schultz's avatar Martin Schultz

Merge branch 'featureSeparateCIStages' into 'unstable'

Feature separate ci stages

See merge request !299
parents 43a0e7de 6bf837e9
Pipeline #5479 passed with stages
in 65 minutes and 47 seconds
stages:
- Build
- Test
- Deploy
variables:
GET_SOURCES_ATTEMPTS: 3
gcc-c++11-Qt5:
stage:
Build
variables:
COMPILER: "gcc"
LANGUAGE: "C++11"
QTVERSION: "QT5"
GIT_SUBMODULE_STRATEGY: recursive
script: "CI/ci-linux.sh"
script: "CI/ci-linux-build.sh"
tags:
- Linux
artifacts:
paths:
- build-release-gcc-cpp11-qt5/
gcc-c++11-Qt5.9.0:
stage:
Build
variables:
COMPILER: "gcc"
LANGUAGE: "C++11"
QTVERSION: "QT5.9.0"
GIT_SUBMODULE_STRATEGY: recursive
script: "CI/ci-linux.sh"
script: "CI/ci-linux-build.sh"
tags:
- Linux
artifacts:
paths:
- build-release-gcc-cpp11-qt5.9.0/
clang-c++11-Qt5:
stage:
Build
variables:
COMPILER: "clang"
LANGUAGE: "C++11"
QTVERSION: "QT5"
GIT_SUBMODULE_STRATEGY: recursive
script: "CI/ci-linux.sh"
script: "CI/ci-linux-build.sh"
tags:
- Linux
- MultiThreads
artifacts:
paths:
- build-release-clang-cpp11-qt5/
clang-c++11-Qt5.9.0:
stage:
Build
variables:
COMPILER: "clang"
LANGUAGE: "C++11"
QTVERSION: "QT5.9.0"
GIT_SUBMODULE_STRATEGY: recursive
script: "CI/ci-linux.sh"
script: "CI/ci-linux-build.sh"
tags:
- Linux
- MultiThreads
artifacts:
paths:
- build-release-clang-cpp11-qt5.9.0/
test-gcc-c++11-Qt5:
stage:
Test
variables:
COMPILER: "gcc"
LANGUAGE: "C++11"
QTVERSION: "QT5"
GIT_SUBMODULE_STRATEGY: recursive
script: "CI/ci-linux-test.sh"
tags:
- Linux
dependencies:
- gcc-c++11-Qt5
artifacts:
paths:
- build-release-gcc-cpp11-qt5/Testing/Temporary/LastTest.log
test-gcc-c++11-Qt5.9.0:
stage:
Test
variables:
COMPILER: "gcc"
LANGUAGE: "C++11"
QTVERSION: "QT5.9.0"
GIT_SUBMODULE_STRATEGY: recursive
script: "CI/ci-linux-test.sh"
tags:
- Linux
dependencies:
- gcc-c++11-Qt5.9.0
artifacts:
paths:
- build-release-gcc-cpp11-qt5.9.0/Testing/Temporary/LastTest.log
test-clang-c++11-Qt5:
stage:
Test
variables:
COMPILER: "clang"
LANGUAGE: "C++11"
QTVERSION: "QT5"
GIT_SUBMODULE_STRATEGY: recursive
script: "CI/ci-linux-test.sh"
tags:
- Linux
- MultiThreads
dependencies:
- clang-c++11-Qt5
artifacts:
paths:
- build-release-clang-cpp11-qt5/Testing/Temporary/LastTest.log
test-clang-c++11-Qt5.9.0:
stage:
Test
variables:
COMPILER: "clang"
LANGUAGE: "C++11"
QTVERSION: "QT5.9.0"
GIT_SUBMODULE_STRATEGY: recursive
script: "CI/ci-linux-test.sh"
tags:
- Linux
- MultiThreads
dependencies:
- clang-c++11-Qt5.9.0
artifacts:
paths:
- build-release-clang-cpp11-qt5.9.0/Testing/Temporary/LastTest.log
cppcheck:
stage:
Test
script: "CI/ci-cppcheck.sh"
variables:
GIT_SUBMODULE_STRATEGY: recursive
tags:
- Linux
- MultiThreads
dependencies:
artifacts:
paths:
- cppcheck.log
VS2015-Qt-5.6.2-x64:
script: "CI\\ci-windows.bat"
stage:
Build
script: "CI\\ci-windows-build.bat"
variables:
GIT_SUBMODULE_STRATEGY: recursive
ARCHITECTURE: "x64"
......@@ -67,10 +166,12 @@ VS2015-Qt-5.6.2-x64:
- Qt56
artifacts:
paths:
- rel/*.exe
- rel/
VS2015-Qt-5.6.2-x32:
script: "CI\\ci-windows.bat"
stage:
Build
script: "CI\\ci-windows-build.bat"
variables:
GIT_SUBMODULE_STRATEGY: recursive
ARCHITECTURE: "x32"
......@@ -81,10 +182,12 @@ VS2015-Qt-5.6.2-x32:
- Qt56
artifacts:
paths:
- rel/*.exe
- rel/
VS2015-Qt-5.9.0-x64:
script: "CI\\ci-windows.bat"
stage:
Build
script: "CI\\ci-windows-build.bat"
variables:
GIT_SUBMODULE_STRATEGY: recursive
ARCHITECTURE: "x64"
......@@ -94,10 +197,12 @@ VS2015-Qt-5.9.0-x64:
- VS2015
artifacts:
paths:
- rel/*.exe
- rel/
VS2015-Qt-5.9.0-x32:
script: "CI\\ci-windows.bat"
stage:
Build
script: "CI\\ci-windows-build.bat"
variables:
GIT_SUBMODULE_STRATEGY: recursive
ARCHITECTURE: "x32"
......@@ -107,10 +212,12 @@ VS2015-Qt-5.9.0-x32:
- VS2015
artifacts:
paths:
- rel/*.exe
- rel/
VS2013-Qt-5.5.1-x64:
script: "CI\\ci-windows.bat"
stage:
Build
script: "CI\\ci-windows-build.bat"
variables:
GIT_SUBMODULE_STRATEGY: recursive
ARCHITECTURE: "x64"
......@@ -121,19 +228,140 @@ VS2013-Qt-5.5.1-x64:
- Qt551
artifacts:
paths:
- rel/*.exe
- rel/
Test:VS2015-Qt-5.6.2-x64:
stage:
Test
script: "CI\\ci-windows-test.bat"
variables:
GIT_SUBMODULE_STRATEGY: recursive
ARCHITECTURE: "x64"
QT_VERSION: "Qt5.6.2"
COMPILER: "VS2015"
tags:
- VS2015
- Qt56
dependencies:
- VS2015-Qt-5.6.2-x64
artifacts:
paths:
- rel/Testing/Temporary/LastTest.log
Test:VS2015-Qt-5.6.2-x32:
stage:
Test
script: "CI\\ci-windows-test.bat"
variables:
GIT_SUBMODULE_STRATEGY: recursive
ARCHITECTURE: "x32"
QT_VERSION: "Qt5.6.2"
COMPILER: "VS2015"
tags:
- VS2015
- Qt56
dependencies:
- VS2015-Qt-5.6.2-x32
artifacts:
paths:
- rel/Testing/Temporary/LastTest.log
Test:VS2015-Qt-5.9.0-x64:
stage:
Test
script: "CI\\ci-windows-test.bat"
variables:
GIT_SUBMODULE_STRATEGY: recursive
ARCHITECTURE: "x64"
QT_VERSION: "Qt5.9.0"
COMPILER: "VS2015"
tags:
- VS2015
dependencies:
- VS2015-Qt-5.9.0-x64
artifacts:
paths:
- rel/Testing/Temporary/LastTest.log
Test:VS2015-Qt-5.9.0-x32:
stage:
Test
script: "CI\\ci-windows-test.bat"
variables:
GIT_SUBMODULE_STRATEGY: recursive
ARCHITECTURE: "x32"
QT_VERSION: "Qt5.9.0"
COMPILER: "VS2015"
tags:
- VS2015
dependencies:
- VS2015-Qt-5.9.0-x32
artifacts:
paths:
- rel/Testing/Temporary/LastTest.log
Test:VS2013-Qt-5.5.1-x64:
stage:
Test
script: "CI\\ci-windows-test.bat"
variables:
GIT_SUBMODULE_STRATEGY: recursive
ARCHITECTURE: "x64"
QT_VERSION: "Qt5.5.1"
COMPILER: "VS2013"
tags:
- VS2013
- Qt551
dependencies:
- VS2013-Qt-5.5.1-x64
artifacts:
paths:
- rel/Testing/Temporary/LastTest.log
Mac-Cpp11:
script: "CI/ci-mac.sh"
stage:
Build
script: "CI/ci-mac-build.sh"
variables:
GIT_SUBMODULE_STRATEGY: recursive
tags:
- Apple
artifacts:
paths:
- build-release/
Test:Mac-Cpp11:
stage:
Test
script: "CI/ci-mac-test.sh"
variables:
GIT_SUBMODULE_STRATEGY: recursive
tags:
- Apple
dependencies:
- Mac-Cpp11
artifacts:
paths:
- build-release/Testing/Temporary/LastTest.log
Deploy:Mac-Cpp11:
stage:
Deploy
only:
- master
script: "CI/ci-mac-deploy.sh"
variables:
GIT_SUBMODULE_STRATEGY: recursive
tags:
- Apple
dependencies:
- Mac-Cpp11
artifacts:
paths:
- build-release/*.dmg
Doc-publish:
stage:
Deploy
only:
- master
script: "CI/ci-doc.sh"
......
#!/bin/bash
# Script abort on error
set -e
# Expected Settings via environment variables:
# COMPILER= gcc/clang
# LANGUAGE= C++98 / C++11
# QTVERSION= QT4/QT5
#include ci options script
MY_DIR=$(dirname $(readlink -f $0))
source $MY_DIR/ci-linux-config.sh
echo "Building with path: build-release-$BUILDPATH"
echo "Full cmake options: $OPTIONS "
########################################
# 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
# copy the used shared libraries to the lib folder
cd Build
mkdir systemlib
ldd bin/OpenFlipper | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' systemlib
#cd ..
# create an archive with all the build files so we can use them in the test script
#tar -cvf ../buildfiles.tar .
#!/bin/bash
OPTIONS=""
MAKE_OPTIONS=""
BUILDPATH=""
if [ "$COMPILER" == "gcc" ]; then
echo "Setting Compiler to 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.8.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 "Setting compiler to CLANG";
fi
if [ "$LANGUAGE" == "C++98" ]; then
echo "Using C++98 standard";
BUILDPATH="$BUILDPATH-cpp98"
elif [ "$LANGUAGE" == "C++11" ]; then
echo "Using C++11 standard";
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++11' "
BUILDPATH="$BUILDPATH-cpp11"
fi
if [ "$QTVERSION" == "QT4" ]; then
echo "Using QT4";
OPTIONS="$OPTIONS -DFORCE_QT4=TRUE "
BUILDPATH="$BUILDPATH-qt4"
elif [ "$QTVERSION" == "QT5" ]; then
echo "Using 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"
export LD_LIBRARY_PATH=~/sw/qt-5.5.1/5.5/gcc_64/lib:$LD_LIBRARY_PATH
elif [ "$QTVERSION" == "QT5.9.0" ]; then
echo "Using QT5.9.0";
BUILDPATH="$BUILDPATH-qt5.9.0"
OPTIONS="$OPTIONS -DFORCE_QT4=FALSE -DQWT6_INCLUDE_DIR=~/sw/qwt-6.1.3-qt5.9.0/include -DQWT6_LIBRARY_DIR=~/sw/qwt-6.1.3-qt5.9.0/lib -DQWT6_LIBRARY=~/sw/qwt-6.1.3-qt5.9.0/lib/libqwt.so -DQT5_INSTALL_PATH=~/sw/Qt/5.9/gcc_64"
fi
\ No newline at end of file
#!/bin/bash
# Script abort on error
set -e
# Expected Settings via environment variables:
# COMPILER= gcc/clang
# LANGUAGE= C++98 / C++11
# QTVERSION= QT4/QT5
#include ci options script
MY_DIR=$(dirname $(readlink -f $0))
source $MY_DIR/ci-linux-config.sh
########################################
# Fetch test data
########################################
rm -rf TestData
git clone git@roosevelt:moebius/OpenFlipper-Test-Data.git TestData
#########################################
# Run Release Unittests
#########################################
# Run tests
cd build-release-$BUILDPATH
#clean old cmake cache as the path might have changed
find . -name "CMakeCache.txt" -type f -delete
#just to be safe clean the test file definitions too
if [ -f CTestTestfile.cmake ]
then
rm CTestTestfile.cmake
fi
#just to be safe clean the test file definitions too
if [ -f DartConfiguration.tcl ]
then
rm DartConfiguration.tcl
fi
cmake -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
#tell the location to the libs from build jobs
export LD_LIBRARY_PATH=$(pwd)/Build/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$(pwd)/Build/systemlib:$LD_LIBRARY_PATH
#make test
cd tests
bash run_tests.sh
cd ..
\ No newline at end of file
########################################
# 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
\ No newline at end of file
########################################
# Fetch test data
########################################
rm -rf TestData
git clone git@roosevelt:moebius/OpenFlipper-Test-Data.git TestData
#paths should be there as they are artifacts from prior stage
cd build-release
#clean old cmake cache as the path might have changed
find . -name "CMakeCache.txt" -type f -delete
#just to be safe clean the test file definitions too
if [ -f CTestTestfile.cmake ]
then
rm CTestTestfile.cmake
fi
#just to be safe clean the test file definitions too
if [ -f DartConfiguration.tcl ]
then
rm DartConfiguration.tcl
fi
# Build without ports to avoid qt4 collision
# fix pathes if run on a different machine
/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
rm -f *.dmg
make OpenFlipper_package
mv *.dmg OpenFlipper-Free-GIT-$CI_BUILD_REF-QT5.5.1-CPP11.dmg
\ No newline at end of file
########################################
# Fetch test data
########################################
rm -rf TestData
git clone git@roosevelt:moebius/OpenFlipper-Test-Data.git TestData
#expect the build-release folder to be present the program binaries are there
cd build-release
#clean old cmake cache as the path might have changed
find . -name "CMakeCache.txt" -type f -delete
#just to be safe clean the test file definitions too
if [ -f CTestTestfile.cmake ]
then
rm CTestTestfile.cmake
fi
#just to be safe clean the test file definitions too
if [ -f DartConfiguration.tcl ]
then
rm DartConfiguration.tcl
fi
# Build without ports to avoid qt4 collision
# run this prior testing to fix paths
/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
########################################
# Test
########################################
# Run tests
cd tests
bash run_tests.sh
\ No newline at end of file
@echo off
::########################################
::# Fetch test data
::########################################
rmdir /Q /S TestData
:: clone libraries git (set env variable to GIT_SSH_COMMAND maybe use setx once as this key won't change)
set GIT_SSH_COMMAND=ssh -i E:\\\gitlab\\\id_rsa
git clone git@roosevelt.informatik.rwth-aachen.de:moebius/OpenFlipper-Test-Data.git TestData
::load configuration and settings
call %~dp0\ci-windows-config.bat
mkdir rel
cd rel
::clear any old binary files
del *.exe
::invoke cmake
"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%
:: build Open-Flipper
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "ALL_BUILD"
IF %errorlevel% NEQ 0 exit /b %errorlevel%
\ No newline at end of file
:: use 4 threads for parallel compilation of the project
set CL=/MP4
:: determine VS version and set variables
if "%COMPILER%" == "VS2012" (
set QT_COMPILERPREFIX=msvc2012
set VS_COMPILERVERSION_LONG=11.0
set VS_COMPILERVERSION_SHORT=11
set VS_EDITION_YEAR=2012
)
if "%COMPILER%" == "VS2013" (
set QT_COMPILERPREFIX=msvc2013
set VS_COMPILERVERSION_LONG=12.0
set VS_COMPILERVERSION_SHORT=12
set VS_EDITION_YEAR=2013
)
if "%COMPILER%" == "VS2015" (
set QT_COMPILERPREFIX=msvc2015
set VS_COMPILERVERSION_LONG=14.0
set VS_COMPILERVERSION_SHORT=14
set VS_EDITION_YEAR=2015
)
set BUILD_PLATFORM=%COMPILER%
:: determine architecture and set variables
if "%ARCHITECTURE%" == "x64" (
set ARCHBITS=_64
set ARCH_VS= Win64
set STRING_ARCH=64-Bit
) else (
set ARCHBITS=
set ARCH_VS=
set STRING_ARCH=32-Bit
)
set GENERATOR=Visual Studio %VS_COMPILERVERSION_SHORT% %VS_EDITION_YEAR%%ARCH_VS%
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio %VS_COMPILERVERSION_LONG%\Common7\IDE\devenv.com"
:: determine Qt Version and set variables
if "%QT_VERSION%" == "Qt5.5.1" (
set QT_REV_LONG=5.5.1
set QT_REV=5.5
)
if "%QT_VERSION%" == "Qt5.6.2" (
set QT_REV_LONG=5.6.2
set QT_REV=5.6
)
if "%QT_VERSION%" == "Qt5.7.0" (
set QT_REV_LONG=5.7.0
set QT_REV=5.7
)
if "%QT_VERSION%" == "Qt5.8.0" (
set QT_REV_LONG=5.8.0
set QT_REV=5.8
)
if "%QT_VERSION%" == "Qt5.9.0" (
set QT_REV_LONG=5.9.0
set QT_REV=5.9
)