Skip to content

Commit

Permalink
Merge pull request collectd#4174 from octo/workflows6
Browse files Browse the repository at this point in the history
[collectd 6.0] Fix the build
  • Loading branch information
octo authored Dec 1, 2023
2 parents af7c09e + 056b05c commit 4237e9e
Show file tree
Hide file tree
Showing 15 changed files with 878 additions and 596 deletions.
184 changes: 65 additions & 119 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,23 @@
env:
LANG: C
CIRRUS_CLONE_DEPTH: 1
DEFAULT_CONFIG_OPTS: >-
--disable-aggregation
--disable-amqp
--disable-amqp1
--disable-barometer
--disable-check_uptime
--disable-csv
--disable-curl_xml
--disable-gmond
--disable-grpc
--disable-java
--disable-lua
--disable-match_empty_counter
--disable-match_hashed
--disable-match_regex
--disable-match_timediff
--disable-match_value
--disable-modbus
--disable-mqtt
--disable-network
--disable-openldap
--disable-perl
--disable-postgresql
--disable-python
--disable-redis
--disable-rrdcached
--disable-rrdtool
--disable-snmp
--disable-snmp_agent
--disable-statsd
--disable-target_notification
--disable-target_replace
--disable-target_scale
--disable-target_set
--disable-target_v5upgrade
--disable-threshold
--disable-write_graphite
--disable-write_kafka
--disable-write_mongodb
--disable-write_redis
--disable-write_riemann
--disable-write_sensu
--disable-write_syslog
--disable-write_tsdb
--enable-debug
--disable-dependency-tracking
DEFAULT_CONFIG_OPTS: --enable-debug --without-libstatgrab --disable-dependency-tracking


###
# make distcheck and other sanity checks
#
release_ready_task:
container:
image: collectd/ci:buster_amd64
image: collectd/ci:bookworm_amd64
lint_script:
- /checks/check-bashisms.sh
- /checks/check-pod.sh
configure_script:
- ./build.sh
- ./configure $DEFAULT_CONFIG_OPTS --without-libstatgrab
- ./configure $DEFAULT_CONFIG_OPTS
checks_script:
- make -j2 -s distcheck DISTCHECK_CONFIGURE_FLAGS="${DEFAULT_CONFIG_OPTS} --without-libstatgrab"
- make -j$(nproc) -s distcheck DISTCHECK_CONFIGURE_FLAGS="${DEFAULT_CONFIG_OPTS}"

###
# Default toolchain and build flags used in deb packages, on a range of Debian
Expand All @@ -72,44 +27,29 @@ release_ready_task:
debian_default_toolchain_task:
matrix:
- container:
image: collectd/ci:buster_amd64
image: collectd/ci:bookworm_amd64
allow_failures: false
- container:
image: collectd/ci:stretch_amd64
image: collectd/ci:mantic_amd64
allow_failures: false
- container:
image: collectd/ci:stretch_i386
allow_failures: false
- container:
image: collectd/ci:xenial_amd64
allow_failures: false
- container:
image: collectd/ci:bionic_amd64
allow_failures: false
- container:
image: collectd/ci:focal_amd64
allow_failures: false
# debian/unstable is expected to fail
- allow_failures: true
image: collectd/ci:debian_unstable
allow_failures: true
skip_notifications: true
only_if: $CIRRUS_BRANCH == 'master'
container:
image: collectd/ci:sid_amd64
only_if: $CIRRUS_BRANCH == 'main'
configure_script:
- ./build.sh
- gcc --version
- >
./configure CC=gcc $DEFAULT_CONFIG_OPTS --without-libstatgrab
./configure CC=gcc $DEFAULT_CONFIG_OPTS
CFLAGS="$(dpkg-buildflags --get CFLAGS)"
CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
build_script:
- make -j2 -sk
- make -j$(nproc) -sk
tests_script:
- VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check
#- /checks/check-built-plugins.sh
on_failure:
debug_script: cat test-suite.log || true
- VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)
- /checks/check-built-plugins.sh

###
# Default toolchain and build flags used in RPM packages, on a range of RedHat
Expand All @@ -118,31 +58,26 @@ debian_default_toolchain_task:
#
redhat_default_toolchain_task:
matrix:
- allow_failures: true
skip_notifications: true
container:
image: collectd/ci:el7_x86_64 # TODO: fix this platform
- allow_failures: true
skip_notifications: true
container:
image: collectd/ci:fedora28_x86_64
# fedora/rawhide is expected to fail
- allow_failures: true
skip_notifications: true
only_if: $CIRRUS_BRANCH == 'master'
container:
- container:
image: collectd/ci:el9_x86_64
allow_failures: false
- container:
image: collectd/ci:fedora39
allow_failures: false
- container:
image: collectd/ci:fedora_rawhide_x86_64
allow_failures: true
skip_notifications: true
only_if: $CIRRUS_BRANCH == 'main'
configure_script:
- ./build.sh
- gcc --version
- ./configure CC=gcc $DEFAULT_CONFIG_OPTS --without-libstatgrab CFLAGS="$(rpm --eval '%optflags')"
- ./configure CC=gcc $DEFAULT_CONFIG_OPTS CFLAGS="$(rpm --eval '%optflags')"
build_script:
- make -j2 -sk
- make -j$(nproc) -sk
tests_script:
- VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check
#- /checks/check-built-plugins.sh
on_failure:
debug_script: cat test-suite.log || true
- VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)
- /checks/check-built-plugins.sh


###
Expand All @@ -151,7 +86,7 @@ redhat_default_toolchain_task:
# Some are expected to fail, others should always pass
non_standard_toolchains_task:
container:
image: collectd/ci:stretch_amd64
image: collectd/ci:bookworm_amd64
only_if: $CIRRUS_PR == ''

matrix:
Expand All @@ -166,17 +101,14 @@ non_standard_toolchains_task:
- clang --version
- >
./configure CC=clang CXX=clang++
$DEFAULT_CONFIG_OPTS --without-libstatgrab
$DEFAULT_CONFIG_OPTS
CFLAGS="$(dpkg-buildflags --get CFLAGS)"
CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
build_script:
- make -j2 -sk
- make -j$(nproc) -sk
tests_script:
- VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check
on_failure:
debug_script: cat test-suite.log || true

- VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)

# build against libstatgrab, should always pass
- env:
Expand All @@ -187,12 +119,12 @@ non_standard_toolchains_task:
- ./build.sh
- gcc --version
- >
./configure $DEFAULT_CONFIG_OPTS --with-libstatgrab
./configure --with-libstatgrab --enable-debug
CFLAGS="$(dpkg-buildflags --get CFLAGS)"
CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
build_script:
- make -j2 -sk
- make -j$(nproc) -sk
tests_script:
- >
for i in cpu disk interface load memory swap users; do
Expand All @@ -213,7 +145,7 @@ non_standard_toolchains_task:
- clang --version
- >
./configure CC=clang CXX=clang++
$DEFAULT_CONFIG_OPTS --without-libstatgrab
$DEFAULT_CONFIG_OPTS
CFLAGS='-Wall
-Wno-error
-Wextra
Expand All @@ -239,42 +171,56 @@ non_standard_toolchains_task:
-Wno-typedef-redefinition
-Wno-gnu-variable-sized-type-not-at-end'
build_script:
- make -j2 -sk
- make -j$(nproc) -sk
tests_script:
- VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check
on_failure:
debug_script: cat test-suite.log || true
- VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)

###
# Build using a range of compilers, available in debian/unstable. NB: might
# fail because of changes to the distro, not the compiler used.
#
bleeding_edge_compilers_task:
container:
image: collectd/ci:sid_amd64
only_if: $CIRRUS_BRANCH == 'master'
image: collectd/ci:debian_unstable
only_if: $CIRRUS_BRANCH == 'main'
allow_failures: true
skip_notifications: true
env:
matrix:
CC: gcc-7
CC: gcc-8
CC: clang-6.0
CC: clang-7
CC: clang-8
CC: clang-9
CC: gcc-10
CC: clang
CC: clang-18
CC: clang-17
configure_script:
- ./build.sh
- $CC --version
- >
./configure CC=$CC
$DEFAULT_CONFIG_OPTS --without-libstatgrab
$DEFAULT_CONFIG_OPTS
CFLAGS="$(dpkg-buildflags --get CFLAGS)"
CPPLAGS="$(dpkg-buildflags --get CPPFLAGS)"
LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
build_script:
- make -j2 -sk
- make -j$(nproc) -sk
tests_script:
- VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)

freebsd_task:
freebsd_instance:
matrix:
- image_family: freebsd-13-2
allow_failures: false
pkg_install_script:
- >
pkg install --yes
autotools
bison
flex
pkgconf
configure_script:
- ./build.sh
- ./configure --disable-perl
build_script:
- make -j$(nproc) -sk
tests_script:
- VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check
on_failure:
debug_script: cat test-suite.log || true
- VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j$(nproc) -sk check || (cat ./test-suite.log && false)
Loading

0 comments on commit 4237e9e

Please sign in to comment.