Commit 35e54978 authored by Martin Beseda's avatar Martin Beseda

Merge branch 'dev'

parents 1798a053 77eb852b
*.l4n
*.e*
*.o*
*.orig
*.4n
*.o
......
# CI script for lib4neuro
# _local: External dependencies are being downloaded directly into lib4neuro folder and compiled automatically
# _manual: External dependencies' paths are specified via system variables
# _system: External dependencies are located in system paths
variables:
BUILD_LIB: 'yes'
BUILD_EXAMPLES: 'yes'
BUILD_TESTS: 'yes'
WIN_ARMADILLO_ROOT: 'C:\Users\suser\Desktop\lib4neuro_dependencies\armadillo'
WIN_BOOST_ROOT: 'C:\Users\suser\Desktop\lib4neuro_dependencies\boost'
WIN_EXPRTK_ROOT: 'C:\Users\suser\Desktop\lib4neuro_dependencies\exprtk'
WIN_TURTLE_ROOT: 'C:\Users\suser\Desktop\lib4neuro_dependencies\turtle'
clean_after: 'yes'
stages:
- build
# Windows 10 with dependencies
# downloaded (and compiled) locally
# compiled by VisualStudio 2017
win_visual_studio_static_local_deps:
tags:
- Win
image: windows:latest
## Windows 10
## Compiled by VisualStudio 2017
#win_visual_studio_static_local:
#
# only:
# refs:
# - master
# - CItest
#
# tags:
# - Win
#
# image: windows:latest
#
# stage: build
#
# variables:
# WIN_ARMADILLO_ROOT: ''
# WIN_BOOST_ROOT: ''
# WIN_EXPRTK_ROOT: ''
# WIN_TURTLE_ROOT: ''
# DEPENDENCIES_LINK_TYPE: 'static'
#
# before_script:
# - 'call VsDevCmd.bat'
# - '"C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2019.5.068\bin\psxevars.bat" intel64 vs2017'
# - 'rmdir /s /q build external_dependencies\*'
#
# script:
# - 'call build_scripts\windows\win_VS_build_x64_release.bat'
#
## Windows 10
## Compiled by VisualStudio 2017
#win_visual_studio_2017_static_manual:
# tags:
# - Win
#
# image: windows:latest
#
# stage: build
#
# variables:
# DEPENDENCIES_LINK_TYPE: 'static'
## FC: 'C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2019.5.068\compilers_and_libraries_2019\windows\bin\intel64\ifort.exe'
#
# before_script:
# - 'rmdir /s /q build external_dependencies\*'
# - 'call VsDevCmd.bat &&
# call "C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2019.5.068\bin\psxevars.bat" intel64 vs2017 &&
# copy /b NUL prep_success'
#
# artifacts:
# paths:
# - 'prep_success'
# expire_in: 5 mins
#
# script:
# - 'if not exist prep_success ( exit 1 )'
# - 'where cl'
# - 'where ifort'
# - 'echo %cd%'
# - 'echo %PATH%'
# - 'call build_scripts\windows\win_VS_build_x64_release.bat'
#
## Windows 10
## Compiled by VisualStudio 2015
#win_visual_studio_2015_static_local:
# only:
# refs:
# - master
# - CItest
#
# tags:
# - Win
#
# image: windows:latest
#
# stage: build
#
# variables:
# WIN_ARMADILLO_ROOT: ''
# WIN_BOOST_ROOT: ''
# WIN_EXPRTK_ROOT: ''
# WIN_TURTLE_ROOT: ''
# DEPENDENCIES_LINK_TYPE: 'static'
#
# before_script:
# - 'call VsDevCmd.bat'
# - 'call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows\bin\ifortvars.bat" intel64 vs2015'
# - 'rmdir /s /q build external_dependencies\*'
#
# script:
# - 'call build_scripts\windows\win_VS2015_build_x64_release.bat'
#
## Windows 10
## Compiled by VisualStudio 2015
#win_visual_studio_2015_static_manual:
# tags:
# - Win
#
# image: windows:latest
#
# stage: build
#
# variables:
# DEPENDENCIES_LINK_TYPE: 'static'
#
# before_script:
# - 'rmdir /s /q build external_dependencies\*'
# - 'call VsDevCmd.bat &&
# call "C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2019.5.068\bin\psxevars.bat" intel64 vs2015 &&
# copy /b NUL prep_success'
#
# artifacts:
# paths:
# - 'prep_success'
# expire_in: 5 mins
#
# script:
# - 'if not exist prep_success ( exit 1 )'
# - 'where cl'
# - 'where ifort'
# - 'echo %cd%'
# - 'echo %PATH%'
# - 'call build_scripts\windows\win_VS2015_build_x64_release.bat'
# Latest Ubuntu
ubuntu_shared_system:
image: martinbeseda/lib4neuro-ubuntu-system-deps:latest
stage: build
before_script:
- rmdir /s /q build external_dependencies/*
- call VsDevCmd.bat
- set DEPENDENCIES_LINK_TYPE=static
- set clean_after=yes
- set BUILD_LIB=yes
- set BUILD_EXAMPLES=yes
- set BUILD_TESTS=yes
script:
- call build_scripts\windows\win_VS_build_x64_release.bat
# Windows 10 with dependencies
# downloaded (and compiled) locally
# compiled by VisualStudio 2015
win_visual_studio_2015_static_local_deps:
tags:
- Win
image: windows:latest
stage: build
variables:
WIN_ARMADILLO_ROOT: ''
WIN_BOOST_ROOT: ''
WIN_EXPRTK_ROOT: ''
WIN_TURTLE_ROOT: ''
DEPENDENCIES_LINK_TYPE: 'shared'
before_script:
- rmdir /s /q build external_dependencies/*
- set DEPENDENCIES_LINK_TYPE=static
- set clean_after=yes
- set BUILD_LIB=yes
- set BUILD_EXAMPLES=yes
- set BUILD_TESTS=yes
- 'rm -rf build external_dependencies/*'
script:
- call build_scripts\windows\win_VS2015_build_x64_release.bat
- 'build_scripts/linux/linux_gcc_build_x64_release_system.sh'
# Latest Ubuntu with dependencies
# in system directories, Boost
# installed from the official repository
ubuntu_boost_system:
image: martinbeseda/lib4neuro-ubuntu-system-deps:latest
stage: build
before_script:
- rm -rf build external_dependencies/*
- export TERM=xterm
- export DEPENDENCIES_LINK_TYPE=shared
- export CLEAN_AFTER=yes
- export BUILD_LIB=yes
- export BUILD_EXAMPLES=yes
- export BUILD_TESTS=yes
# Latest Ubuntu
ubuntu_static_local:
only:
refs:
- master
- CItest
script:
- build_scripts/linux/linux_gcc_build_x64_debug_system.sh
# Latest Ubuntu with dependencies
# downloaded (and compiled) locally
ubuntu_boost_local_static_deps:
image: martinbeseda/ubuntu-ci:latest
stage: build
variables:
WIN_ARMADILLO_ROOT: ''
WIN_BOOST_ROOT: ''
WIN_EXPRTK_ROOT: ''
WIN_TURTLE_ROOT: ''
DEPENDENCIES_LINK_TYPE: 'static'
before_script:
- rm -rf build external_dependencies/*
- export TERM=xterm
- export DEPENDENCIES_LINK_TYPE=static
- export CLEAN_AFTER=yes
- export BUILD_LIB=yes
- export BUILD_EXAMPLES=yes
- export BUILD_TESTS=yes
- 'rm -rf build external_dependencies/*'
script:
- build_scripts/linux/linux_gcc_build_x64_debug_local.sh
- 'build_scripts/linux/linux_gcc_build_x64_release_local.sh'
# Latest CentOS
centos_static_local:
only:
refs:
- master
- CItest
# Latest CentOS with dependencies
# downloaded (and compiled) locally
centos_local_deps:
image: martinbeseda/centos-ci:latest
stage: build
variables:
WIN_ARMADILLO_ROOT: ''
WIN_BOOST_ROOT: ''
WIN_EXPRTK_ROOT: ''
WIN_TURTLE_ROOT: ''
DEPENDENCIES_LINK_TYPE: 'static'
before_script:
- rm -rf build external_dependencies/*
- export TERM=xterm
- export DEPENDENCIES_LINK_TYPE=static
- export CLEAN_AFTER=yes
- export BUILD_LIB=yes
- export BUILD_EXAMPLES=yes
- export BUILD_TESTS=yes
- 'rm -rf build external_dependencies/*'
script:
- scl enable devtoolset-8 -- build_scripts/linux/linux_gcc_build_x64_debug_local.sh
- 'build_scripts/linux/linux_gcc_build_x64_release_local.sh'
This diff is collapsed.
......@@ -5,5 +5,5 @@ export CLEAN_AFTER=no
rm -f build/CMakeCache.txt
export DEPENDENCIES_LINK_TYPE=static
build_scripts/linux/linux_gcc_build_x64_debug_local.sh
build_scripts/linux/linux_gcc_build_x64_release_local.sh
cd ../..
......@@ -2,7 +2,7 @@
echo "Generating documentation into folder 'docs'...";
doxygen 2>&1;
cd docs/latex;
cd docs/latex || exit 1;
echo "Building LaTeX documentation../";
make >/dev/null && echo "Documentation was built." || exit -1;
cd ../..;
File mode changed from 100644 to 100755
#!/usr/bin/bash
current_dir=$(pwd)
script_dir=$(dirname $0)
if [ $script_dir = '.' ]
then
script_dir="$current_dir"
fi
source ${script_dir}/load_salomon_modules.inc
#./clean.sh
$(pwd)/build.sh
#!/bin/sh
clear
export BOOST_ROOT=${PWD}../../external_dependencies/boost
export LIB4NEURO_INCLUDE_DIR=${PWD}/../../include
# Should we build the examples? (yes/no)
BUILD_EXAMPLES=yes
# Should we build the unit-tests? (yes/no)
BUILD_TESTS=yes
# Should we build the lib4neuro library? (yes)
BUILD_LIB=yes
# C++ compiler
CXX_COMPILER="g++"
C_COMPILER="gcc"
#**********************DO NOT CHANGE BEYOND THIS LINE****************************************
if [ -z ${DEPENDENCIES_LINK_TYPE} ]; then DEPENDENCIES_LINK_TYPE=static; fi
if [ -z ${CLEAN_AFTER} ]; then CLEAN_AFTER=yes; fi
LINK_TYPE=static
if [ ${DEPENDENCIES_LINK_TYPE} = "shared" ]
then
LINK_TYPE=shared
fi
CLEAN_AF=yes
if [ ${CLEAN_AFTER} = "no" ]
then
CLEAN_AF=no
fi
BUILD_ERROR_OCCURED=0
RED='\033[0;31m'
CYAN='\033[0;36m'
YELLOW='\033[1;33m'
GREEN='\033[0;32m'
WHITE='\033[1;37m'
NC='\033[0m' # No Color
echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC}"
BUILD_SOMETHING=no
BUILD_SOMETHING_LIB=no
if [ ${BUILD_LIB} = "yes" ]
then
echo "${CYAN}lib4neuro${NC} build type: ${WHITE}Debug${NC}"
echo "${CYAN}lib4neuro${NC} build architecture: ${WHITE}x64${NC}"
echo "${CYAN}lib4neuro${NC} will be built in '${YELLOW}build/lib/${NC}'"
BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes
fi
if [ ${BUILD_TESTS} = "yes" ]
then
echo -e "${CYAN}lib4neuro${NC} unit tests will be built in '${YELLOW}build/unit-tests${NC}'"
BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes
fi
if [ ${BUILD_EXAMPLES} = "yes" ]
then
echo -e "${CYAN}lib4neuro${NC} examples will be built in '${YELLOW}build/examples${NC}'"
BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes
fi
rm -rf ../../external_dependencies/boost/*
rm -rf ../../external_dependencies/exprtk/*
# Should we build the lib4neuro library? (yes)
if [ ${BUILD_SOMETHING_LIB} = "yes" -a ${BUILD_ERROR_OCCURED} = "0" ]
then
if [ ${BUILD_LIB} = "yes" ]
then
./linux_clean_lib.sh
fi
if [ ${BUILD_EXAMPLES} = "yes" ]
then
./linux_clean_examples.sh
fi
if [ ${BUILD_TESTS} = "yes" ]
then
./linux_clean_tests.sh
fi
echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (preparing makefiles)"
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} -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -S . -B build || { echo -e "${RED}Makefile preparation finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
if [ ${BUILD_ERROR_OCCURED} -eq 0 ]
then
echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (building)"
cmake --build build --config Debug -- -j ${N_CORES} && echo -e "${GREEN}Build complete${NC}." || { echo -e "${RED}Build finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
fi
fi
if [ ${BUILD_ERROR_OCCURED} -eq 1 ]
then
echo -e "${RED}Build encountered some errors!${NC}"
exit 1
fi
......@@ -5,12 +5,14 @@ clear
export BOOST_ROOT=${PWD}../../external_dependencies/boost
export LIB4NEURO_INCLUDE_DIR=${PWD}/../../include
# Add path to MPICH binaries on CentOS
export PATH=${PATH}:/usr/lib64/mpich/bin
# Should we build the examples? (yes/no)
BUILD_EXAMPLES=yes
# Should we build the unit-tests? (yes/no)
BUILD_TESTS=yes
BUILD_TESTS=no
# Should we rebuild BOOST? (yes/no)
#REBUILD_BOOST=yes
......@@ -18,8 +20,10 @@ BUILD_TESTS=yes
BUILD_LIB=yes
# C++ compiler
CXX_COMPILER="g++"
C_COMPILER="gcc"
#CXX_COMPILER="g++"
#C_COMPILER="gcc"
CXX_COMPILER="mpicxx"
C_COMPILER="mpicc"
#**********************DO NOT CHANGE BEYOND THIS LINE****************************************
if [ -z ${DEPENDENCIES_LINK_TYPE} ]; then DEPENDENCIES_LINK_TYPE=static; fi
......
......@@ -5,6 +5,8 @@ clear
export BOOST_ROOT=${PWD}../../external_dependencies/boost
export LIB4NEURO_INCLUDE_DIR=${PWD}/../../include
# Add path to MPICH binaries on CentOS
export PATH=${PATH}:/usr/lib64/mpich/bin
# Should we build the examples? (yes/no)
BUILD_EXAMPLES=yes
......@@ -18,6 +20,8 @@ BUILD_LIB=yes
# C++ compiler
CXX_COMPILER="g++"
C_COMPILER="gcc"
CXX_COMPILER="mpicxx"
C_COMPILER="mpicc"
#**********************DO NOT CHANGE BEYOND THIS LINE****************************************
if [ -z ${DEPENDENCIES_LINK_TYPE} ]; then DEPENDENCIES_LINK_TYPE=static; fi
......
#!/bin/sh
clear
export BOOST_ROOT=${PWD}../../external_dependencies/boost
export LIB4NEURO_INCLUDE_DIR=${PWD}/../../include
# Add path to MPICH binaries on CentOS
export PATH=${PATH}:/usr/lib64/mpich/bin
# Should we build the examples? (yes/no)
BUILD_EXAMPLES=yes
# Should we build the unit-tests? (yes/no)
BUILD_TESTS=no
# Should we rebuild BOOST? (yes/no)
#REBUILD_BOOST=yes
# Should we build the lib4neuro library? (yes)
BUILD_LIB=yes
# C++ compiler
#CXX_COMPILER="g++"
#C_COMPILER="gcc"
CXX_COMPILER="mpicxx"
C_COMPILER="mpicc"
FORTRAN_COMPILER="mpif90"
#**********************DO NOT CHANGE BEYOND THIS LINE****************************************
if [ -z ${DEPENDENCIES_LINK_TYPE} ]; then DEPENDENCIES_LINK_TYPE=static; fi
if [ -z ${CLEAN_AFTER} ]; then CLEAN_AFTER=yes; fi
export LINK_TYPE=static
if [ ${DEPENDENCIES_LINK_TYPE} = "shared" ]
then
export LINK_TYPE=shared
fi
CLEAN_AF=yes
if [ ${CLEAN_AFTER} = "no" ]
then
CLEAN_AF=no
fi
BUILD_ERROR_OCCURED=0
RED='\033[0;31m'
CYAN='\033[0;36m'
YELLOW='\033[1;33m'
GREEN='\033[0;32m'
WHITE='\033[1;37m'
NC='\033[m' # No Color
echo -e "Building the ${CYAN}lib4neuro${NC} project for ${WHITE}Release${NC}"
BUILD_SOMETHING=no
BUILD_SOMETHING_LIB=no
if [ ${BUILD_LIB} = "yes" ]
then
echo -e "${CYAN}lib4neuro${NC} build type: ${WHITE}Release${NC}"
echo -e "${CYAN}lib4neuro${NC} build architecture: ${WHITE}x64${NC}"
echo -e "${CYAN}lib4neuro${NC} will be built in '${YELLOW}build/lib/${NC}'"
BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes
fi
if [ $BUILD_TESTS = "yes" ]
then
echo -e "${CYAN}lib4neuro${NC} unit tests will be built in '${YELLOW}build/unit-tests${NC}'"
BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes
fi
if [ ${BUILD_EXAMPLES} = "yes" ]
then
echo -e "${CYAN}lib4neuro${NC} examples will be built in '${YELLOW}build/examples${NC}'"
BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes
fi
#if [ ${REBUILD_BOOST} = "yes" ]
#then
# echo -e "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/bin.v2
# BUILD_SOMETHING=yes
#fi
# Boost rebuild
#if [ ${REBUILD_BOOST} = "yes" ]
#then
# ./build_boost_gcc.sh || BUILD_ERROR_OCCURED=1
#fi
# Should we build the lib4neuro library? (yes)
if [ ${BUILD_SOMETHING_LIB} = "yes" -a $BUILD_ERROR_OCCURED = "0" ]
then
if [ ${BUILD_LIB} = "yes" ]
then
./linux_clean_lib.sh
fi
if [ ${BUILD_EXAMPLES} = "yes" ]
then
./linux_clean_examples.sh
fi
if [ ${BUILD_TESTS} = "yes" ]
then
./linux_clean_tests.sh
fi
echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Release${NC} (preparing makefiles)"
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_Fortran_COMPILER=${FORTRAN_COMPILER} -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} -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -S . -B build || { echo -e "${RED}Makefile preparation finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
if [ ${BUILD_ERROR_OCCURED} = "0" ]
then
echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Release${NC} (building)"
. $(pwd)/set_env_n_cores
cmake --build build --config Release -j ${N_CORES} && echo -e "${GREEN}Build complete${NC}." || { echo -e "${RED}Build finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
fi
fi
if [ ${BUILD_ERROR_OCCURED} = "1" ]
then
echo -e "${RED}Build encountered some errors!${NC}"
exit 1
fi
#!/bin/sh
clear
export BOOST_ROOT=${PWD}../../external_dependencies/boost
export LIB4NEURO_INCLUDE_DIR=${PWD}/../../include
# Add path to MPICH binaries on CentOS
export PATH=${PATH}:/usr/lib64/mpich/bin
# Should we build the examples? (yes/no)
BUILD_EXAMPLES=yes
# Should we build the unit-tests? (yes/no)
BUILD_TESTS=yes
# Should we build the lib4neuro library? (yes)
BUILD_LIB=yes
# C++ compiler
CXX_COMPILER="g++"
C_COMPILER="gcc"