Skip to content
Snippets Groups Projects
Commit 5924c81c authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Split matrix tests into separate CI jobs because they take too long

parent 4d0a9d85
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,7 @@ stages: ...@@ -24,6 +24,7 @@ stages:
WITH_MPI: "no" WITH_MPI: "no"
# configurations # configurations
WITH_TESTS: "no" WITH_TESTS: "no"
WITH_MATRIX_TESTS: "no"
WITH_COVERAGE: "no" WITH_COVERAGE: "no"
WITH_DOC: "no" WITH_DOC: "no"
WITH_BENCHMARKS: "no" WITH_BENCHMARKS: "no"
...@@ -56,6 +57,7 @@ stages: ...@@ -56,6 +57,7 @@ stages:
-DWITH_CUDA=${WITH_CUDA} -DWITH_CUDA=${WITH_CUDA}
-DWITH_CUDA_ARCH=${WITH_CUDA_ARCH} -DWITH_CUDA_ARCH=${WITH_CUDA_ARCH}
-DWITH_TESTS=${WITH_TESTS} -DWITH_TESTS=${WITH_TESTS}
-DWITH_MATRIX_TESTS=${WITH_MATRIX_TESTS}
-DWITH_DOC=${WITH_DOC} -DWITH_DOC=${WITH_DOC}
-DWITH_COVERAGE=${WITH_COVERAGE} -DWITH_COVERAGE=${WITH_COVERAGE}
-DWITH_BENCHMARKS=${WITH_BENCHMARKS} -DWITH_BENCHMARKS=${WITH_BENCHMARKS}
...@@ -65,7 +67,7 @@ stages: ...@@ -65,7 +67,7 @@ stages:
-DWITH_CI_FLAGS=yes -DWITH_CI_FLAGS=yes
# "install" implies the "all" target # "install" implies the "all" target
- ninja ${NINJAFLAGS} install - ninja ${NINJAFLAGS} install
- if [[ ${WITH_TESTS} == "yes" ]]; then - if [[ ${WITH_TESTS} == "yes" ]] || [[ ${WITH_MATRIX_TESTS} == "yes" ]]; then
ninja test; ninja test;
fi fi
- popd - popd
...@@ -125,6 +127,31 @@ cuda_tests_Release: ...@@ -125,6 +127,31 @@ cuda_tests_Release:
WITH_TESTS: "yes" WITH_TESTS: "yes"
cuda_matrix_tests_Debug:
<<: *build_template
tags:
- openmp
- gpu
variables:
<<: *default_cmake_flags
WITH_OPENMP: "yes"
WITH_CUDA: "yes"
BUILD_TYPE: Debug
WITH_MATRIX_TESTS: "yes"
cuda_matrix_tests_Release:
<<: *build_template
tags:
- openmp
- gpu
variables:
<<: *default_cmake_flags
WITH_OPENMP: "yes"
WITH_CUDA: "yes"
BUILD_TYPE: Release
WITH_MATRIX_TESTS: "yes"
cuda_examples_Debug: cuda_examples_Debug:
<<: *build_template <<: *build_template
tags: tags:
...@@ -214,6 +241,35 @@ cuda_mpi_tests_Release: ...@@ -214,6 +241,35 @@ cuda_mpi_tests_Release:
WITH_TESTS: "yes" WITH_TESTS: "yes"
cuda_mpi_matrix_tests_Debug:
<<: *build_template
tags:
- openmp
- gpu
- mpi
variables:
<<: *default_cmake_flags
WITH_OPENMP: "yes"
WITH_CUDA: "yes"
WITH_MPI: "yes"
BUILD_TYPE: Debug
WITH_MATRIX_TESTS: "yes"
cuda_mpi_matrix_tests_Release:
<<: *build_template
tags:
- openmp
- gpu
- mpi
variables:
<<: *default_cmake_flags
WITH_OPENMP: "yes"
WITH_CUDA: "yes"
WITH_MPI: "yes"
BUILD_TYPE: Release
WITH_MATRIX_TESTS: "yes"
cuda_mpi_examples_Debug: cuda_mpi_examples_Debug:
<<: *build_template <<: *build_template
tags: tags:
...@@ -293,6 +349,20 @@ default_tests_Release: ...@@ -293,6 +349,20 @@ default_tests_Release:
BUILD_TYPE: Release BUILD_TYPE: Release
WITH_TESTS: "yes" WITH_TESTS: "yes"
default_matrix_tests_Debug:
<<: *build_template
variables:
<<: *default_cmake_flags
BUILD_TYPE: Debug
WITH_MATRIX_TESTS: "yes"
default_matrix_tests_Release:
<<: *build_template
variables:
<<: *default_cmake_flags
BUILD_TYPE: Release
WITH_MATRIX_TESTS: "yes"
default_examples_Debug: default_examples_Debug:
<<: *build_template <<: *build_template
variables: variables:
...@@ -350,6 +420,30 @@ mpi_tests_Release: ...@@ -350,6 +420,30 @@ mpi_tests_Release:
BUILD_TYPE: Release BUILD_TYPE: Release
WITH_TESTS: "yes" WITH_TESTS: "yes"
mpi_matrix_tests_Debug:
<<: *build_template
tags:
- openmp
- mpi
variables:
<<: *default_cmake_flags
WITH_OPENMP: "yes"
WITH_MPI: "yes"
BUILD_TYPE: Debug
WITH_MATRIX_TESTS: "yes"
mpi_matrix_tests_Release:
<<: *build_template
tags:
- openmp
- mpi
variables:
<<: *default_cmake_flags
WITH_OPENMP: "yes"
WITH_MPI: "yes"
BUILD_TYPE: Release
WITH_MATRIX_TESTS: "yes"
mpi_examples_Debug: mpi_examples_Debug:
<<: *build_template <<: *build_template
tags: tags:
......
...@@ -23,6 +23,7 @@ option(WITH_OPENMP "Build with OpenMP support" ON) ...@@ -23,6 +23,7 @@ option(WITH_OPENMP "Build with OpenMP support" ON)
option(WITH_MPI "Build with MPI support" ON) option(WITH_MPI "Build with MPI support" ON)
option(WITH_GMP "Build with GMP support" OFF) option(WITH_GMP "Build with GMP support" OFF)
option(WITH_TESTS "Build tests" ON) option(WITH_TESTS "Build tests" ON)
option(WITH_MATRIX_TESTS "Build tests for matrices" ON)
option(WITH_PROFILING "Enable code profiling compiler flags" OFF ) option(WITH_PROFILING "Enable code profiling compiler flags" OFF )
option(WITH_COVERAGE "Enable code coverage reports from unit tests" OFF) option(WITH_COVERAGE "Enable code coverage reports from unit tests" OFF)
option(WITH_EXAMPLES "Compile the 'src/Examples' directory" ON) option(WITH_EXAMPLES "Compile the 'src/Examples' directory" ON)
...@@ -142,7 +143,7 @@ if( DEFINED ENV{CI_JOB_NAME} OR ${CMAKE_GENERATOR} STREQUAL "Ninja" ) ...@@ -142,7 +143,7 @@ if( DEFINED ENV{CI_JOB_NAME} OR ${CMAKE_GENERATOR} STREQUAL "Ninja" )
endif() endif()
# gtest has to be built before we add the MPI flags # gtest has to be built before we add the MPI flags
if( ${WITH_TESTS} ) if( ${WITH_TESTS} OR ${WITH_MATRIX_TESTS} )
enable_testing() enable_testing()
# build gtest libs # build gtest libs
...@@ -358,6 +359,7 @@ message( " WITH_OPENMP = ${WITH_OPENMP}" ) ...@@ -358,6 +359,7 @@ message( " WITH_OPENMP = ${WITH_OPENMP}" )
message( " WITH_MPI = ${WITH_MPI}" ) message( " WITH_MPI = ${WITH_MPI}" )
message( " WITH_GMP = ${WITH_GMP}" ) message( " WITH_GMP = ${WITH_GMP}" )
message( " WITH_TESTS = ${WITH_TESTS}" ) message( " WITH_TESTS = ${WITH_TESTS}" )
message( " WITH_MATRIX_TESTS = ${WITH_MATRIX_TESTS}" )
message( " WITH_PROFILING = ${WITH_PROFILING}" ) message( " WITH_PROFILING = ${WITH_PROFILING}" )
message( " WITH_COVERAGE = ${WITH_COVERAGE}" ) message( " WITH_COVERAGE = ${WITH_COVERAGE}" )
message( " WITH_EXAMPLES = ${WITH_EXAMPLES}" ) message( " WITH_EXAMPLES = ${WITH_EXAMPLES}" )
......
...@@ -22,6 +22,7 @@ WITH_CUDA_ARCH="auto" ...@@ -22,6 +22,7 @@ WITH_CUDA_ARCH="auto"
WITH_OPENMP="yes" WITH_OPENMP="yes"
WITH_GMP="no" WITH_GMP="no"
WITH_TESTS="yes" WITH_TESTS="yes"
WITH_MATRIX_TESTS="yes"
RUN_TESTS="yes" # whether to run tests if they were compiled (coverage script sets it to no) RUN_TESTS="yes" # whether to run tests if they were compiled (coverage script sets it to no)
TESTS_JOBS="4" TESTS_JOBS="4"
WITH_PROFILING="no" WITH_PROFILING="no"
...@@ -54,6 +55,7 @@ do ...@@ -54,6 +55,7 @@ do
--with-openmp=* ) WITH_OPENMP="${option#*=}" ;; --with-openmp=* ) WITH_OPENMP="${option#*=}" ;;
--with-gmp=* ) WITH_GMP="${option#*=}" ;; --with-gmp=* ) WITH_GMP="${option#*=}" ;;
--with-tests=* ) WITH_TESTS="${option#*=}" ;; --with-tests=* ) WITH_TESTS="${option#*=}" ;;
--with-matrix-tests=* ) WITH_MATRIX_TESTS="${option#*=}" ;;
--run-tests=* ) RUN_TESTS="${option#*=}" ;; --run-tests=* ) RUN_TESTS="${option#*=}" ;;
--tests-jobs=* ) TESTS_JOBS="${option#*=}" ;; --tests-jobs=* ) TESTS_JOBS="${option#*=}" ;;
--with-profiling=* ) WITH_PROFILING="${option#*=}" ;; --with-profiling=* ) WITH_PROFILING="${option#*=}" ;;
...@@ -137,6 +139,7 @@ cmake_command=( ...@@ -137,6 +139,7 @@ cmake_command=(
-DWITH_MPI=${WITH_MPI} -DWITH_MPI=${WITH_MPI}
-DWITH_GMP=${WITH_GMP} -DWITH_GMP=${WITH_GMP}
-DWITH_TESTS=${WITH_TESTS} -DWITH_TESTS=${WITH_TESTS}
-DWITH_MATRIX_TESTS=${WITH_MATRIX_TESTS}
-DWITH_PROFILING=${WITH_PROFILING} -DWITH_PROFILING=${WITH_PROFILING}
-DWITH_COVERAGE=${WITH_COVERAGE} -DWITH_COVERAGE=${WITH_COVERAGE}
-DWITH_DOC=${WITH_DOC} -DWITH_DOC=${WITH_DOC}
...@@ -213,6 +216,8 @@ if [[ ${WITH_DOC} == "yes" ]]; then ...@@ -213,6 +216,8 @@ if [[ ${WITH_DOC} == "yes" ]]; then
"$ROOT_DIR/Documentation/build" --prefix="$PREFIX" "$ROOT_DIR/Documentation/build" --prefix="$PREFIX"
fi fi
if [[ ${WITH_TESTS} == "yes" ]] && [[ ${RUN_TESTS} == "yes" ]]; then if [[ ${WITH_TESTS} == "yes" ]] || [[ ${WITH_MATRIX_TESTS} == "yes" ]]; then
CTEST_PARALLEL_LEVEL=${TESTS_JOBS} CTEST_OUTPUT_ON_FAILURE=1 $make test if [[ ${RUN_TESTS} == "yes" ]]; then
CTEST_PARALLEL_LEVEL=${TESTS_JOBS} CTEST_OUTPUT_ON_FAILURE=1 $make test
fi
fi fi
...@@ -24,6 +24,9 @@ endif() ...@@ -24,6 +24,9 @@ endif()
if( ${WITH_TESTS} ) if( ${WITH_TESTS} )
ADD_SUBDIRECTORY( UnitTests ) ADD_SUBDIRECTORY( UnitTests )
endif() endif()
if( ${WITH_MATRIX_TESTS} )
ADD_SUBDIRECTORY( UnitTests/Matrices )
endif()
if( ${WITH_PYTHON} ) if( ${WITH_PYTHON} )
ADD_SUBDIRECTORY( Python ) ADD_SUBDIRECTORY( Python )
......
ADD_SUBDIRECTORY( Communicators ) ADD_SUBDIRECTORY( Communicators )
ADD_SUBDIRECTORY( Containers ) ADD_SUBDIRECTORY( Containers )
ADD_SUBDIRECTORY( Functions ) ADD_SUBDIRECTORY( Functions )
ADD_SUBDIRECTORY( Matrices ) # Matrices are included from src/CMakeLists.txt
ADD_SUBDIRECTORY( Meshes ) ADD_SUBDIRECTORY( Meshes )
ADD_SUBDIRECTORY( Pointers ) ADD_SUBDIRECTORY( Pointers )
......
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