Skip to content

Commit

Permalink
Merge pull request #136 from bluescarni/ci_fixes
Browse files Browse the repository at this point in the history
More CI fixes.
  • Loading branch information
bluescarni authored Nov 11, 2017
2 parents a548615 + 46d0992 commit 031e71e
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ matrix:
sudo: required
services:
- docker
allow_failures:
- env: PAGMO_BUILD="CoverageGCC5"

script:
- mkdir build
Expand Down
18 changes: 16 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ endif()
if(YACMA_COMPILER_IS_MSVC)
# Disable the idiotic minmax macros on MSVC, some annoying warnings,
# and enable the bigobj option.
list(APPEND PAGMO_CXX_FLAGS_DEBUG "-DNOMINMAX" "/wd4459" "/wd4127" "/bigobj")
list(APPEND PAGMO_CXX_FLAGS_RELEASE "-DNOMINMAX" "/wd4459" "/wd4127" "/bigobj")
list(APPEND PAGMO_CXX_FLAGS_DEBUG "-DNOMINMAX" "/wd4459" "/wd4127" "/wd4702" "/bigobj")
list(APPEND PAGMO_CXX_FLAGS_RELEASE "-DNOMINMAX" "/wd4459" "/wd4127" "/wd4702" "/bigobj")
endif()
if(YACMA_COMPILER_IS_INTELXX)
# NOTE: on MSVC we use the push/pop pragmas, but they do not seem to work on Intel (the pragmas
Expand Down Expand Up @@ -171,6 +171,20 @@ if(PAGMO_BUILD_PAGMO)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen/Doxyfile.in" "${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen/Doxyfile" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/sphinx/conf.py.in" "${CMAKE_CURRENT_SOURCE_DIR}/doc/sphinx/conf.py" @ONLY)

# This is just a simple counter variable, internal use only.
set(_PAGMO_TEST_NUM "0")
# Check splitting options. These need to be set from the command line.
# - PAGMO_TEST_NSPLIT: number of chunks into which the unit tests will be divided (must be > 1).
# - PAGMO_TEST_SPLIT_NUM: 0-based index of the chunk to run.
if(PAGMO_TEST_NSPLIT AND "${PAGMO_TEST_SPLIT_NUM}" STREQUAL "")
message(FATAL_ERROR "Test splitting was requested, but the PAGMO_TEST_SPLIT_NUM variable was not set.")
elseif(NOT PAGMO_TEST_NSPLIT AND NOT "${PAGMO_TEST_SPLIT_NUM}" STREQUAL "")
message(FATAL_ERROR "The PAGMO_TEST_SPLIT_NUM variable was set, but test splitting was not requested.")
endif()
if(PAGMO_TEST_NSPLIT)
message(STATUS "Tests will be split into ${PAGMO_TEST_NSPLIT} chunks. The chunk with index ${PAGMO_TEST_SPLIT_NUM} will be processed.")
endif()

if(PAGMO_BUILD_TESTS)
add_subdirectory("${CMAKE_SOURCE_DIR}/tests")
endif()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pagmo
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/pagmo2/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/esa/pagmo2.svg?branch=master)](https://travis-ci.org/esa/pagmo2)
[![Build status](https://ci.appveyor.com/api/projects/status/sus3dsyg3376tiri/branch/master?svg=true)](https://ci.appveyor.com/project/ci4esa/pagmo2/branch/master)
[![Docs](https://readthedocs.org/projects/pip/badge/?version=latest)](https://esa.github.io/pagmo2/)
[![Docs](https://media.readthedocs.org/static/projects/badges/passing.svg)](https://esa.github.io/pagmo2/)
[![codecov.io](https://codecov.io/github/esa/pagmo2/coverage.svg?branch=master)](https://codecov.io/github/esa/pagmo2?branch=master)
[![PyPI](https://img.shields.io/pypi/v/pygmo.svg)](https://pypi.python.org/pypi/pygmo)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/pagmo/badges/version.svg)](https://anaconda.org/conda-forge/pagmo)
Expand Down
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ install:
- if [%BUILD_TYPE%]==[MSVC_64_Debug] conda update conda -y
- if [%BUILD_TYPE%]==[MSVC_64_Debug] conda update --all -y
- if [%BUILD_TYPE%]==[MSVC_64_Debug] conda create -y --name pagmo python=3.6 cmake boost eigen nlopt

# NOTE: need to use "call" because otherwise it won't work within an if block.
- if [%BUILD_TYPE%]==[MSVC_64_Debug] call activate pagmo

Expand All @@ -43,7 +42,6 @@ install:
- if [%BUILD_TYPE%]==[MSVC_64_Python36] conda update conda -y
- if [%BUILD_TYPE%]==[MSVC_64_Python36] conda update --all -y
- if [%BUILD_TYPE%]==[MSVC_64_Python36] conda create -y --name pagmo python=3.6 cmake boost eigen nlopt numpy cloudpickle ipyparallel

- if [%BUILD_TYPE%]==[MSVC_64_Python36] call activate pagmo

# Rename sh.exe as sh.exe in PATH interferes with MinGW.
Expand Down
6 changes: 3 additions & 3 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
coverage:
ignore:
- tests/.*
- tutorials/.*
- include/pagmo/external/.*
- "tests/.*"
- "tutorials/.*"
- "include/pagmo/external"

notify:
gitter:
Expand Down
2 changes: 2 additions & 0 deletions include/pagmo/serialization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ see https://www.gnu.org/licenses/. */
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#pragma GCC diagnostic ignored "-Wdeprecated"
#if __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
#endif

// Enable thread-safety in cereal. See:
// http://uscilab.github.io/cereal/thread_safety.html
Expand Down
7 changes: 7 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/hypervolume_test_data/" DESTINATION "${CMAKE_BINARY_DIR}/tests/hypervolume_test_data/")

function(ADD_PAGMO_TESTCASE arg1)
if(PAGMO_TEST_NSPLIT)
math(EXPR __PAGMO_TEST_NUM "(${_PAGMO_TEST_NUM} + 1) % ${PAGMO_TEST_NSPLIT}")
set(_PAGMO_TEST_NUM ${__PAGMO_TEST_NUM} PARENT_SCOPE)
endif()
if(PAGMO_TEST_NSPLIT AND "${PAGMO_TEST_SPLIT_NUM}" STREQUAL "${_PAGMO_TEST_NUM}")
return()
endif()
add_executable(${arg1} ${arg1}.cpp)
target_link_libraries(${arg1} pagmo)
target_compile_options(${arg1} PRIVATE "$<$<CONFIG:DEBUG>:${PAGMO_CXX_FLAGS_DEBUG}>" "$<$<CONFIG:RELEASE>:${PAGMO_CXX_FLAGS_RELEASE}>")
Expand Down

0 comments on commit 031e71e

Please sign in to comment.