-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from DARMA-tasking/devel
Merging old code over to master
- Loading branch information
Showing
114 changed files
with
4,657 additions
and
6,308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
sudo: true | ||
dist: trusty | ||
language: cpp | ||
matrix: | ||
include: | ||
- os: linux | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-5 | ||
env: | ||
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" | ||
- os: linux | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-7 | ||
env: | ||
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && COVERALLS_CMAKE_OPTIONS='-DDARMA_ENABLE_COVERALLS=On | ||
-DDARMA_COVERALLS_UPLOAD=On -DCMAKE_BUILD_TYPE=Debug' && DO_COVERALLS=true" | ||
addons: | ||
apt: | ||
packages: | ||
- lcov | ||
- curl | ||
before_install: | ||
- eval "${MATRIX_EVAL}" | ||
- wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz -O /tmp/gtest.tar.gz | ||
- tar -xvf /tmp/gtest.tar.gz | ||
- export GTEST=$PWD/googletest-release-1.8.0 | ||
install: | ||
- cd $GTEST | ||
- mkdir build | ||
- cd build | ||
- cmake -DCMAKE_INSTALL_PREFIX=$GTEST/install -DCMAKE_CXX_COMPILER=$CXX .. | ||
- make | ||
- make install | ||
script: | ||
- export COVERALLS_SERVICE_NAME=travis-ci | ||
- cd $TRAVIS_BUILD_DIR | ||
- mkdir build | ||
- cd build | ||
- cmake -DDARMA_FE_ENABLE_TESTS=On -DCMAKE_CXX_COMPILER=$CXX -DGTEST_DIR=$GTEST/install | ||
${COVERALLS_CMAKE_OPTIONS} .. | ||
- make VERBOSE=1 | ||
- make VERBOSE=1 test | ||
- if [ $DO_COVERALLS == true ]; then make coveralls; fi | ||
notifications: | ||
slack: | ||
secure: bMpQX03z3t2EKC3E7hi3gOTxE5y6V7Iuc6YKCR19Je8Yq2dWSXmVv0rbOOENs0FT0wnjvm1gbixzbM9sokIPP14SBvufcYm9n+C1nM8XncmDcvzESV7j0C9+C30uNFMRfNwkNx4ua3EgFiZiqeogE21yijRj2RE2i7IVZKbCwQR3d13knTC2hz6M/PTwYGqSmxbptUrQNzrkGIcr/NTCTO5BkuFiSNc1fAghs3kqlExUDhmpKDQPfIzfJz94a/GIBa58pjOvsZoL035IvWBIPa2GLbyeKPpS1hjjXT1bIgeJ3xT6A1+SvQWgr89EFQw/Vz0X7ZjYYX+ZJoLC62QVwCQBQLKYOZp9L/5qh32swDYVGohvJMQTi/1A2bwMkOzgVlU6w7Z7u23vYijY1kT1AG3YBSgQf1igcV6s7kqCokMS5pQR19eyRYV6kIUCR2jL2L5wvlVWFikxdfEHDsEKCw6pNsLDEqtBjgAmcNNkk7k/+8luwms32Irs/hFXugWjCDK36/QcWray6ZgNb3Gx+rZzz9u8Iyp/OYueDSR3eCLNFZe3BkOQvjQfrWXN3zB7LOeBFGPHxykKPnP+8apV/KbTzX/xBZQLOnldjUbyQT7bsuxOXQ5z3xohG0B887o0kig8pLwAFiRmTrVp//CPOuTI8IMt0/if4ncgBlmaDcM= | ||
env: | ||
global: | ||
secure: I1IiJLuGwX8+sswoGVuLXKvCMwKXxWChzrAm20Rd3Bvs4g3LF9y/vEEjxupq4UUd3gpQBOnLs3mdWq/0A7RKgzKifWNxqLkVlCA2RaYsd7N7fAbmhYRo3Mib+FfWLhfMb5YPOxqXBtFiGtec4IaFtHBuAuwlb4iUGUxR598FZtf7gSk2F0RLDngmfSDUcrLnwi+haADpVn66gocFRz+eNBNq5UNlBHJp72gH7xRZOKdXGWfkXPl7mX5TaQMehZZz1NI8gdLxsArMAkUtWE3SdtFCnLCAtT9VM1nAoMLh01csTK4rtz6uc5Q785F8tHuK2c9Tswf/wpSN4i7eMi0RNV6IzTm8v+kndXMNXFdnJJ/UZUkRlm+gTApFJfDgZpxC9VKZzIzggYYDEH+PU4/78YRJWP4ecVmz2yAv9JBL4vdBd/lLa+ZmsTWlEkkmBH/LZIn6orvCTKs4F/rk0hF8xIxD9VW1CgM/mU+TVqt+46Zf/Oo+f+IQ5Q+haHPFWtAThFxEv6PdrTBghLKBdOdqGB3aiwlUH/Qz6Aa8TF+yaOc4QkJrNNvmuTP8cQXFxHFvUOLot5AhLDCTiqI3T3OGxUA0a03RQr2CkNTG3V3TL/YW80IYbjpJQN7r0OPqP5xMn73n3+AjZ7aRk2pVWOFzMgtG/mGaKJtgnRxz0y1P58Y= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Joakim Söderberg | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
Coveralls Generator for CMake | ||
============================= | ||
|
||
This is a set of CMake scripts that are meant to be used to generate | ||
and upload coverage data to http://coveralls.io/. | ||
|
||
This is achieved by specifying which source files that you want to | ||
gather the coverage data for and then running your unit tests, which | ||
then will generate a coveralls compatible JSON file. | ||
|
||
> **Note:** This was designed for use with http://travis-ci.org and has | ||
> not been tested with any other Continous Integration service. | ||
Dependencies | ||
------------ | ||
For these scripts to work, the following dependencies are required: | ||
|
||
* `gcov`- Needed to generate coverage data. | ||
* `gcc` or `clang` - A compiler that supports adding coverage data | ||
that can be read by gcov. | ||
* `curl` - Needed to upload the generated json file to coveralls. | ||
|
||
Example project | ||
--------------- | ||
|
||
Here an example CMake project can be found that shows how these | ||
scripts can be used: | ||
https://github.com/JoakimSoderberg/coveralls-cmake-example | ||
|
||
Usage | ||
----- | ||
|
||
To use the script in your CMake project you need to do three things: | ||
|
||
**1. Include the Coveralls.cmake script in CMakeLists.txt** | ||
|
||
Place the files under your projects CMakeModules directory. | ||
For example `${PROJECT_SOURCE_DIR}/cmake`, and include them. | ||
|
||
```cmake | ||
cmake_minimum_required(VERSION 2.8) | ||
project(myproject) | ||
# Add project cmake modules to path. | ||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake) | ||
# We probably don't want this to run on every build. | ||
option(COVERALLS "Generate coveralls data" OFF) | ||
if (COVERALLS) | ||
include(Coveralls) | ||
endif() | ||
... # Setup the rest of your project | ||
``` | ||
|
||
**2. Add coverage settings to your compile flags** | ||
|
||
Either by using the supplied helper function. | ||
|
||
```cmake | ||
if (COVERALLS) | ||
include(Coveralls) | ||
coveralls_turn_on_coverage() | ||
endif() | ||
``` | ||
|
||
or you can add it yourself: | ||
|
||
```cmake | ||
if (COVERALLS) | ||
include(Coveralls) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") | ||
endif() | ||
``` | ||
|
||
**3. Setup your target** | ||
|
||
Explicitly tell what files that you want to gather the | ||
coverage for (usually this is all your code files). | ||
|
||
```cmake | ||
if (COVERALLS) | ||
set(COVERAGE_SRCS awesome.c code.c files.c) | ||
# Create the coveralls target. | ||
coveralls_setup( | ||
"${COVERAGE_SRCS}" # The source files. | ||
ON # If we should upload. | ||
"${PROJECT_SOURCE_DIR}/CMakeModules/") # (Optional) Alternate project cmake module path. | ||
endif() | ||
``` | ||
|
||
That's it! If you did everything right, you can do: | ||
|
||
> (Note build type must be Debug to get proper coverage data!). | ||
```bash | ||
$ mkdir build && cd build | ||
$ cmake -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug .. | ||
$ make | ||
$ make coveralls | ||
``` | ||
|
||
FAQ | ||
--- | ||
|
||
**Q**: After I've setup everything according to the guide I get this message when running the script on Travis-ci: | ||
|
||
{"message":"Couldn't find a repository matching this job.","error":true} | ||
|
||
What is wrong? | ||
|
||
**A**: Not sure why this happens sometimes. But one thing to try is to try the solution mentioned in this ticket: https://github.com/lemurheavy/coveralls-public/issues/279 | ||
|
||
That is, adding this to your `.travis.yml` before `cmake` is run | ||
|
||
- export COVERALLS_SERVICE_NAME=travis-ci | ||
- export COVERALLS_REPO_TOKEN=abc12345 | ||
|
Oops, something went wrong.