summaryrefslogblamecommitdiff
path: root/.gitlab-ci.yml
blob: f2910aa97a441e11b38fd8b7de9a8b6a9fa77eec (plain) (tree)
1
2
3
4
5
6
7
8






               
                                                   



            




             



                                                                                                                             
                                                                                                      




                                 
                              
                          

















                                               
image: ruby:2.5

build:
  stage: build
  script:
  - mkdir build
  - cd build
  - cmake .. -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON
  - make -j4
  artifacts:
    paths:
    - build

test:
  stage: test
  script:
  - cd tests
  - PATH=../build/tools/hscript-validate:$PATH rspec --format RspecJunitFormatter --out rspec-validator.xml spec/validator.rb
  - cd ..
  - lcov --exclude '/usr/include/c++/*' --exclude '3rdparty/*' --capture --directory build --output-file coverage.info
  - genhtml coverage.info --output-directory cov_html
  - printf 'coverage %s\n' $(lcov --summary coverage.info | grep lines | cut -d ' ' -f4) > metrics.txt
  coverage: '/lines.+: \d+.\d+%/'
  artifacts:
    paths:
    - cov_html
    reports:
      junit: tests/rspec-*.xml
      metrics: metrics.txt

pages:
  stage: deploy
  dependencies:
  - test
  script:
  - mkdir public
  - mv cov_html public/coverage
  - cd devel
  - make
  - mv requirements/html ../public/requirements
  - mv script/html ../public/script
  - mv vision/html ../public/vision
  artifacts:
    paths:
    - public
  only:
  - master