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