vengi/.gitlab-ci.yml

87 lines
1.6 KiB
YAML
Raw Normal View History

2017-08-30 10:42:36 -07:00
image: registry.gitlab.com/mgerhardy/engine-docker:master
2016-07-12 11:30:03 -07:00
2017-09-22 12:36:32 -07:00
stages:
- build
- test
- analyse
variables:
CCACHE_BASEDIR: ${CI_PROJECT_DIR}
CCACHE_DIR: ${CI_PROJECT_DIR}/ccache
BUILD_DIR: ${CI_PROJECT_DIR}/build
2017-09-22 12:36:32 -07:00
2020-08-02 05:06:07 -07:00
.buildcache: &buildcache
cache:
key: ${CI_JOB_NAME}-cache
paths:
- ccache/
- build/
2017-09-22 12:36:32 -07:00
build-unity:
2020-08-02 05:06:07 -07:00
<<: *buildcache
2017-09-22 12:36:32 -07:00
stage: build
script:
- cmake -H. -B${BUILD_DIR}/default
- make -j 4 all -C ${BUILD_DIR}/default
artifacts:
paths:
- build/compile_commands.json
build-non-unity:
2020-08-02 05:06:07 -07:00
<<: *buildcache
stage: build
script:
- cmake -H. -B${BUILD_DIR}/non-unity -DDISABLE_UNITY=On
- make -j 4 all -C ${BUILD_DIR}/non-unity
2017-09-22 12:36:32 -07:00
artifacts:
paths:
- build/compile_commands.json
2017-09-22 12:36:32 -07:00
2019-08-08 03:05:31 -07:00
.test:
variables:
POSTGRES_DB: enginetest
POSTGRES_USER: engine
POSTGRES_PASSWORD: engine
DB_HOST: postgres
DB_USER: engine
DB_PASSWORD: engine
DB_NAME: enginetest
services:
- postgres:latest
2017-09-22 12:36:32 -07:00
stage: test
dependencies:
- build
script:
- make -j 4 tests-run
2018-10-27 02:17:35 -07:00
artifacts:
reports:
junit: build/*/gtest.xml
2017-09-22 12:36:32 -07:00
.analyse:cppcheck:
2017-09-22 12:36:32 -07:00
stage: analyse
script:
- cppcheck --xml-version=2 -j 4 --enable=all --config-exclude=contrib/libs/ --project=build/compile_commands.json src 2> cppcheck.xml
2017-09-22 12:36:32 -07:00
artifacts:
paths:
- cppcheck.xml
2017-09-22 12:36:32 -07:00
2019-08-08 03:05:31 -07:00
.analyse:valgrind:
2017-09-22 12:36:32 -07:00
stage: analyse
dependencies:
- build
script:
- make -j 4 tests-memcheck
2017-09-22 12:36:32 -07:00
artifacts:
paths:
- build/memcheck*.xml
2016-08-05 11:55:11 -07:00
2019-08-08 03:05:31 -07:00
.pages:
2016-08-05 11:55:11 -07:00
script:
- make doc
- mv build/html/ public/
2016-08-05 11:55:11 -07:00
artifacts:
paths:
- public
only:
2016-09-05 11:48:35 -07:00
- master