-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy path.gitlab-ci.yml
153 lines (142 loc) · 5.38 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# 2025-01-15: ubuntu:latest = 24.04, ubuntu:rolling = 24.10, ubuntu:devel = 25.04
# See https://hub.docker.com/_/ubuntu
image: ubuntu:rolling
include:
- component: "gitlab.gnome.org/GNOME/citemplates/release-service@master"
inputs:
job-stage: "release"
dist-job-name: "build_release_tarball"
tarball-artifact-path: "_build/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz"
stages:
- build
- deploy
- release
variables:
MESON_GCC_DEPS: g++
gettext
git
yelp-tools
gtk-doc-tools
python3-pygments
python3-setuptools
libglib2.0-dev
libcairo2-dev
libpango1.0-dev
libgtk-4-dev
mm-common
libsigc++-3.0-dev
libglibmm-2.68-dev
libcairomm-1.16-dev
libpangomm-2.48-dev
libxml-libxml-perl
meson
ninja-build
glib-networking
# If libgtk-4-dev is too old, gtk4 is built as a subproject of gtkmm-4.0.
GTK4_BUILD_DEPS: libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
libgstreamer-plugins-good1.0-dev
libgstreamer-plugins-bad1.0-dev
libgudev-1.0-dev
libsass-dev
libxml2-dev
glslc
GTK4_MESON_OPTIONS: -Dgtk4:build-demos=false
-Dgtk4:build-testsuite=false
-Dgtk4:build-examples=false
-Dgtk4:build-tests=false
GIO_EXTRA_MODULES: "/usr/lib/x86_64-linux-gnu/gio/modules"
GIT_SUBMODULE_STRATEGY: normal
.build_default:
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt update && apt -y upgrade && apt -y install $DEPENDENCIES
release_gcc_build:
extends: .build_default
stage: build
variables:
DEPENDENCIES: $MESON_GCC_DEPS $GTK4_BUILD_DEPS
script:
- mkdir _build && cd _build
# -Ddebug=false + -Doptimization=3 correspond to -Dbuildtype=release
# Don't use warning_level and werror. They are applied also to subprojects.
# meson setup --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=fatal -Dwarning_level=3 -Dwerror=true
# Don't use warnings=fatal. Accept that functions can be deprecated in gtk but not in gtkmm.
# meson setup --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=fatal
- meson setup --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=max $GTK4_MESON_OPTIONS
- meson compile
# Some tests fail with
# Unable to init Broadway server: Could not connect: No such file or directory
# Gtk-WARNING **: 14:38:45.180: cannot open display:
# Skip tests. Most test cases are not executed anyway, only built by 'meson compile'.
# - meson test
- meson install --quiet
artifacts:
when: always
paths:
- _build/docs/reference
- _build/meson-logs/testlog.txt
- _build/meson-logs/meson-log.txt
release_clang_build:
extends: .build_default
stage: build
variables:
DEPENDENCIES: $MESON_GCC_DEPS $GTK4_BUILD_DEPS clang
script:
- mkdir _build && cd _build
# -Ddebug=false + -Doptimization=3 correspond to -Dbuildtype=release
# Don't use warning_level and werror. They are applied also to subprojects.
# CC=clang CXX=clang++ meson setup --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=fatal -Dwarning_level=3 -Dwerror=true
# Don't use warnings=fatal. Accept that functions can be deprecated in gtk but not in gtkmm.
# CC=clang CXX=clang++ meson setup --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=fatal
- CC=clang CXX=clang++ meson setup --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=max $GTK4_MESON_OPTIONS
- meson compile
# See comment in the release_gcc_build job.
# - meson test
- meson install --quiet
allow_failure: true
artifacts:
when: on_failure
paths:
- _build/meson-logs/testlog.txt
- _build/meson-logs/meson-log.txt
expire_in: 1 week
# Publish reference documentation at gnome.pages.gitlab.gnome.org/gtkmm
pages:
stage: deploy
needs: [release_gcc_build]
script:
- mkdir public
- mv _build/docs/reference/html/* public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
build_release_tarball:
extends: .build_default
stage: build
needs: []
rules:
- if: $CI_COMMIT_TAG # Run this job when a tag is created
- when: manual # and when manually triggered.
allow_failure: true # Don't block the CI pipeline until triggered.
variables:
DEPENDENCIES: $MESON_GCC_DEPS $GTK4_BUILD_DEPS
script:
- mkdir _build && cd _build
# Don't use warning_level and werror. They are applied also to subprojects.
- meson setup --buildtype=release $GTK4_MESON_OPTIONS
# Must compile before 'meson dist' to generate source code and documentation.
- meson compile
# Skip tests. See release_gcc_build.
# 'meson dist --no-tests' skips compile + test + install.
# GTKMM_NO_DIST_TESTS skips only test.
- export GTKMM_NO_DIST_TESTS=1
- meson dist
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/meson-dist/*.tar.xz"
expire_in: 1 week