peerplays_migrated/.gitlab-ci.yml
obucina f3a0827d5d
[SON-332] Check gitlab building process for dirty build (#327)
* Fix failing son test, fix data types and check condition
* Very clean build on Gitlab
2020-03-30 22:48:39 +02:00

59 lines
1.3 KiB
YAML

include:
- template: Code-Quality.gitlab-ci.yml
stages:
- build
- test
build:
stage: build
script:
- rm -rf .git/modules/* ./docs ./libraries/fc
- git submodule sync
- git submodule update --init --recursive
- rm -rf build
- mkdir build
- cd build
- cmake ..
- make -j$(nproc)
artifacts:
untracked: true
paths:
- build/libraries/
- build/programs/
- build/tests/
tags:
- builder
test:
stage: test
dependencies:
- build
script:
- ./build/tests/betting_test --log_level=message
- ./build/tests/chain_test --log_level=message
- ./build/tests/cli_test --log_level=message
tags:
- builder
code_quality:
stage: test
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
paths: [gl-code-quality-report.json]
expire_in: 1 week
except:
variables:
- $CODE_QUALITY_DISABLED