ci build and path updated

This commit is contained in:
scorrea
2020-06-26 11:22:53 +02:00
parent 416b1bbcc7
commit 1751e0c6cd

View File

@@ -25,6 +25,12 @@ build:
- find . -name "*.o" -type f -delete
- rm -rf ${CI_PROJECT_DIR}/coverage
- mkdir -p ${CI_PROJECT_DIR}/coverage
- cd ${CI_PROJECT_DIR}
- export GCOV_PREFIX=$(pwd)
- export GCOV_PREFIX_STRIP=$(pwd | awk -F"/" '{print NF-1}')
- lcov -q -c --initial --rc geninfo_adjust_src_path=$GCOV_PREFIX -d ${CI_PROJECT_DIR} -o ${CI_PROJECT_DIR}/coverage/base.out
cache:
key: build
@@ -34,21 +40,28 @@ build:
artifacts:
paths:
- coverage/
- coverage/base.out
coverage:
stage: Coverage
coverage: '/Total:\|(\d+\.?\d+\%)/'
script:
# delete all empty files since they produce errors
# delete all empty files since they produce errors
- find coverage -size 0 -type f -delete
- ls coverage/ -lah
- lcov `find coverage -type f -exec echo "-a {}" \;` -o coverage/final.out
- lcov --list coverage/final.out
- lcov `find coverage -type f -exec echo "-a {}" \;` -o coverage/final.out
- lcov --remove coverage/final.out '*/systemc*/include/*' '*/gcc*/include/*' '/usr/include/*' '*/third_party/*' -o coverage/final_dramsys.out
- lcov --list coverage/final_dramsys.out
# Create html
- mkdir ${CI_PROJECT_DIR}/html
- genhtml --prefix ${CI_PROJECT_DIR} --ignore-errors source coverage/final_dramsys.out --legend --title "`git log | head | grep commit`" --output-directory=html/
artifacts:
paths:
- coverage/final.out
- coverage/final_drasys.out
-html/
include: