.gitlab-ci.yml 2.74 KB
Newer Older
Antenore Gatta's avatar
Antenore Gatta committed
1
---
Antenore Gatta's avatar
Antenore Gatta committed
2
image: ubuntu:18.04
Antenore Gatta's avatar
Antenore Gatta committed
3

Antenore Gatta's avatar
Antenore Gatta committed
4 5
stages:
  - cross_environment
Antenore Gatta's avatar
Antenore Gatta committed
6
  - flatpak_build
Antenore Gatta's avatar
Antenore Gatta committed
7 8

variables:
9
  GIT_SUBMODULE_STRATEGY: recursive
Antenore Gatta's avatar
Antenore Gatta committed
10 11 12 13 14
  BUILD_FOLDER: build
  DEB_PPA: "ppa:remmina-ppa-team/remmina-next"
  FREERDP_DAILY_PPA: "ppa:remmina-ppa-team/freerdp-daily"
  DOCKER_IMAGE: "ubuntu:xenial"
  CMAKE_BUILD_OPTIONS: "-DCMAKE_BUILD_TYPE=Release -DWITH_APPINDICATOR=on"
Antenore Gatta's avatar
Antenore Gatta committed
15
  FLATPAK_ARCH: x86_64
Antenore Gatta's avatar
Antenore Gatta committed
16

17 18 19
before_script:
  - mkdir -p .flatpak-builder/cache

Antenore Gatta's avatar
Antenore Gatta committed
20 21 22 23 24
# TODO: We should create a job for each distro and test the compile correcthly
#       but _only_ if triggered at certain conditions (releases, tag, etc)
#       http://docs.gitlab.com/ee/ci/yaml/README.html#only-and-except-simplified
# This is an example for Ubuntu
ubuntu:devel:
25
  # image: ubuntu:devel
Antenore Gatta's avatar
Antenore Gatta committed
26
  stage: cross_environment
Antenore Gatta's avatar
Antenore Gatta committed
27 28 29
  before_script:
    - apt-get update -qq
    - apt-get install -y -qq software-properties-common
30
                          python3-software-properties
Antenore Gatta's avatar
Antenore Gatta committed
31 32
    - apt-add-repository $FREERDP_DAILY_PPA -y
    - apt-get update -qq
33
    - apt-get install -y -qq build-essential git-core cmake libssl-dev 
Antenore Gatta's avatar
Antenore Gatta committed
34 35 36 37 38 39 40 41
      libx11-dev libxext-dev libxinerama-dev libxcursor-dev libxdamage-dev 
      libxv-dev libxkbfile-dev libasound2-dev libcups2-dev libxml2 libxml2-dev 
      libxrandr-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev 
      libxi-dev libavutil-dev libavcodec-dev libxtst-dev libgtk-3-dev 
      libgcrypt11-dev libssh-dev libpulse-dev libvte-2.91-dev libxkbfile-dev 
      libtelepathy-glib-dev libjpeg-dev libgnutls28-dev libgnome-keyring-dev  
      libavahi-ui-gtk3-dev libvncserver-dev libappindicator3-dev intltool 
      libsecret-1-dev libwebkit2gtk-4.0-dev libsystemd-dev libsoup2.4-dev 
42 43
      libjson-glib-dev libavresample-dev freerdp2-dev libspice-protocol-dev 
      libspice-client-gtk-3.0-dev
44

Antenore Gatta's avatar
Antenore Gatta committed
45 46 47 48
  script:
    - mkdir $BUILD_FOLDER
    - cmake -B$BUILD_FOLDER -H. $CMAKE_BUILD_OPTIONS
    - make VERBOSE=1 -C $BUILD_FOLDER
Antenore Gatta's avatar
Antenore Gatta committed
49
  only:
50
    # - branches
Antenore Gatta's avatar
Antenore Gatta committed
51 52 53
    - tags
    - web
    - schedules
Antenore Gatta's avatar
Antenore Gatta committed
54 55 56 57

flatpak:test:
  # image: fedora:latest
  stage: flatpak_build
58
  variables:
59 60 61
    BUNDLE: "remmina-dev.flatpak"
    FLATPAK_PPA: "ppa:alexlarsson/flatpak"
    FLATHUB_REPO: "https://flathub.org/repo/flathub.flatpakrepo"
Antenore Gatta's avatar
Antenore Gatta committed
62 63 64
  before_script:
    - apt-get update -qq
    - apt-get install -y -qq software-properties-common
65
                          python3-software-properties
Antenore Gatta's avatar
Antenore Gatta committed
66 67
    - add-apt-repository $FLATPAK_PPA -y
    - apt-get update -qq
Antenore Gatta's avatar
Antenore Gatta committed
68
    - apt-get install -y -qq flatpak-builder flatpak build-essential git-core
Antenore Gatta's avatar
Antenore Gatta committed
69
    - flatpak --user remote-add --if-not-exists flathub $FLATHUB_REPO
Antenore Gatta's avatar
Antenore Gatta committed
70
  script:
Antenore Gatta's avatar
Antenore Gatta committed
71
    - /bin/sh -xe ./flatpak/flatpak-build.sh
Antenore Gatta's avatar
Antenore Gatta committed
72 73
  artifacts:
    paths:
74
      - flatpak/${BUNDLE}
75
    expire_in: 30 days
Antenore Gatta's avatar
Antenore Gatta committed
76 77
  cache:
    paths:
78
      - flatpak/.flatpak-builder/cache
Antenore Gatta's avatar
Antenore Gatta committed
79
  only:
80
    # - branches
Antenore Gatta's avatar
Antenore Gatta committed
81 82 83
    - tags
    - web
    - schedules