Skip to content
Snippets Groups Projects
Verified Commit 948c5a8f authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Add gitlab coverage

parent 37091a3f
No related branches found
No related tags found
1 merge request!6Add gitlab coverage
......@@ -23,7 +23,7 @@ stages:
- .ci/synapse/setup-synapse.sh
- .ci/synapse/service/synapse/*
- .ci/synapse/service/postgresql/*
- .gitlab-ci.yml
#- .gitlab-ci.yml
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
......@@ -55,7 +55,7 @@ build synapse arm64:
- apt-get update
- apt-get install -y software-properties-common
- add-apt-repository ppa:ubuntu-toolchain-r/test -y
- apt-get update && apt-get -y install --no-install-recommends ${CXX} ${CC} build-essential ninja-build libssl-dev git ccache curl lcov
- apt-get update && apt-get -y install --no-install-recommends ${CXX} ${CC} build-essential ninja-build libssl-dev git ccache curl lcov gcovr
# need recommended deps for wget
- apt-get -y install wget
- wget https://github.com/Kitware/CMake/releases/download/v3.20.0-rc4/cmake-3.20.0-rc4-linux-${M_ARCH}.sh && sh cmake-3.20.0-rc4-linux-${M_ARCH}.sh --skip-license --prefix=/usr/local
......@@ -79,6 +79,7 @@ build synapse arm64:
-DCOVERAGE=${COVERAGE}
- cmake --build build
- MTXCLIENT_SERVER=synapse GTEST_OUTPUT=xml:junit-output/ make test
after_script:
- mv ../.hunter .hunter
cache:
key: "$CI_JOB_NAME"
......@@ -98,10 +99,20 @@ build linux amd64:
M_ARCH: x86_64
COVERAGE: "ON"
after_script:
- ./.ci/coverage.sh && bash <(curl -s https://codecov.io/bash) -f build/coverage.info || echo "Codecov failed"
- ./.ci/coverage.sh
- (cd build && gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml -e '../tests' -e '../examples' -e '_deps' --root ${CI_PROJECT_DIR})
- bash <(curl -s https://codecov.io/bash) -f build/coverage.info || echo "Codecov failed"
- mv ../.hunter .hunter
needs:
- job: "build synapse amd64"
optional: true
coverage: /^\s*lines:\s*\d+.\d+\%/
artifacts:
reports:
cobertura: build/coverage.xml
paths:
- build/junit-output/*.xml
- build/coverage.xml
build linux arm64:
extends: .build-linux
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment