Skip to content
Snippets Groups Projects
Commit 1a345162 authored by Michal Kravcenko's avatar Michal Kravcenko
Browse files

FIX: corrected error status in linux build scripts

parent 305aada1
No related branches found
No related tags found
No related merge requests found
...@@ -90,52 +90,52 @@ ubuntu_boost_system: ...@@ -90,52 +90,52 @@ ubuntu_boost_system:
# Latest Ubuntu with Boost, Exprtk and Turtle # Latest Ubuntu with Boost, Exprtk and Turtle
# compiled locally as submodules and # compiled locally as submodules and
# linked statically # linked statically
#ubuntu_boost_local_static_deps: ubuntu_boost_local_static_deps:
# tags: tags:
# - centos7 - centos7
#
# image: martinbeseda/ubuntu-ci:latest image: martinbeseda/ubuntu-ci:latest
#
# before_script: before_script:
# - export TERM=xterm - export TERM=xterm
# - cd build_scripts/linux - cd build_scripts/linux
# - ./download_dependencies.sh - ./download_dependencies.sh
# - cd ../.. - cd ../..
# - cd build_scripts/linux - cd build_scripts/linux
# - export DEPENDENCIES_LINK_TYPE=static - export DEPENDENCIES_LINK_TYPE=static
# - export CLEAN_AFTER=yes - export CLEAN_AFTER=yes
# - ./linux_gcc_build_x64_debug_local.sh || exit 1 - ./linux_gcc_build_x64_debug_local.sh || exit 1
#
# script: script:
# - cd ../.. - cd ../..
# - cd build_scripts/linux - cd build_scripts/linux
## - './linux_run_tests.sh' # - './linux_run_tests.sh'
# - cd ../.. - cd ../..
# Latest Ubuntu with Boost, Exprtk and Turtle # Latest Ubuntu with Boost, Exprtk and Turtle
# compiled locally as submodules and # compiled locally as submodules and
# linked dynamically # linked dynamically
#ubuntu_boost_local_dynamic_deps: ubuntu_boost_local_dynamic_deps:
# tags: tags:
# - centos7 - centos7
#
# image: martinbeseda/ubuntu-ci:latest image: martinbeseda/ubuntu-ci:latest
#
# before_script: before_script:
# - export TERM=xterm - export TERM=xterm
# - cd build_scripts/linux - cd build_scripts/linux
# - ./download_dependencies.sh - ./download_dependencies.sh
# - cd ../.. - cd ../..
# - cd build_scripts/linux - cd build_scripts/linux
# - export DEPENDENCIES_LINK_TYPE=shared - export DEPENDENCIES_LINK_TYPE=shared
# - export CLEAN_AFTER=yes - export CLEAN_AFTER=yes
# - ./linux_gcc_build_x64_debug_local.sh || exit 1 - ./linux_gcc_build_x64_debug_local.sh || exit 1
#
# script: script:
# - cd ../.. - cd ../..
# - cd build_scripts/linux - cd build_scripts/linux
## - './linux_run_tests.sh' # - './linux_run_tests.sh'
# - cd ../.. - cd ../..
#code_quality: #code_quality:
......
...@@ -26,13 +26,13 @@ if [ -z ${DEPENDENCIES_LINK_TYPE} ]; then DEPENDENCIES_LINK_TYPE=static; fi ...@@ -26,13 +26,13 @@ if [ -z ${DEPENDENCIES_LINK_TYPE} ]; then DEPENDENCIES_LINK_TYPE=static; fi
if [ -z ${CLEAN_AFTER} ]; then CLEAN_AFTER=yes; fi if [ -z ${CLEAN_AFTER} ]; then CLEAN_AFTER=yes; fi
export LINK_TYPE=static export LINK_TYPE=static
if [ $DEPENDENCIES_LINK_TYPE = "shared" ] if [ ${DEPENDENCIES_LINK_TYPE} = "shared" ]
then then
export LINK_TYPE=shared export LINK_TYPE=shared
fi fi
CLEAN_AF=yes CLEAN_AF=yes
if [ $CLEAN_AFTER = "no" ] if [ ${CLEAN_AFTER} = "no" ]
then then
CLEAN_AF=no CLEAN_AF=no
fi fi
...@@ -52,7 +52,7 @@ echo "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC}" ...@@ -52,7 +52,7 @@ echo "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC}"
BUILD_SOMETHING=no BUILD_SOMETHING=no
BUILD_SOMETHING_LIB=no BUILD_SOMETHING_LIB=no
if [ $BUILD_LIB = "yes" ] if [ ${BUILD_LIB} = "yes" ]
then then
echo "${CYAN}lib4neuro${NC} build type: ${WHITE}Debug${NC}" echo "${CYAN}lib4neuro${NC} build type: ${WHITE}Debug${NC}"
echo "${CYAN}lib4neuro${NC} build architecture: ${WHITE}x64${NC}" echo "${CYAN}lib4neuro${NC} build architecture: ${WHITE}x64${NC}"
...@@ -68,14 +68,14 @@ then ...@@ -68,14 +68,14 @@ then
BUILD_SOMETHING_LIB=yes BUILD_SOMETHING_LIB=yes
fi fi
if [ $BUILD_EXAMPLES = "yes" ] if [ ${BUILD_EXAMPLES} = "yes" ]
then then
echo "${CYAN}lib4neuro${NC} examples will be built in '${YELLOW}build/examples${NC}'" echo "${CYAN}lib4neuro${NC} examples will be built in '${YELLOW}build/examples${NC}'"
BUILD_SOMETHING=yes BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes BUILD_SOMETHING_LIB=yes
fi fi
if [ $REBUILD_BOOST = "yes" ] if [ ${REBUILD_BOOST} = "yes" ]
then then
echo "The required '${CYAN}BOOST${NC}' library will be recompiled in the directory '${YELLOW}external_dependencies/boost${NC}'" echo "The required '${CYAN}BOOST${NC}' library will be recompiled in the directory '${YELLOW}external_dependencies/boost${NC}'"
rm -rf ../../external_dependencies/boost/stage rm -rf ../../external_dependencies/boost/stage
...@@ -85,26 +85,26 @@ fi ...@@ -85,26 +85,26 @@ fi
# Boost rebuild # Boost rebuild
if [ $REBUILD_BOOST = "yes" ] if [ ${REBUILD_BOOST} = "yes" ]
then then
./build_boost_gcc.sh || BUILD_ERROR_OCCURED=1 ./build_boost_gcc.sh || BUILD_ERROR_OCCURED=1
fi fi
# Should we build the lib4neuro library? (yes) # Should we build the lib4neuro library? (yes)
if [ $BUILD_SOMETHING_LIB = "yes" -a $BUILD_ERROR_OCCURED = "0" ] if [ ${BUILD_SOMETHING_LIB} = "yes" -a $BUILD_ERROR_OCCURED = "0" ]
then then
if [ $BUILD_LIB = "yes" ] if [ ${BUILD_LIB} = "yes" ]
then then
./linux_clean_lib.sh ./linux_clean_lib.sh
fi fi
if [ $BUILD_EXAMPLES = "yes" ] if [ ${BUILD_EXAMPLES} = "yes" ]
then then
./linux_clean_examples.sh ./linux_clean_examples.sh
fi fi
if [ $BUILD_TESTS = "yes" ] if [ ${BUILD_TESTS} = "yes" ]
then then
./linux_clean_tests.sh ./linux_clean_tests.sh
fi fi
...@@ -114,12 +114,12 @@ then ...@@ -114,12 +114,12 @@ then
cd ../.. cd ../..
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DLIB4NEURO_DIR=${PWD}/build/lib -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -DLIB4NEURO_INCLUDE_DIR=${LIB4NEURO_INCLUDE_DIR} . || ( echo "${RED}Makefile preparation finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; ) cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DLIB4NEURO_DIR=${PWD}/build/lib -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -DLIB4NEURO_INCLUDE_DIR=${LIB4NEURO_INCLUDE_DIR} . || echo "${RED}Makefile preparation finished with errors${NC}!"; BUILD_ERROR_OCCURED=1;
if [ $BUILD_ERROR_OCCURED = "0" ] if [ ${BUILD_ERROR_OCCURED} = "0" ]
then then
echo "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (building)" echo "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (building)"
( cmake --build . --config Debug -- -j${N_CORES} ) && ( echo "${GREEN}Build complete${NC}." ) || ( echo "${RED}Build finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; ) cmake --build . --config Debug -- -j${N_CORES} && echo "${GREEN}Build complete${NC}." || echo "${RED}Build finished with errors${NC}!"; BUILD_ERROR_OCCURED=1;
fi fi
cd build_scripts/linux cd build_scripts/linux
...@@ -128,28 +128,28 @@ fi ...@@ -128,28 +128,28 @@ fi
if [ ${CLEAN_AF} = "yes" ] if [ ${CLEAN_AF} = "yes" ]
then then
if [ $BUILD_LIB = "yes" ] if [ ${BUILD_LIB} = "yes" ]
then then
./linux_clean_after_lib.sh ./linux_clean_after_lib.sh
fi fi
if [ $BUILD_EXAMPLES = "yes" ] if [ ${BUILD_EXAMPLES} = "yes" ]
then then
./linux_clean_after_examples.sh ./linux_clean_after_examples.sh
fi fi
if [ $BUILD_TESTS = "yes" ] if [ ${BUILD_TESTS} = "yes" ]
then then
./linux_clean_after_tests.sh ./linux_clean_after_tests.sh
fi fi
if [ $BUILD_SOMETHING_LIB = "yes" ] if [ ${BUILD_SOMETHING_LIB} = "yes" ]
then then
./linux_clean_garbage.sh ./linux_clean_garbage.sh
fi fi
fi fi
if [ $BUILD_ERROR_OCCURED = "1" ] if [ ${BUILD_ERROR_OCCURED} = "1" ]
then then
echo "${RED}Build encountered some errors!${NC}" echo "${RED}Build encountered some errors!${NC}"
exit 1 exit 1
......
...@@ -99,7 +99,7 @@ then ...@@ -99,7 +99,7 @@ then
cd ../.. cd ../..
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DLIB4NEURO_DIR=${PWD}/build/lib -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -DLIB4NEURO_INCLUDE_DIR=${LIB4NEURO_INCLUDE_DIR} . || ( echo "${RED}Makefile preparation finished with errors${NC}!"; export BUILD_ERROR_OCCURED=1; ) cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DLIB4NEURO_DIR=${PWD}/build/lib -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -DLIB4NEURO_INCLUDE_DIR=${LIB4NEURO_INCLUDE_DIR} . || echo "${RED}Makefile preparation finished with errors${NC}!"; BUILD_ERROR_OCCURED=1;
if [ ${BUILD_ERROR_OCCURED} = "0" ] if [ ${BUILD_ERROR_OCCURED} = "0" ]
then then
...@@ -136,8 +136,6 @@ fi ...@@ -136,8 +136,6 @@ fi
fi fi
echo "BUILD_ERROR_OCCURED = ${BUILD_ERROR_OCCURED}"
if [ ${BUILD_ERROR_OCCURED} = "1" ] if [ ${BUILD_ERROR_OCCURED} = "1" ]
then then
echo "${RED}Build encountered some errors!${NC}" echo "${RED}Build encountered some errors!${NC}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment