Skip to content
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
14 changes: 13 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ addons:
- check
- doxygen
- cmake
- lcov
- gradle
- libgmp-dev

Expand Down Expand Up @@ -62,7 +63,18 @@ matrix:
- sudo pip install --upgrade Sphinx
- npm install -g mocha
- npm install
script: make test-c test-haskell test-java test-javascript
script:
- make test-c
- make test-haskell
- make test-java
- make test-javascript
- env:
- TRAVIS_TARGET=codecov
- CMAKEFLAGS="-DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug"
script:
- make test-c
after_success:
bash <(curl -s https://codecov.io/bash) -s c/build || echo "Codecov did not collect coverage reports";

deploy:
provider: releases
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SBP_PATCH_VERSION := $(word 3, $(subst ., , $(SBP_VERSION)))

CHANGELOG_MAX_ISSUES := 100

.PHONY: help test release dist silly all docs pdf html c deps-c gen-c test-c python deps-python gen-python test-python javascript deps-javascript gen-javascript test-javascript java deps-java gen-java test-java haskell deps-haskell gen-haskell test-haskell haskell deps-protobuf gen-protobuf test-protobuf verify-prereq-generator verify-prereq-c verify-prereq-javascript verify-prereq-python verify-prereq-java verify-prereq-haskell verify-prereq-protobuf mapping
.PHONY: help test release dist clean all docs pdf html c deps-c gen-c test-c python deps-python gen-python test-python javascript deps-javascript gen-javascript test-javascript java deps-java gen-java test-java haskell deps-haskell gen-haskell test-haskell haskell deps-protobuf gen-protobuf test-protobuf verify-prereq-generator verify-prereq-c verify-prereq-javascript verify-prereq-python verify-prereq-java verify-prereq-haskell verify-prereq-protobuf mapping

# Functions
define announce-begin
Expand All @@ -43,6 +43,7 @@ help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " help to display this help message"
@echo " all to make SBP clients across all languages"
@echo " clean to remove any output files"
@echo " c to make C headers"
@echo " dist to distribute packages"
@echo " docs to make HTML and pdf documentation"
Expand All @@ -58,6 +59,9 @@ help:
@echo

all: c python pythonNG javascript java docs haskell protobuf
clean:
@echo "Removing the ./c/build directory..."
rm -r $(SWIFTNAV_ROOT)/c/build
docs: verify-prereq-docs pdf html

c: deps-c gen-c test-c
Expand Down Expand Up @@ -212,7 +216,7 @@ test-c:
$(call announce-begin,"Running C tests")
cd $(SWIFTNAV_ROOT)/c; \
mkdir -p build/ && cd build/; \
cmake ../; \
cmake $(CMAKEFLAGS) ../; \
make
$(call announce-end,"Finished running C tests")

Expand Down Expand Up @@ -247,7 +251,7 @@ test-protobuf:

dist-python:
$(call announce-begin,"Deploying Python package")
make -C $(SWIFTNAV_ROOT)/python SBP_VERSION="$(SBP_MAJOR_VERSION).$(SBP_MINOR_VERSION).$(SBP_PATCH_VERSION)" deploy
make -C $(SWIFTNAV_ROOT)/python SBP_VERSION="$(SBP_MAJOR_VERSION).$(SBP_MINOR_VERSION).$(SBP_PATCH_VERSION)" deploy
$(call announce-end,"Finished deploying Python package")

dist-javascript:
Expand Down
2 changes: 2 additions & 0 deletions c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ swift_create_project_options(
HAS_DOCS
TEST_PACKAGES "Check"
)
include(CodeCoverage)
add_code_coverage_all_targets()

##########################################################
# Set some reasonable default compiler flags.
Expand Down
1 change: 1 addition & 0 deletions c/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ set_target_properties(sbp PROPERTIES
POSITION_INDEPENDENT_CODE ON
C_STANDARD 99
C_STANDARD_REQUIRED ON)
target_code_coverage(sbp AUTO ALL)

install(TARGETS sbp
EXPORT sbp-export
Expand Down
1 change: 1 addition & 0 deletions c/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ else()
target_link_libraries(test_libsbp PRIVATE "-L/usr/local/lib")
endif()
endif()
target_code_coverage(test_libsbp AUTO ALL)

add_custom_command(
TARGET test_libsbp POST_BUILD
Expand Down
13 changes: 13 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
coverage:
status:
project:
tests:
target: 30%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥉

paths:
- c/test/
libsbp:
paths:
- c/include/
- c/src/

comment: off