Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper-Free
Commits
d8d3e81b
Commit
d8d3e81b
authored
Aug 01, 2017
by
Martin Schultz
Browse files
added separate CI scripts for linux
parent
43a0e7de
Changes
3
Hide whitespace changes
Inline
Side-by-side
CI/ci-linux-build.sh
0 → 100755
View file @
d8d3e81b
#!/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-options-linux.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 .
CI/ci-linux-config.sh
0 → 100644
View file @
d8d3e81b
#!/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
CI/ci-linux-test.sh
0 → 100755
View file @
d8d3e81b
#!/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-options-linux.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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment