Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.08 KiB
Newer Older
  • Learn to ignore specific revisions
  • kongr45gpen's avatar
    kongr45gpen committed
    image: rikorose/gcc-cmake
    
    
    kongr45gpen's avatar
    kongr45gpen committed
    stages:
      - build
      - test
    
    
    kongr45gpen's avatar
    kongr45gpen committed
    before_script:
      - g++ --version
    
    build:
    
    kongr45gpen's avatar
    kongr45gpen committed
      stage: build
    
    kongr45gpen's avatar
    kongr45gpen committed
      script:
        - cmake . -DCMAKE_CXX_FLAGS="-Werror"
        - make -j4
        - make clean
        - cmake . -DCMAKE_CXX_FLAGS="-Wall -Wextra" # Build again, but with more warnings
        - make -j4
    
    
    kongr45gpen's avatar
    kongr45gpen committed
    tests:
      stage: test
    
      variables:
        GIT_SUBMODULE_STRATEGY: normal
    
    kongr45gpen's avatar
    kongr45gpen committed
      script:
        - cmake .
    
        - make tests -j4
        - ./tests --use-colour yes
    
    kongr45gpen's avatar
    kongr45gpen committed
      after_script:
    
        - ./tests -r junit -o junit.xml
    
    kongr45gpen's avatar
    kongr45gpen committed
      artifacts:
        reports:
          junit: junit.xml
    
    kongr45gpen's avatar
    kongr45gpen committed
    
    
    kongr45gpen's avatar
    kongr45gpen committed
    cppcheck:
    
    kongr45gpen's avatar
    kongr45gpen committed
      stage: build
    
      before_script:
        - apt-get update -qq && apt-get install -y -qq cppcheck
        - cppcheck --version
    
    kongr45gpen's avatar
    kongr45gpen committed
      script:
    
    kongr45gpen's avatar
    kongr45gpen committed
        - bash -x ci/cppcheck.sh
    
    kongr45gpen's avatar
    kongr45gpen committed
      stage: build
    
      before_script:
        - apt-get update -qq && apt-get install -y -qq vera++
        - vera++ --version
        - cp ci/vera.profile /usr/lib/vera++/profiles/custom
    
    kongr45gpen's avatar
    kongr45gpen committed
      script:
    
    kongr45gpen's avatar
    kongr45gpen committed
        - bash -x ci/vera.sh
    
    kongr45gpen's avatar
    kongr45gpen committed
    
    clang-tidy:
    
    kongr45gpen's avatar
    kongr45gpen committed
      stage: build
    
      before_script:
        - apt-get update -qq && apt-get install -y -qq clang-tidy-4.0
        - clang-tidy-4.0 --version
    
    kongr45gpen's avatar
    kongr45gpen committed
      script:
    
    kongr45gpen's avatar
    kongr45gpen committed
        - bash -x ci/clang-tidy.sh