-
Notifications
You must be signed in to change notification settings - Fork 16
/
.gitlab-ci.yml
161 lines (141 loc) · 5.13 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# Copyright 2018-2023 David Robillard <[email protected]>
# SPDX-License-Identifier: 0BSD OR ISC
stages: [build, deploy]
variables:
GIT_SUBMODULE_STRATEGY: normal
default:
stage: build
image: lv2plugin/debian-x64
script:
- meson setup build -Dwerror=true
- ninja -C build test
dev:
stage: build
image: lv2plugin/debian-x64
script:
- meson setup build -Db_coverage=true -Dbuildtype=debug -Dc_std=c11 -Ddocs=enabled -Dlint=true -Dprefix=/ -Dwarning_level=3 -Dwerror=true
- ninja -C build test
- ninja -C build coverage-html
- DESTDIR=$(pwd)/build/dest meson install -C build
- meson configure -Dbuildtype=release -Db_coverage=false -Dlint=false build
- ninja -C build test
coverage: '/ *lines\.*: \d+\.\d+.*/'
artifacts:
paths:
- build/doc/man
- build/dest/share/doc
- build/meson-logs/coveragereport
static:
stage: build
image: lv2plugin/debian-x64
script:
- meson setup build -Ddefault_library=static -Ddocs=disabled -Dstatic=true -Dwarning_level=3 -Dwerror=true
- ninja -C build test
sanitize:
stage: build
image: lv2plugin/debian-x64-clang
script:
- meson setup build -Db_lundef=false -Dbuildtype=plain -Dc_std=c11 -Ddocs=disabled -Dlint=true -Dwarning_level=3 -Dwerror=true
- ninja -C build test
variables:
CC: "clang"
CXX: "clang++"
CFLAGS: "-fno-sanitize-recover=all -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=unsigned-integer-overflow -fsanitize=implicit-conversion -fsanitize=local-bounds -fsanitize=nullability"
CXXFLAGS: "-fno-sanitize-recover=all -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=unsigned-integer-overflow -fsanitize=implicit-conversion -fsanitize=local-bounds -fsanitize=nullability"
LDFLAGS: "-fno-sanitize-recover=all -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=unsigned-integer-overflow -fsanitize=implicit-conversion -fsanitize=local-bounds -fsanitize=nullability"
# Linux Distributions
fedora:
stage: build
image: lv2plugin/fedora-big
script:
- meson setup build -Dbuildtype=plain -Dlint=true -Dwarning_level=3 -Dwerror=true
- ninja -C build test
variables:
CFLAGS: -O2 -D_FORTIFY_SOURCE=2
# Linux Platforms
arm32:
stage: build
image: lv2plugin/debian-arm32
script:
- meson setup build --cross-file=/usr/share/meson/cross/arm-linux-gnueabihf.ini -Dbuildtype=debug -Dc_std=c11 -Ddocs=disabled -Dwarning_level=3 -Dwerror=true
- ninja -C build test
- meson configure -Dbuildtype=release build
- ninja -C build test
arm64:
stage: build
image: lv2plugin/debian-arm64
script:
- meson setup build --cross-file=/usr/share/meson/cross/aarch64-linux-gnu.ini -Dbuildtype=debug -Dc_std=c11 -Ddocs=disabled -Dwarning_level=3 -Dwerror=true
- ninja -C build test
- meson configure -Dbuildtype=release build
- ninja -C build test
x32:
stage: build
image: lv2plugin/debian-x32
script:
- meson setup build --cross-file=/usr/share/meson/cross/i686-linux-gnu.ini -Dbuildtype=debug -Ddocs=disabled -Dwarning_level=3 -Dwerror=true
- ninja -C build test
- meson configure -Dbuildtype=release build
- ninja -C build test
mingw32:
stage: build
image: lv2plugin/debian-mingw32
script:
- meson setup build --cross-file=/usr/share/meson/cross/i686-w64-mingw32.ini -Dbuildtype=debug -Dc_std=c11 -Ddocs=disabled -Dwarning_level=3 -Dwerror=true
- ninja -C build test
- meson configure -Dbuildtype=release build
- ninja -C build test
variables:
WINEPATH: "Z:\\usr\\lib\\gcc\\i686-w64-mingw32\\10-win32"
mingw64:
stage: build
image: lv2plugin/debian-mingw64
script:
- meson setup build --cross-file=/usr/share/meson/cross/x86_64-w64-mingw32.ini -Dbuildtype=debug -Dc_std=c11 -Ddocs=disabled -Dwarning_level=3 -Dwerror=true
- ninja -C build test
- meson configure -Dbuildtype=release build
- ninja -C build test
variables:
WINEPATH: "Z:\\usr\\lib\\gcc\\x86_64-w64-mingw32\\8.3-win32"
# Non-Linux/Docker rows (not hosted)
freebsd:
stage: build
tags: [freebsd,meson]
script:
- meson setup build -Dbuildtype=debug -Dwarning_level=everything -Dwerror=true
- ninja -C build test
- meson configure -Dbuildtype=release build
- ninja -C build test
mac:
stage: build
tags: [macos]
script:
- meson setup build -Dbuildtype=debug -Dc_std=c11 -Ddocs=disabled -Dwarning_level=everything -Dwerror=true
- ninja -C build test
- meson configure -Dbuildtype=release build
- ninja -C build test
win:
stage: build
tags: [windows,meson]
script:
- meson setup build -Dbuildtype=debug -Ddocs=disabled -Dwarning_level=everything -Dwerror=true
- ninja -C build test
- meson configure -Dbuildtype=release build
- ninja -C build test
# Documentation
pages:
stage: deploy
script:
- mkdir public
- mkdir public/doc
- mv build/meson-logs/coveragereport/ public/coverage
- mv build/dest/share/doc/serd-0/html/ public/doc/html/
- mv build/dest/share/doc/serd-0/singlehtml/ public/doc/singlehtml/
- mv build/doc/man/ public/man/
needs:
- dev
artifacts:
paths:
- public
only:
- main