-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
80 lines (69 loc) · 2.07 KB
/
.gitlab-ci.yml
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
image: jugit-registry.fz-juelich.de/ibg-1/modsim/hops
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- build
- test
create_badges:
stage: build
script:
- git config --global --add safe.directory '*'
- commits=$(git rev-list --all --count)
- python3 -m anybadge -l commits -v $commits -f commits.svg -c green
artifacts:
paths:
- commits.svg
when: always
expire_in: 12 weeks
build-debug:
stage: build
script:
- mkdir cmake-build-debug
- cd cmake-build-debug
- CXX=clang++ CC=clang cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu -DCMAKE_BUILD_TYPE=Debug -DHOPS_BENCHMARKS=OFF -DHOPS_MPI=ON
- make -j 16
artifacts:
paths:
- cmake-build-debug
expire_in: 2 days
build-release:
stage: build
script:
- mkdir cmake-build-release
- cd cmake-build-release
- CXX=clang++ CC=clang cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu -DCMAKE_BUILD_TYPE=Release -DHOPS_BENCHMARKS=OFF -DHOPS_MPI=ON
- make -j 16
artifacts:
paths:
- cmake-build-release
expire_in: 2 days
test-debug:
stage: test
script:
- cd cmake-build-debug && env CTEST_OUTPUT_ON_FAILURE=1 make test && cd -
artifacts:
when: always
paths:
- cmake-build-debug/tests/reports/*.xml
reports:
junit: cmake-build-debug/tests/reports/*.xml
expire_in: 10 weeks
test-release:
stage: test
script:
- cd cmake-build-release && env CTEST_OUTPUT_ON_FAILURE=1 make test && cd -
artifacts:
when: always
paths:
- cmake-build-release/tests/reports/*.xml
reports:
junit: cmake-build-release/tests/reports/*.xml
expire_in: 10 weeks
code_quality:
stage: test
script:
- cppcheck -icmake-build-release --xml --enable=all --project=cmake-build-release/compile_commands.json --std=c++14 --language=c++ . 2> cppcheck_out.xml
- cppcheck-codequality --input-file=cppcheck_out.xml --output-file=code-quality-report.json
artifacts:
reports:
codequality: code-quality-report.json