-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy path.gitlab-ci.yml
131 lines (124 loc) · 3.8 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Test whether building gnome-system-monitor works on fedora and ubuntu.
# Tests against the latest libtop master version.
stages:
- check
- build
- release
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
catch-devel
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
catch2
git
itstool
libglibmm-2.68-dev
libgtkmm-4.0-dev
libadwaita-1-dev
librsvg2-dev
libsystemd-dev
libxml2-dev
meson
MESON_BUILD_DIR: _build
TARBALL_ARTIFACT_PATH: "${MESON_BUILD_DIR}/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz"
include:
- component: gitlab.gnome.org/GNOME/citemplates/release-service@master
inputs:
job-stage: release
dist-job-name: "build-release-tarball"
tarball-artifact-path: "${TARBALL_ARTIFACT_PATH}"
# 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 "${MESON_BUILD_DIR}"
- cd "${MESON_BUILD_DIR}"
- ../autogen.sh --disable-dependency-tracking --prefix=/usr --libdir=/usr/lib64
- make
- make install
- cd ../.. # build and install gnome-system-monitor
- meson "${MESON_BUILD_DIR}" -Dsystemd=false
- ninja -C "${MESON_BUILD_DIR}"
- ninja -C "${MESON_BUILD_DIR}" 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 "${MESON_BUILD_DIR}"
- cd "${MESON_BUILD_DIR}"
- ../autogen.sh
- make
- make install
- cd ../.. # build and install gnome-system-monitor
- meson "${MESON_BUILD_DIR}"
- ninja -C "${MESON_BUILD_DIR}"
- ninja -C "${MESON_BUILD_DIR}" install
build-release-tarball:
image: fedora:latest
stage: build
before_script:
- dnf update -y --nogpgcheck
- dnf install -y --nogpgcheck $FEDORA_DEPENDENCIES gettext libgtop2-devel systemd-devel
script:
- meson setup "${MESON_BUILD_DIR}"
- meson dist -C "${MESON_BUILD_DIR}" --include-subprojects
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "${TARBALL_ARTIFACT_PATH}"