server-sdk/.gitlab-ci.yml
2019-11-08 16:21:53 +01:00

77 lines
1.2 KiB
YAML

# for
stages:
- build
- test
# ########
# Build
##########
build: # name of task
stage: build # in what stage it will run ( 1. build then test etc )
tags: # Tags are used to choose correct gitlab-runner
- shell # spaceti-runner server has running runners and one has tag 'hw'
script: # run in bash
- if [ -d build ];then rm -rf build; fi
- mkdir -p build
- cd build
- qmake ../server-sdk.pro
- make -j4
artifacts:
paths:
- build
# ########
# Test
##########
test:
stage: test
tags:
- shell
script:
- cd build
- make check test
dependencies:
- build
# memory leak check for unittest
valgrind:
stage: test
tags:
- shell
script:
- cd build
- valgrind make check test
# Quality of code
cppcheck:
stage: test
tags:
- shell
#allow_failure: true # Probably needed to allow failure
script:
- scripts/cppcheck.sh
# Common checks ( Line endings )
lineendings:
stage: test
tags:
- shell
script:
- scripts/check.sh
codecoverage:
stage: test
tags:
- shell
script:
- scripts/codecoverage.sh
coverage: '/^\s+functions..:\s+(\d+\.\d+%).+$/'
doc:
stage: test
tags:
- shell
script:
- scripts/doc.sh clean # 'clean' better clean before generating documentation