Page MenuHomePhorge

No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b6cac3e..f8e6b23 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,100 +1,101 @@
stages:
- lint
- prepare
- build
- doc
lint:
stage: lint
script: |
echo 'Verify that no source file contains tabs'
! egrep -R --exclude-dir=resources $'\t' src
rules: &build-rules
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
when: never
- changes: &src-chg
- Dockerfile
- Dockerfile.cov
- '**/*.cpp'
- '**/*.hpp'
- '**/CMakeLists.txt'
- '**/*.in'
- 'src/tests/resources/**'
'prepare:env':
stage: prepare
script: |
tag="$CI_COMMIT_BRANCH"
tag="$(echo "$tag" | sed -e "s/[^a-zA-Z0-9.]/-/g")"
echo "tag=$tag" >> prepare.env
artifacts:
reports:
dotenv: prepare.env
rules: *build-rules
'build:debug':
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script: |
mkdir -p /kaniko/.docker
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --build-arg JOBS=1 --destination $CI_REGISTRY_IMAGE/libkazv:$tag --destination $CI_REGISTRY_IMAGE/libkazv:$tag-debug
dependencies: &build-deps
- prepare:env
rules: *build-rules
'build:production':
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script: |
mkdir -p /kaniko/.docker
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --build-arg JOBS=1 --build-arg BUILD_TYPE=Release --destination $CI_REGISTRY_IMAGE/libkazv:$tag-prod
dependencies: *build-deps
rules: *build-rules
'build:coverage':
stage: build
image:
name: reg.lily.kazv.moe/kazv/libkazv-deps/deps:servant
entrypoint: [""]
script: |
export BUILD_TYPE=Debug
export JOBS=1
export DEPS_INSTALL_DIR=/opt/libkazv-deps
export LIBKAZV_INSTALL_DIR=/opt/libkazv
mkdir build && cd build && \
export CC=gcc-9 CXX=g++-9 && \
cmake .. -DCMAKE_INSTALL_PREFIX="$LIBKAZV_INSTALL_DIR" -DCMAKE_PREFIX_PATH="$DEPS_INSTALL_DIR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Dlibkazv_BUILD_TESTS=ON \
-Dlibkazv_BUILD_EXAMPLES=ON -Dlibkazv_BUILD_KAZVJOB=ON -Dlibkazv_ENABLE_COVERAGE=ON && \
make -j$JOBS && \
./src/tests/kazvtest && \
- gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml -r ../src --object-directory src -e '.*/api/.*'
+ gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml -r "${CI_PROJECT_DIR}" --object-directory src -e '.*/api/.*'
coverage: /^\s*lines:\s*\d+.\d+\%/
artifacts:
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
- expire_in: 2 days
+ paths:
+ - build/coverage.xml
reports:
coverage_report:
coverage_format: cobertura
path: build/coverage.xml
rules: *build-rules
'doc:build':
stage: doc
image: reg.lily.kazv.moe/kazv/libkazv-deps/deps:servant
script:
- doxygen Doxyfile
artifacts:
paths:
- doc/html/
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
when: never
- changes: *src-chg
- changes:
- '**/*.md'

File Metadata

Mime Type
text/x-diff
Expires
Sun, Jan 19, 9:25 AM (2 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
55061
Default Alt Text
(3 KB)

Event Timeline