-
Dimitrios Stoupis authored
- Improved the overall look of the page - Coverage generation using lcov and gcov - Using less gitlab server page by removing interjob artifact generation
Dimitrios Stoupis authored- Improved the overall look of the page - Coverage generation using lcov and gcov - Using less gitlab server page by removing interjob artifact generation
.gitlab-ci.yml 3.18 KiB
image: lycantropos/cmake
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Global caching directive for pip
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- .cache/pip
stages:
- build
- test
- deploy
before_script:
- apt-get update -qq && apt-get -qq -y install python3-pip && python3 -m pip install --upgrade pip
- python3 -V
- python3 -m pip --version
- g++ --version
- cat /etc/*-release
- python3 -m pip install gcovr
build:
stage: build
variables:
GIT_SUBMODULE_STRATEGY: normal
GCC_COLORS: "error=31;1:warning=35;1:note=36;1:range1=32:range2=34:locus=39;1:quote=39;1:fixit-insert=32:fixit-delete=31:diff-filename=39;1:diff-hunk=32:diff-delete=31:diff-insert=32:type-diff=32;1"
CLICOLOR_FORCE: 1 # Necessary for cmake to output colours
script:
- cmake . -DCMAKE_CXX_FLAGS="-Werror -fdiagnostics-color=always"
- make -j4
- make clean
- cmake . -DCMAKE_CXX_FLAGS="-Wall -Wextra -fdiagnostics-color=always" # Build again, but with more warnings
- make -j4
tests:
stage: test
coverage: '/^TOTAL.*\s+(\d+\%)$/'
variables:
GIT_SUBMODULE_STRATEGY: normal
script:
- cmake .
- make tests -j4
- ./tests --use-colour yes # Run the tests
after_script:
- ./tests -r junit -o junit.xml
artifacts:
expire_in: 1 week
reports:
junit: junit.xml
cppcheck:
stage: build
before_script:
- echo deb http://deb.debian.org/debian testing main > /etc/apt/sources.list
- apt-get update -qq && apt-get -t testing install -y cppcheck
- cppcheck --version
script:
- ci/cppcheck.sh
cppcheck-misra:
stage: build
before_script:
# install cppcheck from the testing repos in order to get the latest version
- echo deb http://deb.debian.org/debian testing main > /etc/apt/sources.list
- apt-get update -qq && apt-get -t testing install -y cppcheck && apt-get -t testing install -y python3
- cppcheck --version
script: