Skip to content

Commit 1988cb5

Browse files
committed
Travis CI: OS X builds
Mac OS X 10.11 with Python 2.7.12, CMake 3.6.2 and Boost 1.61.0 this is the environment offered by Travis CI with their Xcode 7.3.1 image. The following compilers are used: 1. Apple LLVM 7.3.0 and GFortran 4.8.5 2. GCC 4.8.5 3. Apple LLVM 7.3.0 and GFortran 4.9.3 4. GCC 4.9.3 5. Apple LLVM 7.3.0 and GFortran 5.4.0 6. GCC 5.4.0 7. Apple LLVM 7.3.0 and GFortran 6.2.0 8. GCC 6.2.0
1 parent ec750af commit 1988cb5

File tree

7 files changed

+76
-23
lines changed

7 files changed

+76
-23
lines changed

.appveyor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ version: '{build}-{branch}'
1313
# branches to build
1414
branches:
1515
only:
16-
- fix-travis
1716
- fix-appveyor
1817

1918
os: Windows Server 2012 R2

.travis.yml

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ env:
1313
- CCACHE_COMPRESS=1
1414
- CCACHE_MAXSIZE=200M
1515
- CCACHE_CPP2=1
16+
branches:
17+
except:
18+
- /*(?i:appveyor)*/
1619
matrix:
1720
include:
1821
- os: linux
@@ -33,6 +36,10 @@ matrix:
3336
- python-virtualenv
3437
env: CXX_COMPILER='clang++-3.5' C_COMPILER='clang-3.5' Fortran_COMPILER='gfortran'
3538
BUILD_TYPE='release'
39+
- os: osx
40+
osx_image: xcode7.3
41+
compiler: clang
42+
env: CXX_COMPILER='clang++' C_COMPILER='clang' Fortran_COMPILER='gfortran-5' BUILD_TYPE='release'
3643
- os: linux
3744
compiler: clang
3845
addons: &2
@@ -51,6 +58,10 @@ matrix:
5158
- python-virtualenv
5259
env: CXX_COMPILER='clang++-3.6' C_COMPILER='clang-3.6' Fortran_COMPILER='gfortran'
5360
BUILD_TYPE='release'
61+
- os: osx
62+
osx_image: xcode7.3
63+
compiler: gcc
64+
env: CXX_COMPILER='g++-5' C_COMPILER='gcc-5' Fortran_COMPILER='gfortran-5' BUILD_TYPE='release'
5465
- os: linux
5566
compiler: clang
5667
addons: &3
@@ -69,6 +80,10 @@ matrix:
6980
- python-virtualenv
7081
env: CXX_COMPILER='clang++-3.7' C_COMPILER='clang-3.7' Fortran_COMPILER='gfortran'
7182
BUILD_TYPE='release'
83+
- os: osx
84+
osx_image: xcode7.3
85+
compiler: clang
86+
env: CXX_COMPILER='clang++' C_COMPILER='clang' Fortran_COMPILER='gfortran-6' BUILD_TYPE='release'
7287
- os: linux
7388
compiler: clang
7489
addons: &4
@@ -87,6 +102,10 @@ matrix:
87102
- python-virtualenv
88103
env: CXX_COMPILER='clang++-3.8' C_COMPILER='clang-3.8' Fortran_COMPILER='gfortran'
89104
BUILD_TYPE='release'
105+
- os: osx
106+
osx_image: xcode7.3
107+
compiler: gcc
108+
env: CXX_COMPILER='g++-6' C_COMPILER='gcc-6' Fortran_COMPILER='gfortran-6' BUILD_TYPE='release'
90109
- os: linux
91110
compiler: gcc
92111
addons: &5
@@ -105,6 +124,10 @@ matrix:
105124
- python-virtualenv
106125
env: CXX_COMPILER='g++-4.6' C_COMPILER='gcc-4.6' Fortran_COMPILER='gfortran-4.6'
107126
BUILD_TYPE='release'
127+
- os: osx
128+
osx_image: xcode8.1
129+
compiler: clang
130+
env: CXX_COMPILER='clang++' C_COMPILER='clang' Fortran_COMPILER='gfortran-5' BUILD_TYPE='release'
108131
- os: linux
109132
compiler: gcc
110133
addons: &6
@@ -123,6 +146,10 @@ matrix:
123146
- python-virtualenv
124147
env: CXX_COMPILER='g++-4.7' C_COMPILER='gcc-4.7' Fortran_COMPILER='gfortran-4.7'
125148
BUILD_TYPE='release'
149+
- os: osx
150+
osx_image: xcode8.1
151+
compiler: gcc
152+
env: CXX_COMPILER='g++-5' C_COMPILER='gcc-5' Fortran_COMPILER='gfortran-5' BUILD_TYPE='release'
126153
- os: linux
127154
compiler: gcc
128155
addons: &7
@@ -141,6 +168,10 @@ matrix:
141168
- python-virtualenv
142169
env: CXX_COMPILER='g++-4.8' C_COMPILER='gcc-4.8' Fortran_COMPILER='gfortran-4.8'
143170
BUILD_TYPE='release'
171+
- os: osx
172+
osx_image: xcode8.1
173+
compiler: clang
174+
env: CXX_COMPILER='clang++' C_COMPILER='clang' Fortran_COMPILER='gfortran-6' BUILD_TYPE='release'
144175
- os: linux
145176
compiler: gcc
146177
addons: &8
@@ -159,6 +190,10 @@ matrix:
159190
- python-virtualenv
160191
env: CXX_COMPILER='g++-4.9' C_COMPILER='gcc-4.9' Fortran_COMPILER='gfortran-4.9'
161192
BUILD_TYPE='release'
193+
- os: osx
194+
osx_image: xcode8.1
195+
compiler: gcc
196+
env: CXX_COMPILER='g++-6' C_COMPILER='gcc-6' Fortran_COMPILER='gfortran-6' BUILD_TYPE='release'
162197
- os: linux
163198
compiler: gcc
164199
addons: &9
@@ -176,14 +211,6 @@ matrix:
176211
- gfortran-5
177212
- python-virtualenv
178213
env: CXX_COMPILER='g++-5' C_COMPILER='gcc-5' Fortran_COMPILER='gfortran-5' BUILD_TYPE='release'
179-
- os: osx
180-
osx_image: xcode7
181-
compiler: clang
182-
env: CXX_COMPILER='clang++' C_COMPILER='clang' Fortran_COMPILER='gfortran' BUILD_TYPE='release'
183-
- os: osx
184-
osx_image: xcode7
185-
compiler: gcc
186-
env: CXX_COMPILER='g++-5' C_COMPILER='gcc-5' Fortran_COMPILER='gfortran' BUILD_TYPE='release'
187214
- os: linux
188215
compiler: gcc
189216
addons: *9
@@ -192,7 +219,7 @@ matrix:
192219
install:
193220
- |
194221
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
195-
brew install cmake boost python gcc pyenv-virtualenv
222+
brew install cmake boost python gcc5 gcc6 pyenv-virtualenv
196223
fi
197224
virtualenv venv
198225
source venv/bin/activate
@@ -205,6 +232,7 @@ before_script:
205232
- ${C_COMPILER} --version
206233
- export FC=${Fortran_COMPILER}
207234
- ${Fortran_COMPILER} --version
235+
- python --version
208236
- |
209237
if [[ "${COVERAGE}" = true ]]; then
210238
python setup.py --cxx=${CXX_COMPILER} --cc=${C_COMPILER} --fc=${Fortran_COMPILER} --type=${BUILD_TYPE} --cmake-options='-Hprojects/CMake -DENABLE_FORTRAN_API=ON' --coverage
@@ -214,7 +242,7 @@ before_script:
214242
- cd build
215243
script:
216244
- VERBOSE=1 make -j 2
217-
- ctest -V -j 2
245+
- ctest --parallel 2 --output-on-failure --verbose --dashboard Experimental
218246
after_success:
219247
- |
220248
if [[ "${COVERAGE}" = true ]]; then

README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.11910.png)](http://dx.doi.org/10.5281/zenodo.11910)
22
[![Travis CI Build Status](https://travis-ci.org/PCMSolver/pcmsolver.svg?branch=master)](https://travis-ci.org/PCMSolver/pcmsolver)
33
[![Magnum CI build status](https://magnum-ci.com/status/9207aa29405095b0b7aef0cd809ed6c2.png?branch=master)](https://magnum-ci.com/builds)
4-
[![AppVeyor CI Build status](https://ci.appveyor.com/api/projects/status/qolwog8ql2gefebr?svg=true)](https://ci.appveyor.com/project/robertodr/pcmsolver)
54
[![Documentation Status](https://readthedocs.org/projects/pcmsolver/badge/?version=latest)](http://pcmsolver.readthedocs.org/en/latest/?badge=latest)
65
[![Coverage Status](https://coveralls.io/repos/PCMSolver/pcmsolver/badge.svg?branch=release)](https://coveralls.io/r/PCMSolver/pcmsolver?branch=release)
76
[![Coverity Scan Build](https://scan.coverity.com/projects/3046/badge.svg)](https://scan.coverity.com/projects/3046)
@@ -29,15 +28,15 @@ stated otherwise.
2928
Continuous integration builds
3029
-----------------------------
3130

32-
The Magnum CI builds are run on push events to any branch, while those
33-
on Travis CI only when pushing to the `master` branch.
34-
All Travis CI builds on master use ccache to speed up execution.
31+
All CI builds are triggered by push events to any branch.
32+
Travis CI runs release builds using [ccache](https://ccache.samba.org/) to speed up compilation.
33+
Magnum CI runs debug builds.
3534

3635
- Ubuntu 12.04 LTS 64-bit. GCC 4.6, Python 2.7.3, CMake 3.4.2
3736
This is the environment offered by [Magnum CI](https://magnum-ci.com)
3837
- Ubuntu 12.04 LTS 64-bit with Python 2.7.3, CMake 3.3.2 and Boost 1.55.0
3938
this is the environment offered by [Travis CI](https://travis-ci.org) pulling
40-
in various PPA. The following compilers are used, both in release and debug:
39+
in various PPA. The following compilers are used:
4140

4241
1. GCC 4.6
4342
2. GCC 4.7
@@ -49,12 +48,25 @@ All Travis CI builds on master use ccache to speed up execution.
4948
8. Clang 3.7 and GFortran 4.6
5049
9. Clang 3.8 and GFortran 4.6
5150

52-
- Mac OS X 10.9.5 with Python 2.7.10, CMake 3.2.3 and Boost 1.58.0
51+
- Mac OS X 10.11 with Python 2.7.12, CMake 3.6.2 and Boost 1.61.0
5352
this is the environment offered by [Travis CI](https://travis-ci.org)
54-
The following compilers are used, both in release and debug:
53+
with their Xcode 7.3.1 image.
54+
The following compilers are used:
5555

56-
1. XCode 7.0 with Clang and GFortran 5.2
57-
2. XCode 7.0 with GCC 5.2
56+
1. Apple LLVM 7.3.0 and GFortran 5.4.0
57+
2. GCC 5.4.0
58+
3. Apple LLVM 7.3.0 and GFortran 6.2.0
59+
4. GCC 6.2.0
60+
61+
- Mac OS X 10.12 with Python 2.7.12, CMake 3.6.1 and Boost 1.61.0
62+
this is the environment offered by [Travis CI](https://travis-ci.org)
63+
with their Xcode 8.1 image.
64+
The following compilers are used:
65+
66+
1. Apple LLVM 8.1.0 and GFortran 5.4.0
67+
2. GCC 5.4.0
68+
3. Apple LLVM 8.1.0 and GFortran 6.2.0
69+
4. GCC 6.2.0
5870

5971
The build needed for submission to [Coverity scan](https://scan.coverity.com/)
6072
is triggered by pushes to the `coverity_scan` branch. It is run on

api/pcmsolver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ typedef enum {
9595
* \param[in] message_length length of the passed message
9696
* This function **must** be defined by the host program
9797
*/
98-
void host_writer(const char * message, int message_length);
98+
PCMSOLVER_API void host_writer(const char * message, int message_length);
9999

100100
/*! \brief Creates a new PCM context object
101101
* \param[in] input_reading input processing strategy

cmake/custom/api.cmake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
#.rst:
2+
#
3+
# Manage compilation of API.
4+
# Optionally, enable compilation of Fortran 90 API bindings.
5+
#
6+
# Variables defined::
7+
#
8+
# ENABLE_FORTRAN_API
9+
#
10+
# autocmake.yml configuration::
11+
#
12+
# docopt: "--fbindings=<ENABLE_FORTRAN_API> Enable compilation of Fortran 90 API bindings <ON/OFF> [default: ON]."
13+
# define: "'-DENABLE_FORTRAN_API={0}'.format(arguments['--fbindings'])"
14+
115
include_directories(${PROJECT_SOURCE_DIR}/api)
216

317
install(FILES ${PROJECT_SOURCE_DIR}/api/pcmsolver.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})

cmake/custom/windows.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ if(CMAKE_SYSTEM_NAME MATCHES Windows)
33
add_definitions(-DPCMSOLVER_BUILD_SHARED)
44
# Get math constants such as M_PI
55
add_definitions(-D_USE_MATH_DEFINES)
6-
# Mark as undefined symbols that have to be defined by the host
7-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-U,host_writer")
86
endif()

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
--build-boost=<FORCE_CUSTOM_BOOST> Deactivate Boost detection and build on-the-fly <ON/OFF> [default: OFF].
3939
--static Create only the static library [default: False].
4040
--eigen=<EIGEN3_ROOT> Root directory for Eigen3 [default: ''].
41+
--fbindings=<ENABLE_FORTRAN_API> Enable compilation of Fortran 90 API bindings <ON/OFF> [default: ON].
4142
--type=<TYPE> Set the CMake build type (debug, release, or relwithdeb) [default: release].
4243
--generator=<STRING> Set the CMake build system generator [default: Unix Makefiles].
4344
--show Show CMake command and exit.
@@ -78,6 +79,7 @@ def gen_cmake_command(options, arguments):
7879
command.append('-DBOOST_COMPONENTS_REQUIRED=""')
7980
command.append('-DSTATIC_LIBRARY_ONLY={0}'.format(arguments['--static']))
8081
command.append('-DEIGEN3_ROOT="{0}"'.format(arguments['--eigen']))
82+
command.append('-DENABLE_FORTRAN_API={0}'.format(arguments['--fbindings']))
8183
command.append('-DCMAKE_BUILD_TYPE={0}'.format(arguments['--type']))
8284
command.append('-G "{0}"'.format(arguments['--generator']))
8385
if arguments['--cmake-options'] != "''":

0 commit comments

Comments
 (0)