.gitlab-ci.yml 2.99 KB
Newer Older
1 2 3 4
#
# Geary CI config.
#

5
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
6 7

variables:
8 9 10 11 12
  # ImapDB and other tests that touch the disk are super slow on CI
  # runners like gcc150.osuosl.org that use platter drives still.
  # See Infrastructure/Infrastructure#97.
  TEST_ARGS: -t 10

13 14 15 16
  # Locale used for unit tests. See notes in test/test-engine.vala and
  # test/test-client.vala.
  TEST_LOCALE: en_US.UTF-8

17
  # Build
18
  BUILD_DIR: build
19
  CONFIG_CMD: meson --buildtype=debug $BUILD_DIR
Michael Gratton's avatar
Michael Gratton committed
20
  BUILD_CMD: ninja -v -C $BUILD_DIR
21
  TEST_CMD: xvfb-run meson test -v --no-stdsplit -C $BUILD_DIR $TEST_ARGS
Michael Gratton's avatar
Michael Gratton committed
22
  INSTALL_CMD: ninja -v -C $BUILD_DIR install
23 24

  # Fedora packages
25 26
  FEDORA_DEPS:
    meson vala desktop-file-utils enchant2-devel folks-devel gcr-devel
Torben's avatar
Torben committed
27
    glib2-devel gmime30-devel gnome-online-accounts-devel gspell-devel
28
    gsound-devel gtk3-devel iso-codes-devel json-glib-devel itstool
29 30 31
    libappstream-glib-devel libgee-devel libhandy1-devel
    libpeas-devel libsecret-devel libstemmer-devel libunwind-devel
    libxml2-devel libytnef-devel sqlite-devel webkitgtk4-devel
32
  FEDORA_TEST_DEPS: glibc-langpack-en gnutls-utils tar Xvfb xz
33

34
  # Ubuntu packages
35 36
  UBUNTU_DEPS:
    meson build-essential valac desktop-file-utils gettext iso-codes
37
    itstool libappstream-glib-dev libenchant-2-dev libfolks-dev
Torben's avatar
Torben committed
38
    libgcr-3-dev libgee-0.8-dev libglib2.0-dev libgmime-3.0-dev
39
    libgoa-1.0-dev libgspell-1-dev libgsound-dev libgtk-3-dev
40 41
    libhandy-1-dev libjson-glib-dev libmessaging-menu-dev libpeas-dev
    libsecret-1-dev libsqlite3-dev libstemmer-dev libunwind-dev
42
    libwebkit2gtk-4.0-dev libxml2-dev libytnef0-dev
43
  UBUNTU_TEST_DEPS: gnutls-bin librsvg2-common locales xauth xvfb
44

45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
fedora:
  stage: build
  image: fedora:rawhide
  before_script:
    - dnf update -y --nogpgcheck
    - dnf install -y --nogpgcheck $FEDORA_DEPS $FEDORA_TEST_DEPS
  script:
    - $CONFIG_CMD
    - $BUILD_CMD
    - $TEST_CMD
    - $INSTALL_CMD
  artifacts:
    when: 'always'
    paths:
      - '$BUILD_DIR/meson-logs/meson-log.txt'
      - '$BUILD_DIR/meson-logs/testlog.txt'
    expire_in: 2 days
Michael Gratton's avatar
Michael Gratton committed
62 63 64

ubuntu:
  stage: build
65
  image: ubuntu:devel
Michael Gratton's avatar
Michael Gratton committed
66
  before_script:
67
    - ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime
Michael Gratton's avatar
Michael Gratton committed
68
    - apt-get update
69
    - apt-get install -q -y --no-install-recommends $UBUNTU_DEPS $UBUNTU_TEST_DEPS
70
    - locale-gen $TEST_LOCALE
Michael Gratton's avatar
Michael Gratton committed
71 72 73 74 75
  script:
    - $CONFIG_CMD
    - $BUILD_CMD
    - $TEST_CMD
    - $INSTALL_CMD
76 77 78
  artifacts:
    when: 'always'
    paths:
79 80
      - '$BUILD_DIR/meson-logs/meson-log.txt'
      - '$BUILD_DIR/meson-logs/testlog.txt'
81
    expire_in: 2 days
Michael Gratton's avatar
Michael Gratton committed
82

83
flatpak:
84
  image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
85
  variables:
86
    APP_ID: org.gnome.Geary.Devel
87
    FLATPAK_MODULE: geary
88
    MANIFEST_PATH: org.gnome.Geary.yaml
89
    RUNTIME_REPO: 'https://nightly.gnome.org/gnome-nightly.flatpakrepo'
90
    TEST_RUN_ARGS: $TEST_ARGS
91
    BUNDLE: geary-dev.flatpak
92
  extends: .flatpak
93

94
nightly:
95
  extends: '.publish_nightly'
96 97
  dependencies: ['flatpak']
  needs: ['flatpak']