Commit 57015d46 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Merge branch 'cineca/ci' into develop

* cineca/ci:
  Added configurations to build with MPI on the CI
  Disabled building Benchmarks, Examples, Tools and Python in one half of the CI jobs
  Reorganization - removed useless subdirectory
  Reorganization - moved examples into src
  Reorganization of benchmarks - moved into src
parents 36639482 41a2186e
Loading
Loading
Loading
Loading
+86 −9
Original line number Diff line number Diff line
@@ -18,14 +18,24 @@ stages:
    WITH_CUDA: "no"
    WITH_CUDA_ARCH: "auto"
    WITH_MIC: "no"
    WITH_MPI: "no"
    WITH_TESTS: "yes"
    WITH_COVERAGE: "no"
    WITH_EXAMPLES: "yes"
    # these are built only in the "full" config
    WITH_BENCHMARKS: "no"
    WITH_EXAMPLES: "no"
    WITH_TOOLS: "no"
    WITH_PYTHON: "no"

# template for build jobs
.build_template_def: &build_template
    stage: build
    script:
        # set MPI compiler wrapper
        - if [[ ${WITH_MPI} == "yes" ]]; then
                export CXX=mpicxx;
                export CC=mpicc;
          fi
        # all cores including hyperthreading
#        - export NUM_CORES=$(grep "core id" /proc/cpuinfo | wc -l)
#       # all pyhsical cores
@@ -46,7 +56,10 @@ stages:
                -DWITH_MIC=${WITH_MIC}
                -DWITH_TESTS=${WITH_TESTS}
                -DWITH_COVERAGE=${WITH_COVERAGE}
                -DWITH_BENCHMARKS=${WITH_BENCHMARKS}
                -DWITH_EXAMPLES=${WITH_EXAMPLES}
                -DWITH_TOOLS=${WITH_TOOLS}
                -DWITH_PYTHON=${WITH_PYTHON}
#        - make
#        - make test
#        - make install
@@ -61,7 +74,7 @@ stages:
# Cuda builds are specified first because they take more time than host-only builds,
# which can be allocated on hosts whitout GPUs.

cuda_Debug:
cuda_base_Debug:
    <<: *build_template
    tags:
        - gpu
@@ -70,7 +83,7 @@ cuda_Debug:
        WITH_CUDA: "yes"
        BUILD_TYPE: Debug

cuda_Release:
cuda_base_Release:
    <<: *build_template
    tags:
        - gpu
@@ -79,38 +92,94 @@ cuda_Release:
        WITH_CUDA: "yes"
        BUILD_TYPE: Release

cuda+openmp_Debug:
cuda_mpi_Debug:
    <<: *build_template
    tags:
        - openmp
        - gpu
        - mpi
    variables:
        <<: *default_cmake_flags
        WITH_OPENMP: "yes"
        WITH_CUDA: "yes"
        WITH_MPI: "yes"
        BUILD_TYPE: Debug

cuda+openmp_Release:
cuda_mpi_Release:
    <<: *build_template
    tags:
        - openmp
        - gpu
        - mpi
    variables:
        <<: *default_cmake_flags
        WITH_OPENMP: "yes"
        WITH_CUDA: "yes"
        WITH_MPI: "yes"
        BUILD_TYPE: Release

default_Debug:
cuda_full_Debug:
    <<: *build_template
    tags:
        - openmp
        - gpu
    variables:
        <<: *default_cmake_flags
        WITH_OPENMP: "yes"
        WITH_CUDA: "yes"
        BUILD_TYPE: Debug
        WITH_BENCHMARKS: "yes"
        WITH_EXAMPLES: "yes"
        WITH_TOOLS: "yes"
        WITH_PYTHON: "yes"

default_Release:
cuda_full_Release:
    <<: *build_template
    tags:
        - openmp
        - gpu
    variables:
        <<: *default_cmake_flags
        WITH_OPENMP: "yes"
        WITH_CUDA: "yes"
        BUILD_TYPE: Release
        WITH_BENCHMARKS: "yes"
        WITH_EXAMPLES: "yes"
        WITH_TOOLS: "yes"
        WITH_PYTHON: "yes"

openmp_Debug:
default_base_Debug:
    <<: *build_template

default_base_Release:
    <<: *build_template
    variables:
        <<: *default_cmake_flags
        BUILD_TYPE: Release

default_mpi_Debug:
    <<: *build_template
    tags:
        - openmp
        - mpi
    variables:
        <<: *default_cmake_flags
        WITH_OPENMP: "yes"
        WITH_MPI: "yes"
        BUILD_TYPE: Debug

default_mpi_Release:
    <<: *build_template
    tags:
        - openmp
        - mpi
    variables:
        <<: *default_cmake_flags
        WITH_OPENMP: "yes"
        WITH_MPI: "yes"
        BUILD_TYPE: Release

default_full_Debug:
    <<: *build_template
    tags:
        - openmp
@@ -118,8 +187,12 @@ openmp_Debug:
        <<: *default_cmake_flags
        WITH_OPENMP: "yes"
        BUILD_TYPE: Debug
        WITH_BENCHMARKS: "yes"
        WITH_EXAMPLES: "yes"
        WITH_TOOLS: "yes"
        WITH_PYTHON: "yes"

openmp_Release:
default_full_Release:
    <<: *build_template
    tags:
        - openmp
@@ -127,3 +200,7 @@ openmp_Release:
        <<: *default_cmake_flags
        WITH_OPENMP: "yes"
        BUILD_TYPE: Release
        WITH_BENCHMARKS: "yes"
        WITH_EXAMPLES: "yes"
        WITH_TOOLS: "yes"
        WITH_PYTHON: "yes"
+4 −8
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ option(WITH_TESTS "Build tests" ON)
option(WITH_COVERAGE "Enable code coverage reports from unit tests" OFF)
option(WITH_EXAMPLES "Compile the 'examples' directory" ON)
option(WITH_TOOLS "Compile the 'src/Tools' directory" ON)
option(WITH_BENCHMARKS "Compile the 'src/Benchmarks' directory" ON)
option(WITH_PYTHON "Compile the Python bindings" ON)
option(WITH_TEMPLATES_INSTANTIATION "Enable explicit template instantiation" OFF)

@@ -421,15 +422,9 @@ INCLUDE_DIRECTORIES( ${PROJECT_BUILD_PATH} )
LINK_DIRECTORIES( ${LIBRARY_OUTPUT_PATH} )

# Add all subdirectories
# Note that it is important to start building examples as soon as possible,
# because they take the longest time and other stuff can be pipelined before
# they are finished (at least with Ninja).
if( WITH_EXAMPLES STREQUAL "yes" )
   add_subdirectory( examples )
endif( WITH_EXAMPLES STREQUAL "yes" )
if( WITH_TESTS STREQUAL "yes" )
if( ${WITH_TESTS} )
    add_subdirectory( tests )
endif( WITH_TESTS STREQUAL "yes" )
endif()
add_subdirectory( src )
add_subdirectory( share )

@@ -473,6 +468,7 @@ message( " WITH_TESTS=${WITH_TESTS}" )
message( "   WITH_COVERAGE=${WITH_COVERAGE}" )
message( "   WITH_EXAMPLES=${WITH_EXAMPLES}" )
message( "   WITH_TOOLS=${WITH_TOOLS}" )
message( "   WITH_BENCHMARKS=${WITH_BENCHMARKS}" )
message( "   WITH_PYTHON=${WITH_PYTHON}" )
message( "   WITH_TEMPLATES_INSTANTIATION=${WITH_TEMPLATES_INSTANTIATION}" )
# Print compiler options
+3 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ WITH_COVERAGE="no"
WITH_EXAMPLES="yes"
WITH_PYTHON="yes"
WITH_TOOLS="yes"
WITH_BENCHMARKS="yes"

WITH_TEMPLATE_INSTANTIATION="no"
INSTANTIATE_LONG_INT="no"
@@ -60,6 +61,7 @@ do
        --with-coverage=*                ) WITH_COVERAGE="${option#*=}" ;;
        --with-examples=*                ) WITH_EXAMPLES="${option#*=}" ;;
        --with-tools=*                   ) WITH_TOOLS="${option#*=}" ;;
        --with-benchmarks=*              ) WITH_BENCHMARKS="${option#*=}" ;;
        --with-python=*                  ) WITH_PYTHON="${option#*=}" ;;
        --with-templates-instantiation=* ) WITH_TEMPLATE_INSTANTIATION="${option#*=}" ;;
        --instantiate-long-int=*         ) INSTANTIATE_LONG_INT="${option#*=}" ;;
@@ -164,6 +166,7 @@ cmake_command=(
         -DWITH_COVERAGE=${WITH_COVERAGE}
         -DWITH_EXAMPLES=${WITH_EXAMPLES}
         -DWITH_TOOLS=${WITH_TOOLS}
         -DWITH_BENCHMARKS=${WITH_BENCHMARKS}
         -DWITH_PYTHON=${WITH_PYTHON}
         -DDCMTK_DIR=${DCMTK_DIR}
         -DWITH_TEMPLATE_INSTANTIATION=${WITH_TEMPLATE_INSTANTIATION}
+2 −1
Original line number Diff line number Diff line
add_subdirectory( Tools )
add_subdirectory (cmake)
add_subdirectory (pkgconfig)

share/Tools/CMakeLists.txt

deleted100644 → 0
+0 −2
Original line number Diff line number Diff line
add_subdirectory (cmake)
add_subdirectory (pkgconfig)
Loading