-
Notifications
You must be signed in to change notification settings - Fork 44
/
.gitlab-ci.yml
198 lines (188 loc) · 6.09 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
include:
- component: gitlab.gnome.org/GNOME/citemplates/release-service@master
inputs:
dist-job-name: "linux-fedora"
tarball-artifact-path: "_build/meson-dist/$CI_PROJECT_NAME-$CI_COMMIT_TAG.tar.xz"
stages:
- build
- analysis
- docs
- deploy
- release
# Common variables
variables:
COMMON_MESON_FLAGS: ""
MESON_TEST_TIMEOUT_MULTIPLIER: 2
FEDORA_IMAGE: registry.gitlab.gnome.org/gnome/pango/fedora:v12
.only-default:
only:
- branches
except:
- tags
linux-fedora:
image: $FEDORA_IMAGE
stage: build
needs: []
variables:
EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
script:
- git config --global --add safe.directory $CI_PROJECT_DIR
- meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build
- meson compile -C _build
- .gitlab-ci/run-tests.sh _build
- meson dist -C _build --include-subprojects --no-tests
artifacts:
name: "${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
when: always
reports:
junit:
- "${CI_PROJECT_DIR}/_build/meson-logs/testlog.junit.xml"
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
- "${CI_PROJECT_DIR}/_build/meson-dist/*.tar.xz"
- "${CI_PROJECT_DIR}/_build/hello.png"
- "${CI_PROJECT_DIR}/_build/fontlist.txt"
asan-build:
extends: .only-default
image: $FEDORA_IMAGE
tags: [ asan ]
stage: analysis
needs: []
script:
- CC=clang meson setup --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=disabled _build
- meson compile -C _build
- .gitlab-ci/run-tests.sh _build
artifacts:
name: "${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
when: always
reports:
junit:
- "${CI_PROJECT_DIR}/_build/meson-logs/testlog.junit.xml"
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
- "${CI_PROJECT_DIR}/_build/hello.png"
- "${CI_PROJECT_DIR}/_build/fontlist.txt"
msys2-mingw64:
extends: .only-default
stage: build
needs: []
tags:
- win32-ps
variables:
MSYSTEM: "MINGW64"
CHERE_INVOKING: "yes"
script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/render-msys2.sh"
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/list-msys2.sh"
artifacts:
name: "${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
when: always
reports:
junit:
- "${CI_PROJECT_DIR}/_build/meson-logs/testlog.junit.xml"
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
- "${CI_PROJECT_DIR}/_build/hello.png"
- "${CI_PROJECT_DIR}/_build/fontlist.txt"
vs2019-x64:
# TODO: Uncomment this when ready to merge.
# rules:
# - if: $CI_PROJECT_NAMESPACE == "GNOME"
stage: build
tags:
- win32-ps
needs: []
script:
- .gitlab-ci/test-msvc.bat
artifacts:
name: "${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
when: always
reports:
junit:
- "${CI_PROJECT_DIR}/_build/meson-logs/testlog.junit.xml"
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
macos:
extends: .only-default
only:
- branches@GNOME/pango
- branches@dehesselle/pango
stage: build
tags:
- macosarm
needs: []
variables:
# ragel -Wno-unused-const-variable, -Wno-overloaded-virtual
# pcre2 -Wno-overlength-strings
# glib -Wno-deprecated-declarations, -Wno-literal-conversion
# fribidi -Wno-deprecated-non-prototype, -Wno-enum-conversion
# libpng -Wno-unused-but-set-variable
# pixman -Wno-unknown-attributes
# cairo -Wno-switch-enum, -Wno-deprecated-declarations, -Wno-unused-const-variable
CFLAGS: "-Wno-overlength-strings -Wno-deprecated-non-prototype -Wno-enum-conversion -Wno-unused-but-set-variable -Wno-unknown-attributes -Wno-switch-enum -Wno-deprecated-declarations -Wno-unused-const-variable -Wno-literal-conversion"
CXXFLAGS: "-Wno-overloaded-virtual -Wno-unused-const-variable"
OBJCFLAGS: -Wno-deprecated-declarations
CCACHE_DIR: /Users/Shared/work/ccache
CCACHE_VER: "4.9.1"
CCACHE_URL: https://github.com/ccache/ccache/releases/download/v$CCACHE_VER/ccache-$CCACHE_VER-darwin.tar.gz
EXTRA_MESON_FLAGS: "-Dintrospection=disabled -Dpixman:tests=disabled -Dharfbuzz:ragel_subproject=true"
PIP_CACHE_DIR: /Users/Shared/work/cache
PIPENV_CACHE_DIR: $PIP_CACHE_DIR
PYTHONPYCACHEPREFIX: $PIP_CACHE_DIR
SDKROOT: /opt/sdks/MacOSX11.3.sdk
before_script:
- python3 -m venv .venv
- curl -L $CCACHE_URL | tar -C .venv/bin -xz --strip-components=1 ccache-$CCACHE_VER-darwin/ccache
- source .venv/bin/activate
- pip3 install meson==1.4.2 ninja==1.11.1.1 packaging==23.2
# Disable font-scale test as it SIGTRAPs. (The test code is skipped over by
# inserting "return;" as first statement into the relevant function.)
- |
LINE_NO=$(grep -n "test_font_scale (void)" tests/test-font.c | awk -F ':' '{ print $1 }')
sed -i '' ''$((LINE_NO+2))'i\
return;' tests/test-font.c
script:
- meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build
- meson compile -C _build
- .gitlab-ci/run-tests.sh _build
artifacts:
name: "${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
when: always
reports:
junit:
- "${CI_PROJECT_DIR}/_build/meson-logs/testlog.junit.xml"
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
- "${CI_PROJECT_DIR}/_build/hello.png"
- "${CI_PROJECT_DIR}/_build/fontlist.txt"
reference:
image: $FEDORA_IMAGE
stage: docs
needs: []
variables:
EXTRA_MESON_FLAGS: ""
script:
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} -Ddocumentation=true _build
- ninja -C _build
- mkdir -p _reference/
- mv _build/docs/Pango/ _reference/
- mv _build/docs/PangoCairo/ _reference/
- mv _build/docs/PangoFc/ _reference/
- mv _build/docs/PangoFT2/ _reference/
- mv _build/docs/PangoOT/ _reference/
- mv _build/docs/PangoXft/ _reference/
artifacts:
paths:
- _reference
pages:
stage: deploy
needs: ['reference']
script:
- mv _reference/ public/
artifacts:
paths:
- public
only:
- main