-
Notifications
You must be signed in to change notification settings - Fork 31
/
.gitlab-ci.yml
104 lines (99 loc) · 2.86 KB
/
.gitlab-ci.yml
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
95
96
97
98
99
100
101
102
103
104
# Test whether building gnome-system-monitor works on fedora and ubuntu.
# Tests against the latest libtop master version.
stages:
- check
- 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
glibmm2.68-devel
gtkmm4.0-devel
libadwaita-devel
itstool
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_DEPENDENCIES: # packages required to build the system monitor on ubuntu.
appstream-util
git
itstool
libglibmm-2.68-dev
libgtkmm-4.0-dev
libadwaita-1-dev
librsvg2-dev
libsystemd-dev
libxml2-dev
meson
# Based on https://gitlab.gnome.org/GNOME/mutter/-/blob/main/.gitlab-ci.yml
check-code-style:
image: fedora:latest
stage: check
allow_failure: true
before_script:
- dnf install -y python3 git patch uncrustify
script:
- if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]]; then
git remote add target $CI_MERGE_REQUEST_PROJECT_URL.git;
git fetch target $CI_MERGE_REQUEST_TARGET_BRANCH_NAME;
export common_parent_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "target/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME") <(git rev-list --first-parent HEAD) | head -1);
./check-style.py --dry-run --sha $common_parent_sha;
else
echo "Not a merge request";
fi
build-fedora:
image: fedora:rawhide
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:oracular
stage: build
except:
- tags
before_script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y $UBUNTU_LIBGTOP_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 gnome-system-monitor
- meson _build
- ninja -C _build
- ninja -C _build install