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
###
#
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
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
#
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
###
# 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:
- 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:
- ./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
- clang --version
- >
./configure CC=clang CXX=clang++
- $DEFAULT_CONFIG_OPTS --without-libstatgrab
+ $DEFAULT_CONFIG_OPTS
CFLAGS='-Wall
-Wno-error
-Wextra
-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
#
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)
build:
runs-on: ubuntu-latest
container: collectd/ci:${{ matrix.container_tag }}
- continue-on-error: ${{ matrix.allow_failures }}
+ continue-on-error: false
strategy:
fail-fast: false
matrix:
- # for tasks that are optional, use the continue-on-error option, to prevent a workflow from failing when the task fails
- allow_failures: [ false ]
container_tag:
# debian family
+ - bookworm_amd64
- bullseye_amd64
- buster_amd64
- - stretch_amd64
- - stretch_i386
# Ubuntu
- - xenial_amd64
- - bionic_amd64
+ - mantic_amd64
+ - jammy_amd64
- focal_amd64
+ - bionic_amd64
# RedHat family
- el9_x86_64
- - el8_x86_64
- - el7_x86_64
- - fedora36_x86_64
- - fedora35_x86_64
- - fedora34_x86_64
- config_flags: ['']
-
+ - fedora39
+ - fedora38_x86_64
+ configure_flags: ['']
+ include:
+ - container_tag: bookworm_amd64
+ configure_flags: '--enable-debug'
+ - container_tag: bookworm_amd64
+ # By default clang emits DWARF v5, which Valgrind cannot read yet.
+ # https://github.com/llvm/llvm-project/issues/56550
+ configure_flags: 'CC=clang CXX=clang++ CFLAGS=-gdwarf-4'
env:
- MAKEFLAGS: "-j2 -sk"
- CONFIGURE_FLAGS: >-
- ${{ matrix.config_flags }}
- --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
-
+ CONFIGURE_FLAGS: ${{ matrix.configure_flags }}
# this env var picked up by valgrind during make check phase
VALGRIND_OPTS: "--errors-for-leak-kinds=definite"
steps:
./build.sh
- name: Run configure script
run: ./configure $CONFIGURE_FLAGS
+ - name: Upload config.log
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ matrix.container_tag }}
+ path: config.log
- name: Build collectd
- run: make $MAKEFLAGS
+ run: make -j$(nproc) -sk
- name: Run make check
- run: make $MAKEFLAGS check
- - name: Dump test logs
- run: |
- cat ./test-suite.log || true
- - name: Install bzip2
- run: |
- yum install -y bzip2 || apt install -y bzip2
- - name: Run make distcheck
run: |
- make $MAKEFLAG distcheck DISTCHECK_CONFIGURE_FLAGS="--disable-dependency-tracking --enable-debug $CONFIGURE_FLAGS"
+ set +e
+ make $MAKEFLAGS check
+ echo "$?" >make-check.status
+ continue-on-error: true
+ - name: Upload log files
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ matrix.container_tag }}
+ path: "*.log"
+ - name: Report check status
+ run: exit $(< make-check.status)
experimental:
runs-on: ubuntu-20.04
matrix:
# for tasks that are optional, use the continue-on-error option, to prevent a workflow from failing when the task fails
container_tag:
- - sid_amd64
+ - debian_unstable
- fedora_rawhide_x86_64
# Add additional per-distro vars here.
include:
- - container_tag: sid_amd64
- config_flags: "--disable-dpdkstat --disable-dpdkevents --disable-virt"
+ - container_tag: debian_unstable
+ configure_flags: "--disable-dpdkstat --disable-dpdkevents --disable-virt"
- container_tag: fedora_rawhide_x86_64
cflags: "-fPIE -Wno-deprecated-declarations"
cppflags: "-fPIE -Wno-deprecated-declarations"
- config_flags: "--disable-dpdkstat --disable-dpdkevents --disable-virt --disable-xmms"
+ configure_flags: "--disable-dpdkstat --disable-dpdkevents --disable-virt --disable-xmms"
env:
- MAKEFLAGS: "-j2 -sk"
CFLAGS: ${{ matrix.cflags }}
CPPFLAGS: ${{ matrix.cppflags }}
+ CONFIGURE_FLAGS: ${{ matrix.configure_flags }}
VALGRIND_OPTS: "--errors-for-leak-kinds=definite"
- CONFIGURE_FLAGS: >-
- ${{ matrix.config_flags }}
- --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
-
steps:
- uses: actions/checkout@v2
- run: type pkg-config
./build.sh
- name: Run configure script
run: ./configure $CONFIGURE_FLAGS
+ - name: Upload config.log
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ matrix.container_tag }}
+ path: config.log
- name: Build collectd
- run: make $MAKEFLAGS
+ run: make -j$(nproc) -sk
- name: Run make check
- # Make check is failing on a few newer distros, temporarily mark it as optional until that is resolved
- continue-on-error: true
- run: make $MAKEFLAGS check
- - name: Dump test logs
- run: |
- cat ./test-suite.log || true
- - name: Install bzip2
run: |
- yum install -y bzip2 || apt install -y bzip2
- - name: Run make distcheck
- run: |
- make $MAKEFLAGS distcheck DISTCHECK_CONFIGURE_FLAGS="--disable-dependency-tracking --enable-debug $CONFIGURE_FLAGS"
-
+ set +e
+ make $MAKEFLAGS check
+ echo "$?" >make-check.status
+ continue-on-error: true
+ - name: Upload log files
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ matrix.container_tag }}
+ path: "*.log"
+ - name: Report check status
+ run: exit $(< make-check.status)