summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: 4c454e20cc3f1bef14904c92561b32058a7e21dc (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Test whether building gnome-system-monitor works on fedora and ubuntu.
# Tests against the latest libtop master version.

stages:
  - build

variables:
  FEDORA_LIBGTOP_DEPENDENCIES: # packages required to build libgtop on fedora.
    gettext-devel
    gobject-introspection-devel
    gtk-doc
    texinfo-tex
  FEDORA_DEPENDENCIES: # packages required to build the system monitor on fedora.
    appstream
    gcc-c++
    git
    glibmm24-devel
    gtkmm30-devel
    itstool
    libhandy1-devel
    librsvg2-devel
    libxml2-devel
    meson
  UBUNTU_LIBGTOP_DEPENDENCIES: # packages required to build libgtop on ubuntu.
    automake
    autopoint
    gettext
    gtk-doc-tools
    libgirepository1.0-dev
    libtool
    make
    texinfo
    texlive
  UBUNTU_LIBHANDY_DEPENDENCIES: # packages required to build libhandy on ubuntu.
    libgladeui-2-13
    valac
  UBUNTU_DEPENDENCIES: # packages required to build the system monitor on ubuntu.
    appstream-util
    git
    itstool
    libglibmm-2.4-dev
    libgtkmm-3.0-dev
    librsvg2-dev
    libsystemd-dev
    libxml2-dev
    meson

build-fedora:
  image: fedora:latest
  stage: build
  except:
    - tags
  before_script:
    - dnf update -y --nogpgcheck
    - dnf install -y --nogpgcheck $FEDORA_LIBGTOP_DEPENDENCIES $FEDORA_DEPENDENCIES
  script:
    - git clone https://gitlab.gnome.org/gnome/libgtop.git/ # build and install libgtop
    - cd libgtop
    - mkdir _build
    - cd _build
    - ../autogen.sh --disable-dependency-tracking --prefix=/usr --libdir=/usr/lib64
    - make
    - make install
    - cd ../.. # build and install gnome-system-monitor
    - meson _build -Dsystemd=false
    - ninja -C _build
    - ninja -C _build install

build-ubuntu:
  image: ubuntu:jammy
  stage: build
  except:
    - tags
  before_script:
    - apt-get update
    - DEBIAN_FRONTEND=noninteractive apt-get install -y $UBUNTU_LIBGTOP_DEPENDENCIES $UBUNTU_LIBHANDY_DEPENDENCIES $UBUNTU_DEPENDENCIES
  script:
    - git clone https://gitlab.gnome.org/gnome/libgtop.git/ # build and install libgtop
    - cd libgtop
    - mkdir _build
    - cd _build
    - ../autogen.sh
    - make
    - make install
    - cd ../.. # build and install libhandy because the version in the ubuntu package repository is too outdated.
    - git clone https://gitlab.gnome.org/gnome/libhandy.git/
    - cd libhandy
    - meson _build
    - ninja -C _build
    - ninja -C _build install
    - cd .. # build and install gnome-system-monitor
    - meson _build
    - ninja -C _build
    - ninja -C _build install