Newer
Older
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
- apt-get update -qq && apt-get -qq -y install libstdc++6 python3-pip && python3 -m pip install --upgrade pip
- python3 -V
- python3 -m pip --version
- g++ --version
- cat /etc/*-release
- python3 -m pip install gcovr
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
- 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
coverage: '/^TOTAL.*\s+(\d+\%)$/'
variables:
GIT_SUBMODULE_STRATEGY: normal
- make tests -j4
- ./tests --use-colour yes # Run the tests
- ./tests -r junit -o junit.xml
before_script:
- cppcheck --version
cppcheck-misra:
stage: build
before_script:
- cppcheck --version
script:
- ci/cppcheck-misra.sh
clang-tidy:
stage: build
variables:
GIT_SUBMODULE_STRATEGY: normal
TERM: xterm-color
script:
pages:
stage: deploy
when: always # Deploy always and on build or test failure, generate just the documentation
cache:
key: "$CI_JOB_NAME"
paths:
- public
variables:
GIT_SUBMODULE_STRATEGY: normal
- ./ci/pages_deploy.sh
- echo -e "\e[1;36mPublic directory contents\e[0m" && ls -l public/coverage # Print directory contents for debugging
artifacts:
paths:
- public # Upload the resulting website
only:
- branches # Deploy on all branches