Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F140030
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 f8e6b23..81a9c66 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,101 +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="${CI_COMMIT_BRANCH:-$CI_COMMIT_TAG}"
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 "${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}
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
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 10:38 AM (38 m, 20 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
55107
Default Alt Text
(3 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment