Skip to content

Commit

Permalink
Merge pull request #1967 from sanssecours/馃尡
Browse files Browse the repository at this point in the history
Travis: Enable All Bindings
  • Loading branch information
markus2330 committed May 14, 2018
2 parents 5fd5319 + 629aa51 commit e3f04a7
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 18 deletions.
8 changes: 3 additions & 5 deletions .travis.yml
Expand Up @@ -106,12 +106,12 @@ before_install:
brew install checkbashisms
brew install dbus
brew install discount
brew install gobject-introspection
brew install libgcrypt
brew install libgit2
brew install libuv
brew install lua
brew install openssl
export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
brew install python@2; brew link --overwrite python@2
brew install python || brew upgrade python
# Since Qt 5.10.1 GCC is unable to compile the Qt-GUI under macOS printing the following error message:
Expand Down Expand Up @@ -172,21 +172,19 @@ before_script:
tools="kdb"
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ "$TRAVIS_OS_NAME" == "osx" && "$FAST" != "ON" && "$HASKELL" != "ON" ]]; then
python2_ver=$(python2 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') && \
CMAKE_OPT+=("-DPYTHON2_INCLUDE_DIR:PATH=$(python2-config --prefix)/include/python${python2_ver}") && \
CMAKE_OPT+=("-DPYTHON2_LIBRARY:FILEPATH=$(python2-config --prefix)/lib/libpython${python2_ver}.dylib") && \
python3_ver=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') && \
CMAKE_OPT+=("-DPYTHON_INCLUDE_DIR:PATH=$(python3-config --prefix)/include/python${python3_ver}m") && \
CMAKE_OPT+=("-DPYTHON_LIBRARY:FILEPATH=$(python3-config --prefix)/lib/libpython${python3_ver}.dylib")
ln -s /usr/local/opt/openssl/include/openssl/ /usr/local/include/openssl
fi
- >
cmake
-GNinja
-DBUILD_STATIC=OFF
-DPLUGINS="${plugins:-ALL;-jni}"
-DBINDINGS="${bindings}"
-DBINDINGS="${bindings:-ALL}"
-DENABLE_DEBUG=ON
-DTOOLS="${tools:-ALL;}"
-DINSTALL_SYSTEM_FILES=OFF
Expand Down
2 changes: 1 addition & 1 deletion doc/news/_preparation_next_release.md
Expand Up @@ -124,7 +124,7 @@ These notes are of interest for people developing Elektra:
- <<TODO>>
- <<TODO>>
- <<TODO>>

- Travis now builds all (applicable) bindings by default again.

## Fixes

Expand Down
12 changes: 6 additions & 6 deletions scripts/jenkins/Jenkinsfile
Expand Up @@ -18,7 +18,7 @@

// FIXME sloc publish errors
// XXX add missing jobs
// TODO have a per plugin/binding deps in Dockerfile for easier maintanence
// TODO have a per plugin/binding deps in Dockerfile for easier maintenance
// TODO add warnings plugins to scan for compiler warnings
// TODO maybe intend with 2 lines to not waste so much ws

Expand Down Expand Up @@ -118,7 +118,7 @@ BUILD_TARGET = determineBuildTarget()
/*****************************************************************************
* Main Stages
*
* Serial stages that contain parallized logic. Only proceeds to the next
* Serial stages that contain parallelized logic. Only proceeds to the next
* if previous stage did not fail.
*****************************************************************************/
lock('docker-images') {
Expand Down Expand Up @@ -215,7 +215,7 @@ def generate_fast_build_stages() {
return tasks
}

/* Generate Test stages for full tets coverage
/* Generate Test stages for full test coverage
*/
def generate_full_build_stages() {
def tasks = [:]
Expand Down Expand Up @@ -568,7 +568,7 @@ def trackCoverage(do_track, cl) {

/* Run the passed closure in a docker environment
*
* Automatically takes care of docker registry authentification,
* Automatically takes care of docker registry authentication,
* selecting a docker capable node,
* checkout of scm and
* setting of useful Environment variables
Expand Down Expand Up @@ -631,7 +631,7 @@ def cnokdbtest() {
ctest("Test -LE kdbtests")
}

/* Uploads ctest restults
/* Uploads ctest results
*/
def xunitUpload() {
step([$class: 'XUnitBuilder',
Expand Down Expand Up @@ -701,7 +701,7 @@ def dateFormatter(date) {
* started for a PR by commenting "jenkins build jenkinsfile[REGEX] please"
* The optional REGEX determines if all stages should be build or only a
* selection of them.
* To build only fast builds one would commenet "jenkins build
* To build only fast builds one would comment "jenkins build
* jenkinsfile[.*-fast] please".
* NOTE: none complete builds are automatically set to UNSTABLE which reports
* as a test failure on github.
Expand Down
4 changes: 2 additions & 2 deletions src/bindings/cpp/tests/testcpp_key.cpp
Expand Up @@ -362,7 +362,7 @@ TEST (key, exceptions)
{
test.setName ("no");
}
catch (kdb::KeyInvalidName)
catch (kdb::KeyInvalidName const &)
{
succeed_if (test.getName () == "", "not set to noname");
}
Expand All @@ -374,7 +374,7 @@ TEST (key, exceptions)
{
test.setName ("no");
}
catch (kdb::KeyInvalidName)
catch (kdb::KeyInvalidName const &)
{
succeed_if (test.getName () == "", "not set to noname");
}
Expand Down
5 changes: 5 additions & 0 deletions src/bindings/swig/python/CMakeLists.txt
Expand Up @@ -38,6 +38,11 @@ else ()
swig_link_libraries (swig-python elektra-core elektra-kdb ${PYTHON_LIBRARIES})
set_target_properties (_swig-python PROPERTIES OUTPUT_NAME _kdb)

# Unfortunately the generated code produces warnings.
if (CMAKE_COMPILER_IS_GNUCXX)
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-stringop-truncation")
endif (CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties (${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -DSWIG_TYPE_TABLE=kdb")

set (PYTHON_GET_MODULES_DIR_COMMAND
Expand Down
8 changes: 8 additions & 0 deletions src/bindings/swig/python2/CMakeLists.txt
Expand Up @@ -38,6 +38,14 @@ else ()
swig_link_libraries (swig-python2 elektra-core elektra-kdb ${PYTHON2_LIBRARIES})
set_target_properties (_swig-python2 PROPERTIES OUTPUT_NAME _kdb)

# Unfortunately compiling the generated code produces warnings.
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register")
elseif (CMAKE_COMPILER_IS_GNUCXX)
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-stringop-truncation")
endif ()

set_source_files_properties (${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -DSWIG_TYPE_TABLE=kdb")

set (PYTHON_GET_MODULES_DIR_COMMAND
Expand Down
18 changes: 16 additions & 2 deletions src/bindings/swig/ruby/CMakeLists.txt
Expand Up @@ -53,10 +53,24 @@ else ()
# disable certain compiler warnings for SWIG generated files
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-unused-parameter")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-sign-compare")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-dynamic-class-memaccess")
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-unused-but-set-variable")
endif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-catch-value")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-class-memaccess")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-maybe-uninitialized")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-dynamic-class-memaccess")

# TODO: Reenable the following warning after we add a virtual destructor to `PluginDatabase`, and its subclasses.
# See also:
# - https://github.com/ElektraInitiative/libelektra/pull/1841
# - https://github.com/ElektraInitiative/libelektra/commit/15d67328
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-delete-non-virtual-dtor")

set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-reserved-user-defined-literal")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-macro-redefined")
endif ()

# add 'kdb' module
if (CMAKE_VERSION VERSION_LESS 3.8)
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/python/CMakeLists.txt
Expand Up @@ -12,6 +12,11 @@ if (DEPENDENCY_PHASE)

# we call this SWIG_COMPILE_FLAGS because we have the same variable in our swig bindings
set (SWIG_COMPILE_FLAGS "-Wno-shadow -Wno-old-style-cast -Wno-unused-variable -Wno-missing-field-initializers")
# Unfortunately compiling the generated code produces warnings about casts between incompatible function types.
if (CMAKE_COMPILER_IS_GNUCXX)
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type")
endif ()

set_source_files_properties ("python.cpp" PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}")
elseif (NOT PYTHONLIBS_FOUND)
remove_plugin (python "python 3 libs (libpython3-dev) not found")
Expand Down
7 changes: 6 additions & 1 deletion src/plugins/python2/CMakeLists.txt
Expand Up @@ -13,7 +13,12 @@ if (DEPENDENCY_PHASE)
add_custom_command (OUTPUT runtime.h COMMAND ${SWIG_EXECUTABLE} -c++ -python -external-runtime runtime.h)

# we call this SWIG_COMPILE_FLAGS because we have the same variable in our swig bindings
set (SWIG_COMPILE_FLAGS "-Wno-shadow -Wno-old-style-cast -Wno-unused-variable -Wno-deprecated-register")
set (SWIG_COMPILE_FLAGS "-Wno-shadow -Wno-old-style-cast -Wno-unused-variable")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type")
endif ()
set_source_files_properties ("python.cpp" PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}")
elseif (NOT PYTHON2LIBS_FOUND)
remove_plugin (python2 "python 2 libs (libpython-dev) not found")
Expand Down
8 changes: 7 additions & 1 deletion src/plugins/ruby/CMakeLists.txt
Expand Up @@ -21,9 +21,15 @@ if (DEPENDENCY_PHASE)
# we call this SWIG_COMPILE_FLAGS because we have the same variable in our swig bindings
set (SWIG_COMPILE_FLAGS
"-Wno-shadow -Wno-old-style-cast -Wno-unused-variable -Wno-unused-parameter -Wno-reserved-user-defined-literal")
if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")

# Disable warnings produced by generated code
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-macro-redefined")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-literal-suffix")
endif ()

set_source_files_properties ("ruby.cpp" PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}")
elseif (NOT RUBY_FOUND)
remove_plugin (ruby "ruby not found")
Expand Down

0 comments on commit e3f04a7

Please sign in to comment.