Cirrus CI: remove Fedora 26
[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:fedora28_x86_64
83     # fedora/rawhide is expected to fail
84     - allow_failures: true
85       skip_notifications: true
86       only_if: $CIRRUS_BRANCH == 'master'
87       container:
88         image: collectd/ci:fedora_rawhide_x86_64
89   configure_script:
90     - ./build.sh
91     - gcc --version
92     - ./configure CC=gcc $DEFAULT_CONFIG_OPTS CFLAGS="$(rpm --eval '%optflags')"
93   build_script:
94     - make -j2 -sk
95   tests_script:
96     - make -j2 -sk check
97     - /checks/check-built-plugins.sh
98
99
100 ###
101 # Misc non-standard build environment & options on most recent released debian
102 # version.
103 # Some are expected to fail, others should always pass
104 non_standard_toolchains_task:
105   container:
106     image: collectd/ci:stretch_amd64
107   only_if: $CIRRUS_PR == ''
108
109   matrix:
110
111     # build using clang with default build flags, should always pass
112     - env:
113         LABEL: clang
114       allow_failures: true # TODO: fix this platform
115       skip_notifications: true
116       configure_script:
117         - ./build.sh
118         - clang --version
119         - >
120           ./configure CC=clang
121           $DEFAULT_CONFIG_OPTS
122           CFLAGS="$(dpkg-buildflags --get CFLAGS)"
123           CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
124           LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
125       build_script:
126         - make -j2 -sk
127       tests_script:
128         - make -j2 -sk check
129
130     # build against libstatgrab, should always pass
131     - env:
132         LABEL: statgrab
133       allow_failures: false
134       skip_notifications: false
135       configure_script:
136         - ./build.sh
137         - gcc --version
138         - >
139           ./configure --with-libstatgrab --enable-debug
140           CFLAGS="$(dpkg-buildflags --get CFLAGS)"
141           CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
142           LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
143       build_script:
144         - make -j2 -sk
145       tests_script:
146         - >
147           for i in cpu disk interface load memory swap users; do
148             if ! $(ldd ".libs/${i}.so" 2>/dev/null | grep -q 'libstatgrab.so'); then
149               echo "plugin $i NOT linked against libstatgrab"
150               exit 1
151             fi
152           done
153
154     # build against musl-libc using gcc wrapper, expected to fail
155     - env:
156         LABEL: musl libc
157       allow_failures: true
158       skip_notifications: true
159       configure_script:
160         - ./build.sh
161         - musl-gcc --version
162         - >
163           ./configure CC=musl-gcc
164           $DEFAULT_CONFIG_OPTS
165           CFLAGS="$(dpkg-buildflags --get CFLAGS)"
166           CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
167           LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
168       build_script:
169         - make -j2 -sk
170       tests_script:
171         - make -j2 -sk check
172
173     # build using clang with a collection of strict build flags, will most
174     # probably always fail
175     - env:
176         LABEL: clang strict
177       allow_failures: true
178       skip_notifications: true
179       configure_script:
180         - ./build.sh
181         - clang --version
182         - >
183           ./configure CC=clang
184           $DEFAULT_CONFIG_OPTS
185           CFLAGS='-Wall
186           -Wno-error
187           -Wextra
188           -Wformat=2
189           -Wformat-security
190           -Wformat-nonliteral
191           -Wmissing-include-dirs
192           -Wold-style-definition
193           -Wpointer-arith
194           -Winit-self
195           -Wmissing-prototypes
196           -Wimplicit-function-declaration
197           -Wmissing-declarations
198           -Wstrict-prototypes
199           -Wmissing-noreturn
200           -Wshadow
201           -Wendif-labels
202           -Wwrite-strings
203           -Wno-unused-parameter
204           -Wno-missing-field-initializers
205           -Wdate-time
206           -Wnested-externs
207           -Wno-typedef-redefinition
208           -Wno-gnu-variable-sized-type-not-at-end'
209       build_script:
210         - make -j2 -sk
211       tests_script:
212         - make -j2 -sk check
213
214 ###
215 # Build using a range of compilers, available in debian/unstable. NB: might
216 # fail because of changes to the distro, not the compiler used.
217 #
218 bleeding_edge_compilers_task:
219   container:
220     image: collectd/ci:sid_amd64
221   only_if: $CIRRUS_BRANCH == 'master'
222   allow_failures: true
223   skip_notifications: true
224   env:
225     matrix:
226       CC: gcc-7
227       CC: gcc-8
228       CC: clang-6.0
229       CC: clang-7
230       CC: clang-8
231       CC: clang-9
232   configure_script:
233     - ./build.sh
234     - $CC --version
235     - >
236       ./configure CC=$CC
237       $DEFAULT_CONFIG_OPTS
238       CFLAGS="$(dpkg-buildflags --get CFLAGS)"
239       CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
240       LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
241   build_script:
242     - make -j2 -sk
243   tests_script:
244     - make -j2 -sk check