-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
78 lines (73 loc) · 2.22 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
image: debian:12
stages: # List of stages for jobs, and their order of execution
- pre_checks
- compilation
- post_checks
format_checker:
stage: pre_checks
image: debian:12
before_script:
- apt-get update
- apt-get install lsb-release wget software-properties-common gnupg -y
- wget https://apt.llvm.org/llvm.sh
- chmod +x llvm.sh
- ./llvm.sh 17
- rm llvm.sh
script:
- apt-get update
- apt-get install clang-format-17 -y
- find src/ \( -iname *.h -o -iname *.c \) -exec clang-format-17 --Werror -n --verbose {} +
compile_job_gcc:
stage: compilation
allow_failure: false
image: debian:12
needs:
- format_checker
script:
- apt-get update
- apt-get install ninja-build gcc-12 g++-12 cmake python3 python3-pip pkg-config -y
- pip install meson
- export CC=gcc-12
- export CXX=g++-12
- meson setup build
- meson compile -C build
compile_job_clang:
stage: compilation
allow_failure: false
image: debian:12
before_script:
- apt-get update
- apt-get install lsb-release wget software-properties-common gnupg -y
- wget https://apt.llvm.org/llvm.sh
- chmod +x llvm.sh
- ./llvm.sh 17
- rm llvm.sh
needs:
- format_checker
script:
- apt-get update
- apt-get install ninja-build clang-17 cmake python3 python3-pip pkg-config -y
- pip install meson
- export CC=clang-17
- export CXX=clang++-17
- meson setup build
- meson compile -C build
static_checker:
stage: post_checks
image: debian:11
before_script:
- apt-get update
- apt-get install lsb-release wget software-properties-common gnupg -y
- wget https://apt.llvm.org/llvm.sh
- chmod +x llvm.sh
- ./llvm.sh 17
- rm llvm.sh
needs:
- compile_job_gcc
- compile_job_clang
script:
- apt-get update
- apt-get install ninja-build gcc-12 g++-12 cmake clang-tidy-17 python3 python3-pip pkg-config -y
- pip install meson
- meson setup build
- find src/ -iname *.c -exec clang-tidy-17 -p build {} +