colnod-connector/.gitlab-ci.yml
2019-11-08 18:21:59 +01:00

92 lines
1.4 KiB
YAML

# for
stages:
- build
- test
# To clone also submodules
variables:
GIT_SUBMODULE_STRATEGY: recursive
PRO_FILE: ../colnod-connector.pro
SCRIPT_PATH: server-sdk/scripts
cache:
paths:
- build/
###########
# Build
##########
build:
stage: build
tags:
- shell
before_script:
- git submodule sync --recursive
- git submodule update --init --recursive
script:
- ls server-sdk
- mkdir -p build
- cd build
- qmake $PRO_FILE
- make -j4
##########
# Test
##########
test:
stage: test
tags:
- shell
script:
- mkdir -p build
- cd build
- qmake $PRO_FILE
- make check
# memory leak check for unittest
valgrind:
stage: test
tags:
- shell
script:
- mkdir -p build
- cd build
- qmake $PRO_FILE
- valgrind make check
# Quality of code
cppcheck:
stage: test
tags:
- shell
#allow_failure: true # Probably needed to allow failure
script:
- $SCRIPT_PATH/cppcheck.sh
dependencies: []
# Common checks ( Line endings )
lineendings:
stage: test
tags:
- shell
script:
- server-sdk/scripts/check.sh
dependencies: []
codecoverage:
stage: test
tags:
- shell
script:
- server-sdk/scripts/codecoverage.sh
coverage: '/^\s+functions..:\s+(\d+\.\d+%).+$/'
dependencies: []
doc:
stage: test
tags:
- shell
script:
- server-sdk/scripts/doc.sh clean # 'clean' better clean before generating documentation
dependencies: []