-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
81 lines (74 loc) · 2.37 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
81 lines (74 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
image: registry.collaborating.tuhh.de/es/ce/research/ducode
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "push"
stages:
- build
- test
build_gcc:
stage: build
needs: []
script:
- ln -s /vcpkg ./thirdparty/vcpkg
- mkdir build && cd build
- cmake -DENABLE_COVERAGE=TRUE -DENABLE_SANITIZER_ADDRESS=TRUE -DENABLE_SANITIZER_LEAK=TRUE -DENABLE_SANITIZER_UNDEFINED_BEHAVIOR=TRUE -G Ninja ..
- cmake --build .
tags:
- jarvis
build_clang:
stage: build
needs: []
script:
- ln -s /vcpkg ./thirdparty/vcpkg
- mkdir build && cd build
- CC=clang CXX=clang++ cmake -DENABLE_COVERAGE=TRUE -DENABLE_SANITIZER_ADDRESS=TRUE -DENABLE_SANITIZER_LEAK=TRUE -DENABLE_SANITIZER_UNDEFINED_BEHAVIOR=TRUE -G Ninja ..
- cmake --build .
tags:
- jarvis
format:
stage: test
needs: [build_gcc]
script:
- find src -name *.cc -o -name *.h -o -name *.hpp -o -name *.cpp | xargs -I FILE clang-format -n -Werror FILE
- find tests -name *.cc -o -name *.h -o -name *.hpp -o -name *.cpp | xargs -I FILE clang-format -n -Werror FILE
- find include -name *.cc -o -name *.h -o -name *.hpp -o -name *.cpp | xargs -I FILE clang-format -n -Werror FILE
tags:
- jarvis
lint:
stage: test
needs: [build_gcc]
script:
- ln -s /vcpkg ./thirdparty/vcpkg
- (! grep --include=\*.{cpp,hpp} -rnw . -e "uint")
- mkdir build-clang && cd build-clang
- CC=clang CXX=clang++ cmake -DENABLE_COVERAGE=TRUE -G Ninja ..
- sed -i -e 's/@.*modmap//g' compile_commands.json
- python3 ../scripts/compile_commands.py compile_commands.json
- run-clang-tidy -header-filter=.*
artifacts:
when: always
paths:
- build-clang/compile_commands.json
tags:
- jarvis
test:
stage: test
needs: [build_gcc]
script:
- ln -s /vcpkg ./thirdparty/vcpkg
- mkdir build && cd build
- ctest --output-on-failure -V -D MODEL=Experimental -C Debug -S ../scripts/Dash.ctest
- gcovr -r ${CI_PROJECT_DIR} --exclude [.]*vcpkg[.]* --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml
coverage: /^\s*lines:\s*\d+.\d+\%/
artifacts:
when: always
paths:
- build/Testing
reports:
junit: build/testreport.xml
coverage_report:
coverage_format: cobertura
path: build/coverage.xml
tags:
- jarvis