]> git.ipfire.org Git - thirdparty/collectd.git/blame - .cirrus.yml
.cirrus.yml: Fix reporting of test failure.
[thirdparty/collectd.git] / .cirrus.yml
CommitLineData
de1535fd
MF
1env:
2 LANG: C
526075af 3 CIRRUS_CLONE_DEPTH: 1
de583b20 4 DEFAULT_CONFIG_OPTS: --enable-debug --without-libstatgrab --disable-dependency-tracking
de1535fd
MF
5
6
7###
8# make distcheck and other sanity checks
9#
56c76f21 10release_ready_task:
de1535fd 11 container:
73524c28 12 image: collectd/ci:bookworm_amd64
de1535fd
MF
13 lint_script:
14 - /checks/check-bashisms.sh
15 - /checks/check-pod.sh
16 configure_script:
17 - ./build.sh
18 - ./configure $DEFAULT_CONFIG_OPTS
19 checks_script:
eb022596 20 - make -j$(nproc) -s distcheck DISTCHECK_CONFIGURE_FLAGS="${DEFAULT_CONFIG_OPTS}"
de1535fd
MF
21
22###
56c76f21 23# Default toolchain and build flags used in deb packages, on a range of Debian
de1535fd
MF
24# and Ubuntu releases (+ Debian/unstable)
25# Most should succeed, and PRs shouldn't break them.
26#
27debian_default_toolchain_task:
28 matrix:
1c5d6a5c 29 - container:
73524c28 30 image: collectd/ci:bookworm_amd64
1c5d6a5c
FF
31 allow_failures: false
32 - container:
73524c28 33 image: collectd/ci:mantic_amd64
b5d8ad13 34 allow_failures: false
c6ac03f1
FF
35 - container:
36 image: collectd/ci:sid_amd64 # unstable
37 allow_failures: true
de1535fd 38 skip_notifications: true
c6ac03f1 39 only_if: $CIRRUS_BRANCH == 'main'
de1535fd
MF
40 configure_script:
41 - ./build.sh
42 - gcc --version
43 - >
44 ./configure CC=gcc $DEFAULT_CONFIG_OPTS
45 CFLAGS="$(dpkg-buildflags --get CFLAGS)"
46 CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
47 LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
48 build_script:
eb022596 49 - make -j$(nproc) -sk
de1535fd 50 tests_script:
93ec41f5 51 - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)
de1535fd
MF
52 - /checks/check-built-plugins.sh
53
54###
56c76f21 55# Default toolchain and build flags used in RPM packages, on a range of RedHat
de1535fd
MF
56# and Fedora releases (+ Fedora/rawhide)
57# Most should succeed, and PRs shouldn't break them.
58#
59redhat_default_toolchain_task:
60 matrix:
73524c28
FF
61 - container:
62 image: collectd/ci:el9_x86_64
63 allow_failures: true
de1535fd 64 skip_notifications: true
73524c28
FF
65 - container:
66 image: collectd/ci:fedora39
67 allow_failures: true
de1535fd 68 skip_notifications: true
de1535fd
MF
69 # fedora/rawhide is expected to fail
70 - allow_failures: true
71 skip_notifications: true
c6ac03f1 72 only_if: $CIRRUS_BRANCH == 'main'
de1535fd
MF
73 container:
74 image: collectd/ci:fedora_rawhide_x86_64
75 configure_script:
76 - ./build.sh
77 - gcc --version
78 - ./configure CC=gcc $DEFAULT_CONFIG_OPTS CFLAGS="$(rpm --eval '%optflags')"
79 build_script:
eb022596 80 - make -j$(nproc) -sk
de1535fd 81 tests_script:
93ec41f5 82 - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)
de1535fd
MF
83 - /checks/check-built-plugins.sh
84
85
86###
87# Misc non-standard build environment & options on most recent released debian
88# version.
89# Some are expected to fail, others should always pass
90non_standard_toolchains_task:
91 container:
92 image: collectd/ci:stretch_amd64
93 only_if: $CIRRUS_PR == ''
94
95 matrix:
96
97 # build using clang with default build flags, should always pass
98 - env:
99 LABEL: clang
100 allow_failures: true # TODO: fix this platform
101 skip_notifications: true
102 configure_script:
103 - ./build.sh
104 - clang --version
105 - >
9f78b6c2 106 ./configure CC=clang CXX=clang++
de1535fd
MF
107 $DEFAULT_CONFIG_OPTS
108 CFLAGS="$(dpkg-buildflags --get CFLAGS)"
109 CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
110 LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
111 build_script:
eb022596 112 - make -j$(nproc) -sk
de1535fd 113 tests_script:
93ec41f5 114 - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)
de1535fd
MF
115
116 # build against libstatgrab, should always pass
117 - env:
118 LABEL: statgrab
119 allow_failures: false
120 skip_notifications: false
121 configure_script:
122 - ./build.sh
123 - gcc --version
124 - >
125 ./configure --with-libstatgrab --enable-debug
126 CFLAGS="$(dpkg-buildflags --get CFLAGS)"
127 CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
128 LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
129 build_script:
eb022596 130 - make -j$(nproc) -sk
de1535fd
MF
131 tests_script:
132 - >
133 for i in cpu disk interface load memory swap users; do
134 if ! $(ldd ".libs/${i}.so" 2>/dev/null | grep -q 'libstatgrab.so'); then
135 echo "plugin $i NOT linked against libstatgrab"
136 exit 1
137 fi
138 done
139
de1535fd
MF
140 # build using clang with a collection of strict build flags, will most
141 # probably always fail
142 - env:
143 LABEL: clang strict
144 allow_failures: true
145 skip_notifications: true
146 configure_script:
147 - ./build.sh
148 - clang --version
149 - >
9f78b6c2 150 ./configure CC=clang CXX=clang++
de1535fd
MF
151 $DEFAULT_CONFIG_OPTS
152 CFLAGS='-Wall
153 -Wno-error
154 -Wextra
155 -Wformat=2
156 -Wformat-security
157 -Wformat-nonliteral
158 -Wmissing-include-dirs
159 -Wold-style-definition
160 -Wpointer-arith
161 -Winit-self
162 -Wmissing-prototypes
163 -Wimplicit-function-declaration
164 -Wmissing-declarations
165 -Wstrict-prototypes
166 -Wmissing-noreturn
167 -Wshadow
168 -Wendif-labels
169 -Wwrite-strings
170 -Wno-unused-parameter
171 -Wno-missing-field-initializers
172 -Wdate-time
173 -Wnested-externs
174 -Wno-typedef-redefinition
175 -Wno-gnu-variable-sized-type-not-at-end'
176 build_script:
eb022596 177 - make -j$(nproc) -sk
de1535fd 178 tests_script:
93ec41f5 179 - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)
de1535fd
MF
180
181###
182# Build using a range of compilers, available in debian/unstable. NB: might
183# fail because of changes to the distro, not the compiler used.
184#
185bleeding_edge_compilers_task:
186 container:
187 image: collectd/ci:sid_amd64
c6ac03f1 188 only_if: $CIRRUS_BRANCH == 'main'
de1535fd
MF
189 allow_failures: true
190 skip_notifications: true
191 env:
192 matrix:
193 CC: gcc-7
194 CC: gcc-8
195 CC: clang-6.0
196 CC: clang-7
197 CC: clang-8
198 CC: clang-9
199 configure_script:
200 - ./build.sh
201 - $CC --version
202 - >
203 ./configure CC=$CC
204 $DEFAULT_CONFIG_OPTS
205 CFLAGS="$(dpkg-buildflags --get CFLAGS)"
206 CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
207 LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
208 build_script:
eb022596 209 - make -j$(nproc) -sk
de1535fd 210 tests_script:
93ec41f5 211 - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)
6c5db5d3
FF
212
213freebsd_task:
214 freebsd_instance:
215 matrix:
216 - image_family: freebsd-13-2
217 allow_failures: false
218 pkg_install_script:
219 - >
220 pkg install --yes
221 autotools
222 bison
223 flex
224 pkgconf
225 configure_script:
226 - ./build.sh
227 - ./configure --disable-perl
228 build_script:
229 - make -j$(nproc) -sk
230 tests_script:
93ec41f5 231 - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)