Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F140022
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 51a1a09..b6cac3e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,83 +1,100 @@
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: gcr.io/kaniko-project/executor:debug
+ name: reg.lily.kazv.moe/kazv/libkazv-deps/deps:servant
entrypoint: [""]
script: |
- mkdir -p /kaniko/.docker
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile.cov --build-arg JOBS=1 --no-push
+ 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/.*'
+ coverage: /^\s*lines:\s*\d+.\d+\%/
+ artifacts:
+ name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
+ expire_in: 2 days
+ 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
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 10:21 AM (2 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
55101
Default Alt Text
(3 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment