mirror of
https://gitlab.com/spaceti-app/integrations/common/server-sdk.git
synced 2026-07-12 13:00:40 +02:00
79 lines
1.3 KiB
YAML
79 lines
1.3 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
|
|
dependencies:
|
|
- build
|
|
|
|
# memory leak check for unittest
|
|
valgrind:
|
|
stage: test
|
|
tags:
|
|
- shell
|
|
script:
|
|
- cd build
|
|
- valgrind make check test
|
|
dependencies:
|
|
- build
|
|
|
|
# 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
|