forked from nasa/osal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (53 loc) · 1.88 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
os: linux
dist: bionic
language: c
compiler:
- gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake cppcheck lcov
_functional_test: &functional_test
script:
# Check versions
- cppcheck --version
#cppcheck flight software osal/src/bsp, osal/src/os
- cppcheck --force --inline-suppr --std=c99 --language=c --error-exitcode=1
--enable=warning,performance,portability,style --suppress=variableScope
--inconclusive --quiet src/bsp src/os 2>cppcheck_flight_osal.txt
- |
if [[ -s cppcheck_flight_osal.txt ]]; then
echo "You must fix cppcheck errors before submitting a pull request"
echo ""
cat cppcheck_flight_osal.txt
exit -1
fi
# Setup
- mkdir build
- cd build
# Prep and build
- cmake -DENABLE_UNIT_TESTS=true -DOSAL_SYSTEM_BSPTYPE=generic-linux -DOSAL_CONFIG_DEBUG_PERMISSIVE_MODE=TRUE ..
- make
# lcov capture pre-execution
- lcov --rc lcov_branch_coverage=1 --capture --initial --directory ./ --output-file coverage_base.info
# Test
- make test
# lcov post run analysis
- lcov --rc lcov_branch_coverage=1 --capture --directory ./ --output-file coverage_test.info
- lcov --rc lcov_branch_coverage=1 --add-tracefile coverage_base.info --add-tracefile
coverage_test.info --output-file coverage_total.info
- lcov --rc lcov_branch_coverage=1 --remove coverage_total.info '*unit-test-coverage*'
--output-file coverage_filtered.info
- genhtml coverage_filtered.info --output-directory lcov
jobs:
include:
- env: BUILDTYPE=release OSAL_OMIT_DEPRECATED=true
<<: *functional_test
- env: BUILDTYPE=release OSAL_OMIT_DEPRECATED=false
<<: *functional_test
- env: BUILDTYPE=debug OSAL_OMIT_DEPRECATED=true
<<: *functional_test
- env: BUILDTYPE=debug OSAL_OMIT_DEPRECATED=false
<<: *functional_test