-
Notifications
You must be signed in to change notification settings - Fork 31
/
.gitlab-ci.yml
177 lines (157 loc) · 3.48 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
image: registry.gitlab.gnome.org/gnome/pygobject/main:v26
stages:
- build_and_test
- coverage
- deploy
cache:
paths:
- _ccache/
.defaults: &defaults
stage: build_and_test
artifacts:
when: always
paths:
- coverage/
- test-results.xml
reports:
junit: test-results.xml
script:
- bash -x ./.gitlab-ci/test-docker.sh
.mingw-defaults: &mingw-defaults
stage: build_and_test
tags:
- win32-ps
artifacts:
when: always
paths:
- coverage/
- _build/meson-logs
- test-results.xml
reports:
junit: test-results.xml
script:
- $env:CHERE_INVOKING = 'yes'
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
coverage:
stage: coverage
artifacts:
paths:
- coverage/
variables:
PYTHON_VERSION: "3.9"
script:
- bash -x ./.gitlab-ci/coverage-docker.sh
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
pages:
stage: deploy
dependencies:
- coverage
before_script:
- python -m pip install "pdm!=2.17.3"
- python -m pdm install -v
script:
- python -m pdm run sphinx-build -T -E -W --keep-going -b html -d _build/doctrees -D language=en docs/ public
- mv coverage/ public/
artifacts:
paths:
- public
expire_in: 30 days
only:
- main
sdist:
stage: build_and_test
artifacts:
paths:
- dist/
script:
- git config --global --add safe.directory "$CI_PROJECT_DIR"
- bash -x ./.gitlab-ci/build-sdists.sh
mingw32:
variables:
MSYSTEM: "MINGW32"
<<: *mingw-defaults
mingw64:
variables:
MSYSTEM: "MINGW64"
<<: *mingw-defaults
python3.9:
variables:
PYTHON_VERSION: "3.9"
TEST_GTK_VERSION: "3.0"
<<: *defaults
python3.10:
variables:
PYTHON_VERSION: "3.10"
TEST_GTK_VERSION: "3.0"
<<: *defaults
python3.11:
variables:
PYTHON_VERSION: "3.11"
TEST_GTK_VERSION: "3.0"
<<: *defaults
python3.11-gtk4:
variables:
PYTHON_VERSION: "3.11"
TEST_GTK_VERSION: "4.0"
<<: *defaults
python3.12:
variables:
PYTHON_VERSION: "3.12"
TEST_GTK_VERSION: "3.0"
<<: *defaults
python3.13:
variables:
PYTHON_VERSION: "3.13"
TEST_GTK_VERSION: "3.0"
<<: *defaults
pypy3:
variables:
PYTHON_VERSION: "pypy3"
TEST_GTK_VERSION: "3.0"
<<: *defaults
gnome-master:
stage: build_and_test
image: quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master
tags:
- flatpak
artifacts:
paths:
- coverage/
variables:
TEST_GTK_VERSION: "3.0"
script:
- bash -x ./.gitlab-ci/test-flatpak.sh
gnome-master-gtk4:
allow_failure: true
stage: build_and_test
image: quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master
tags:
- flatpak
artifacts:
paths:
- coverage/
variables:
TEST_GTK_VERSION: "4.0"
script:
- bash -x ./.gitlab-ci/test-flatpak.sh
python3.12-pdm:
stage: build_and_test
variables:
PYTHON_VERSION: "3.12"
TEST_GTK_VERSION: "3.0"
before_script:
- python -m pip install "pdm!=2.17.3"
- python -m pdm install -v
script:
- xvfb-run -a python -m pdm run pytest
minimal-meson:
allow_failure: true
stage: build_and_test
image: quay.io/fedora/fedora:40
before_script:
- dnf install --assumeyes gcc meson git flex bison diffutils python3-devel python3-pytest gobject-introspection-devel
script:
- meson setup _build
- meson compile -C _build
- PYTEST_ADDOPTS="-sv -k 'not test_cairo'" meson test -C _build --suite pygobject --verbose