image: debian:bullseye

before_script:
  - apt-get update -qq
  - apt-get install -qq -y --no-install-recommends
            git gcc make autoconf automake libtool gcovr

unit-tests:
  stage: test
  script:
    - ./autogen && ./configure --enable-sanitize
    - make check

coverage:
  stage: test
  script:
    - ./autogen && ./configure --disable-static
    - make check CFLAGS="--coverage -O0 -ggdb" LDFLAGS="--coverage -O0 -ggdb"
    - gcovr -s -e test/
