1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- variables:
- GIT_SUBMODULE_STRATEGY: recursive
- stages:
- - lint
- - build
- - test
- # encode-check:
- # image: "10.143.254.96:5000/xlf/linter:latest"
- # tags:
- # - docker
- # stage: lint
- # script:
- # - python3 ./.workflow/linter/run-clang-format.py -r -d .
- # allow_failure: true
- # style-check:
- # image: "10.143.254.96:5000/xlf/linter:latest"
- # tags:
- # - docker
- # stage: lint
- # script:
- # - python3 ./.workflow/linter/run-clang-format.py -r . 1>diff.txt
- # artifacts:
- # when: on_failure
- # name: "diff"
- # paths:
- # - diff.txt
- # allow_failure: true
- unit-test:
- stage: test
- image: "10.143.254.96:5000/xlf/fanbuilder"
- tags:
- - docker
- needs: []
- before_script:
- - source ~/.xmake/profile
- script:
- - xmake f -m release
- - xmake -w unittest
- - xmake run unittest --gtest_output="xml:report.xml"
- artifacts:
- when: always
- reports:
- junit: build/linux/x86_64/release/report.xml
- allow_failure: true
- coverage-test:
- stage: test
- image: "10.143.254.96:5000/xlf/fanbuilder"
- tags:
- - docker
- needs: []
- before_script:
- - source ~/.xmake/profile
- script:
- - xmake f -m coverage
- - xmake -w unittest
- - xmake run unittest || echo 0 > /dev/null
- # - lcov -c -d build/.objs/unittest/linux/x86_64/coverage/app/ -b . -o unittest.info
- # - genhtml -o coverage_report unittest.info
- - gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml -f "User project/.*" --root ${CI_PROJECT_DIR}
- - mkdir coverage_result
- - cd coverage_result
- - gcovr -r ${CI_PROJECT_DIR} -f "${CI_PROJECT_DIR}/User project/.*" --html --html-details -o index.html
- coverage: /^\s*lines:\s*\d+.\d+\%/
- artifacts:
- name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}
- reports:
- coverage_report:
- coverage_format: cobertura
- path: coverage.xml
- paths:
- - coverage_result/*
|