Integrate Python-based tests and benchmark into Travis

* Unfortunately, due to the SWIG dependency, we need sudo to install on
  Travis (conflicts when adding with debian-sid source prevent using addons)
  which means we cannot use the container-based infrastructure anymore.
* Building the Python bindings requires g++5 (at least with -Werr set).
* When building the Python bindings on Travis, the numpy includes are not found
  by cmake, so they have to be added separately by running a Python process with
  `numpy.get_include()`
* The build script now (somewhat clumsily) depends on the RUN_PYTEST environment
  variable. If it is set to anything other than "", it will make the tests and
  run tests and benchmarks
This commit is contained in:
Peter Dürr
2017-08-14 12:02:03 +02:00
committed by Lorenz Meier
parent 15c8c24418
commit 305a95aef9
3 changed files with 41 additions and 16 deletions
+4
View File
@@ -123,11 +123,15 @@ if(PythonTests)
set_source_files_properties(../swig/ecl.i PROPERTIES CPLUSPLUS ON)
set(swigged_sources ekf.h)
# Find numpy include
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print(numpy.get_include())" OUTPUT_VARIABLE NUMPY_INCLUDE_DIRS ERROR_QUIET)
include_directories(
..
${MATRIX_DIR}
${EIGEN3_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${NUMPY_INCLUDE_DIRS}
)
set(SWIG_MODULE_ecl_EXTRA_DEPS ${swigged_sources})