Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bringing Develop up to Master. #10

Merged
merged 9 commits into from
Jun 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#======================================================================
#
coverage:
range: 60...90
round: down
precision: 2
30 changes: 18 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then
brew update
brew install gcc6
brew install gcc@6
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
Expand All @@ -61,19 +61,25 @@ script:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
export LD_LIBRARY_PATH=${PWD}/schemes/check/src/check-build
elif [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then
make test
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then
export DYLD_LIBRARY_PATH=${PWD}/schemes/check/src/check-build
ctest
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
make clean
alias gcov="/usr/bin/gcov-6"
cmake -DCMAKE_BUILD_TYPE=Coverage .. && make coverage
fi

after_success:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
bash <(curl -s https://codecov.io/bash)
fi
make test
# - |
# if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
# make clean
# cmake -DCMAKE_BUILD_TYPE=Coverage .. && make coverage
# bash <(curl -s https://codecov.io/bash)
# fi
#
#after_success:
# - coveralls --exclude lib --exclude tests --gcov-options '\-lp'

#======================================================================
# Notifications
Expand Down
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ option(BUILD_SHARED_LIBS "Build a shared library" ON)
# Enable code coverage
if(CMAKE_COMPILER_IS_GNUCC AND (CMAKE_BUILD_TYPE STREQUAL "Coverage"))
include(code_coverage)
setup_target_for_coverage(coverage
"src/atm_drv ${CMAKE_SOURCE_DIR}/tests/suite_DUMMY.xml"
coverage)
list(APPEND LIBS "gcov")
endif()

Expand Down
37 changes: 25 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
[GMTB](http://www.dtcenter.org/GMTB/html/) Common Community Physics Package
(CCPP), including the Interoperable Physics Driver (IPD).

[![Build Status](https://travis-ci.com/NCAR/gmtb-ccpp.svg?branch=master)](https://travis-ci.com/NCAR/gmtb-ccpp)
| Branch | Linux/MacOS Build | Coverage |
|--- |--- |--- |
| Master | [![Build Status](https://travis-ci.org/NCAR/gmtb-ccpp.svg?branch=master)](https://travis-ci.org/NCAR/gmtb-ccpp) | [![Coverage Status](https://codecov.io/github/NCAR/gmtb-ccpp/coverage.svg?branch=master)](https://codecov.io/github/NCAR/gmtb-ccpp) |
| Develop | [![Build Status](https://travis-ci.org/NCAR/gmtb-ccpp.svg?branch=develop)](https://travis-ci.org/NCAR/gmtb-ccpp) | [![Coverage Status](https://codecov.io/github/NCAR/gmtb-ccpp/coverage.svg?branch=develop)](https://codecov.io/github/NCAR/gmtb-ccpp?branch=develop) |


## Notes to Users
This repository contains the Common Community Physics Packages (CCPP) and the driver
Expand Down Expand Up @@ -30,17 +34,26 @@ provided once examples of fully functioning schemes are part of the CCPP.

## Requirements

1. Compilers
1. [GNU Compiler Collection](https://gcc.gnu.org/)
* C
* Fortran: must be 2008 compliant. There are a number of Fortran
2003 pieces, and a single convenience right now with Fortran 2008.
2. Intel 16.0.2 and beyond work OK
3. PGI compilers do not easily support C functions calling Fortran routines.
The PGI compilers attach the Fortran module name as a prefix to the Fortran
symbol. This breaks the method that the CCPP uses to identify which schemes
to call.
2. [Cmake](https://cmake.org)
### Compilers
The CCPP uses both the C and Fortran compilers. Note, the
Fortran compiler must be 2008 compliant. There are a number of Fortran
2003 pieces, and a single convenience right now with Fortran 2008.

1. [GNU Compiler Collection](https://gcc.gnu.org/)
2. [Intel 16.0.2](https://software.intel.com/en-us/intel-compilers) and beyond work.
3. [PGI](http://www.pgroup.com/) compilers do **not** easily support C functions
calling Fortran routines. The PGI compilers attach the Fortran module name as a
prefix to the Fortran symbol. This **breaks** the method that the CCPP uses to
identify which schemes to call.

### [Cmake](https://cmake.org)

The CCPP build system uses cmake.

### [LibXML2](http://xmlsoft.org/)

The suite definition is currently written in XML, LibXML2 is currently used to
parse these files.

## Building
It is recommend to do an out of source build. This is "cmake" terminology
Expand Down
2 changes: 1 addition & 1 deletion cmake/code_coverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ SET(CMAKE_CXX_FLAGS_COVERAGE
"-g -O0 --coverage -fprofile-arcs -ftest-coverage"
CACHE STRING "Flags used by the C++ compiler during coverage builds."
FORCE )
SET(CMAKE_FC_FLAGS_COVERAGE
SET(CMAKE_Fortran_FLAGS_COVERAGE
"-g -O0 --coverage -fprofile-arcs -ftest-coverage"
CACHE STRING "Flags used by the Fortran compiler during coverage builds."
FORCE )
Expand Down
7 changes: 7 additions & 0 deletions src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ add_test(FIELDS test_fields)
# Make sure we can do the cap call
add_test(CHECK test_check ${CMAKE_CURRENT_SOURCE_DIR}/suite_check.xml)

#------------------------------------------------------------------------------
# Coverage tests
if(CMAKE_COMPILER_IS_GNUCC AND (CMAKE_BUILD_TYPE STREQUAL "Coverage"))
setup_target_for_coverage(coverage
"test_check ${CMAKE_CURRENT_SOURCE_DIR}/suite_check.xml"
coverage)
endif()