summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 3d4f5338f4c470b7412aacf5daa1cc69486d0a57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
image: fedora:latest

variables:
  DEPS_COMMON: git make python3 python3-six redhat-rpm-config
               python3-pyparsing meson ninja-build gtk-doc glib2-devel
               gettext gettext-devel gcc

  DEPS_FEDORA: zlib-devel openssl-devel intltool gtk3-devel
               gobject-introspection-devel cyrus-sasl-devel
               pulseaudio-libs-devel libjpeg-turbo-devel
               libacl-devel gstreamer1-devel gstreamer1-plugins-base-devel
               polkit-devel vala lz4-devel opus-devel pixman-devel
               libcacard-devel libphodav-devel usbutils
               usbredir-devel libusbx-devel libsoup-devel json-glib-devel
               bzip2

  DEPS_MINGW: mingw64-gcc mingw64-pkg-config mingw64-pixman mingw64-openssl
              mingw64-gtk3 mingw64-json-glib mingw64-opus
              mingw64-gstreamer1-plugins-base mingw64-gstreamer1-plugins-good
              mingw64-usbredir mingw32-usbredir
              wine-core.x86_64 wine-core.i686

  GIT_SUBMODULE_STRATEGY: recursive

fedora:
  artifacts:
    paths:
      - build-*/meson-logs/*.txt
    when: always
    expire_in: 1 week

  before_script:
    - dnf install -y $DEPS_COMMON $DEPS_FEDORA
    - git clone ${CI_REPOSITORY_URL/spice-gtk/spice-protocol}
    - meson --buildtype=release spice-protocol build-spice-protocol --prefix=/usr --werror
    - ninja -C build-spice-protocol install

  script:
    - meson --buildtype=release build-default --werror
    # Meson does not update submodules recursively
    - git submodule update --init --recursive
    # this fix an issue with Meson dist
    - if ! test -r ../spice-common.git; then DIR=`basename "$PWD"`; ln -s "$DIR/.git/modules/spice-common" ../spice-common.git; fi
    - rm -rf meson-dist
    - ninja -C build-default dist
    - ninja -C build-default
    - ninja -C build-default test

    - meson --buildtype=release build-feat-disabled -Dauto_features=disabled --werror
    - ninja -C build-feat-disabled
    - ninja -C build-feat-disabled test

windows:
  artifacts:
    paths:
      - build-win64/meson-logs/*.txt
      - spice-protocol/build-spice-protocol/meson-logs/*.txt
    when: always
    expire_in: 1 week

  before_script:
    - dnf install -y $DEPS_COMMON $DEPS_MINGW
    - git clone ${CI_REPOSITORY_URL/spice-gtk/spice-protocol}
    - mkdir spice-protocol/build-spice-protocol && cd spice-protocol/build-spice-protocol
    - mingw64-meson --buildtype=release --prefix=/usr --werror
    - ninja install

  script:
    - cd $CI_PROJECT_DIR
    - mkdir build-win64 && cd build-win64
    - mingw64-meson --buildtype=release -Dgtk_doc=disabled --werror
    - ninja install
    - (cd tests && DISPLAY= WINEPATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin wine test-coroutine.exe)