image: debian:unstable

before_script:
  - apt update -qq
  - apt install -y -qq build-essential autoconf automake pkg-config libtool m4 autoconf-archive gtk-doc-tools libxml2-utils gobject-introspection libgirepository1.0-dev libglib2.0-dev libjson-glib-dev

stages:
  - build

# FIXME: Re-enable valgrind once running the tests under it doesn’t take forever (it causes timeouts).
# Re-add valgrind to apt-install line above
build-distcheck:
  stage: build
  script:
    - mkdir build
    - cd build
    - ../autogen.sh --disable-valgrind
    - make V=1 VERBOSE=1
    - DISTCHECK_CONFIGURE_FLAGS=--disable-valgrind make distcheck V=1 VERBOSE=1

  # The files which are to be made available in GitLab
  artifacts:
    paths:
      - build/*


image: debian:unstable

before_script:
  - apt update -qq
  - apt install -y -qq build-essential meson pkg-config gtk-doc-tools libxml2-utils gobject-introspection libgirepository1.0-dev libglib2.0-dev libjson-glib-dev

stages:
  - build

variables:
  MESON_TEST_TIMEOUT_MULTIPLIER: 2
  G_MESSAGES_DEBUG: all
  MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings"

# FIXME: Re-enable valgrind once running the tests under it doesn’t take forever (it causes timeouts).
# Re-add valgrind to apt-install line above
build-and-test:
  stage: build
  script:
    - meson ${MESON_COMMON_OPTIONS}
            --werror
            -Dinstalled_tests=true
            _build
    - ninja -C _build
    - meson test -C _build --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER}
  artifacts:
    name: "walbottle-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
    when: always
    paths:
      - "_build/config.h"
      - "_build/meson-logs"


Update CI to use Meson build
ci: Update CI to use Meson build

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #13
