mirror of
https://gitlab.com/spaceti-app/integrations/common/server-sdk.git
synced 2026-07-12 18:10:49 +02:00
91 lines
1.5 KiB
YAML
91 lines
1.5 KiB
YAML
# for
|
|
stages:
|
|
- build
|
|
- test
|
|
|
|
# To clone also submodules
|
|
variables:
|
|
PRO_FILE: ../server-sdk.pro
|
|
SCRIPT_PATH: scripts
|
|
|
|
#cache:
|
|
# paths:
|
|
# - build/
|
|
|
|
##########
|
|
# 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 $PRO_FILE
|
|
- make -j4
|
|
|
|
|
|
##########
|
|
# Test
|
|
##########
|
|
test:
|
|
stage: test
|
|
tags:
|
|
- shell
|
|
script:
|
|
- if [ -d build ]; then rm -rf build; fi
|
|
- mkdir -p build
|
|
- cd build
|
|
- qmake CONFIG+=debug $PRO_FILE
|
|
- make check
|
|
|
|
# memory leak check for unittest
|
|
valgrind:
|
|
stage: test
|
|
tags:
|
|
- shell
|
|
script:
|
|
- if [ -d build ]; then rm -rf build; fi
|
|
- 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:
|
|
- $SCRIPT_PATH/check.sh
|
|
dependencies: []
|
|
|
|
codecoverage:
|
|
stage: test
|
|
tags:
|
|
- shell
|
|
script:
|
|
- $SCRIPT_PATH/codecoverage.sh
|
|
coverage: '/^\s+functions..:\s+(\d+\.\d+%).+$/'
|
|
dependencies: []
|
|
|
|
doc:
|
|
stage: test
|
|
tags:
|
|
- shell
|
|
script:
|
|
- $SCRIPT_PATH/doc.sh clean # 'clean' better clean before generating documentation
|
|
dependencies: []
|