stages:
  - build

variables:
  DEBIAN_FRONTEND: noninteractive

cmake-ubuntu:
  image: ubuntu:rolling
  stage: build
  variables:
    BUILD_DIR: cmake-build
  except:
    - tags
  before_script:
    - apt-get update
    - apt-get install -q -y --no-install-recommends
        build-essential
        cmake
        gettext
        gcc
        itstool
        libglib2.0-dev-bin
        libdbus-1-dev
        libgcr-3-dev
        libgmime-3.0-dev
        libgnutls28-dev
        libgtk-3-dev
        libnotify-dev
        libsecret-1-dev
        libgspell-1-dev
  script:
    - mkdir $BUILD_DIR
    - >-
      cmake
      -DENABLE_MANUAL=1
      -DWANT_DBUS=1
      -DWANT_GKR=1
      -DWANT_NOTIFY=1
      -B $BUILD_DIR
    - cmake --build $BUILD_DIR

cmake-ubuntu-bare-bones:
  image: ubuntu:rolling
  stage: build
  variables:
    BUILD_DIR: cmake-build
  except:
    - tags
  before_script:
    - apt-get update
    - apt-get install -q -y --no-install-recommends
        build-essential
        cmake
        gettext
        gcc
        libglib2.0-dev-bin
        libgmime-3.0-dev
        libgtk-3-dev
        libsecret-1-dev
  script:
    - mkdir $BUILD_DIR
    - >-
      cmake
      -D WANT_GNUTLS=off
      -D WANT_GSPELL=off
      -B $BUILD_DIR
    - cmake --build $BUILD_DIR
