forked from GNOME/pango
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
168 lines (160 loc) · 5.11 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
stages:
- build
- analysis
- docs
- deploy
# Common variables
variables:
COMMON_MESON_FLAGS: "--fatal-meson-warnings --werror"
MESON_TEST_TIMEOUT_MULTIPLIER: 2
FEDORA_IMAGE: registry.gitlab.gnome.org/gnome/pango/fedora:v11
.only-default:
only:
- branches
except:
- tags
linux-fedora:
extends: .only-default
image: $FEDORA_IMAGE
stage: build
needs: []
variables:
EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
script:
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS}
_build
- meson _build
- ninja -C _build
- .gitlab-ci/run-tests.sh _build
artifacts:
when: always
reports:
junit:
- "${CI_PROJECT_DIR}/_build/report.xml"
name: "gtk-${CI_COMMIT_REF_NAME}"
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
- "${CI_PROJECT_DIR}/_build/report.xml"
- "${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: []
variables:
script:
- CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=disabled _build
- ninja -C _build
- .gitlab-ci/run-tests.sh _build
artifacts:
when: always
reports:
junit:
- "${CI_PROJECT_DIR}/_build/report.xml"
name: "gtk-${CI_COMMIT_REF_NAME}"
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
- "${CI_PROJECT_DIR}/_build/report.xml"
- "${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
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
- "${CI_PROJECT_DIR}/_build/hello.png"
- "${CI_PROJECT_DIR}/_build/fontlist.txt"
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.2.3 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:
when: always
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