-
Notifications
You must be signed in to change notification settings - Fork 15
390 lines (389 loc) · 13.6 KB
/
release.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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
name: Publish to PyPI
on:
pull_request:
push:
release:
types: [published]
jobs:
build-wayland:
name: Build Wayland libraries
runs-on: ubuntu-24.04
container: quay.io/pypa/manylinux_2_28_x86_64
env:
libdrm-version: "2.4.114"
seatd-version: "0.6.3"
pixman-version: "0.42.0"
xwayland-version: "22.1.9"
xcvt-version: "0.1.2"
inputproto-version: "2021.5"
wayland-protocols-version: "1.36"
wayland-version: "1.23.0"
wlroots-version: "0.17.4"
steps:
- name: Install dependencies
run: |
yum -y install \
hwdata \
python3-pip \
libepoxy-devel \
libffi-devel \
libinput-devel \
libpciaccess-devel \
libtirpc-devel \
libudev-devel \
libXdmcp-devel \
libXfont2-devel \
libxkbcommon-x11-devel \
libxkbfile-devel \
libxml2-devel \
libxshmfence-devel \
mesa-libEGL-devel \
mesa-libgbm-devel \
openssl-devel \
xcb-util-devel \
xcb-util-image-devel \
xcb-util-keysyms-devel \
xcb-util-renderutil-devel \
xcb-util-wm-devel \
xorg-x11-font-utils \
xorg-x11-xtrans-devel \
ninja-build \
wget
- name: Set environment variables
run: |
echo "CPATH=${HOME}/wayland/usr/include" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${HOME}/wayland/usr/lib" >> $GITHUB_ENV
echo "LIBRARY_PATH=${HOME}/wayland/usr/lib" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=${HOME}/wayland/usr/share/pkgconfig:${HOME}/wayland/usr/lib/pkgconfig" >> $GITHUB_ENV
- name: Download and unpack Wayland source
run: |
wget $WAYLAND_URL
wget $WAYLAND_PROTOCOLS_URL
wget $XCVT_URL
wget $INPUTPROTO_URL
wget $XWAYLAND_URL
wget $LIBDRM_URL
wget -O seatd.tar.gz $SEATD_URL
wget $PIXMAN_URL
wget -O wlroots.tar.gz $WLROOTS_URL
tar -xJf wayland-${{ env.wayland-version }}.tar.xz
tar -xJf wayland-protocols-${{ env.wayland-protocols-version }}.tar.xz
tar -xzf xorgproto-xorgproto-${{ env.inputproto-version }}.tar.gz
tar -xzf libxcvt-libxcvt-${{ env.xcvt-version }}.tar.gz
tar -xzf xserver-xwayland-${{ env.xwayland-version }}.tar.gz
tar -xzf drm-libdrm-${{ env.libdrm-version }}.tar.gz
tar -xjf pixman-pixman-${{ env.pixman-version }}.tar.bz2
tar -xzf seatd.tar.gz
tar -xzf wlroots.tar.gz
env:
WAYLAND_URL: https://gitlab.freedesktop.org/wayland/wayland/-/releases/${{ env.wayland-version }}/downloads/wayland-${{ env.wayland-version }}.tar.xz
WAYLAND_PROTOCOLS_URL: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/${{ env.wayland-protocols-version }}/downloads/wayland-protocols-${{ env.wayland-protocols-version }}.tar.xz
XWAYLAND_URL: https://gitlab.freedesktop.org/xorg/xserver/-/archive/xwayland-${{ env.xwayland-version }}/xserver-xwayland-${{ env.xwayland-version }}.tar.gz
XCVT_URL: https://gitlab.freedesktop.org/xorg/lib/libxcvt/-/archive/libxcvt-${{ env.xcvt-version }}/libxcvt-libxcvt-${{ env.xcvt-version }}.tar.gz
INPUTPROTO_URL: https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/archive/xorgproto-${{ env.inputproto-version}}/xorgproto-xorgproto-${{ env.inputproto-version}}.tar.gz
LIBDRM_URL: https://gitlab.freedesktop.org/mesa/drm/-/archive/libdrm-${{ env.libdrm-version }}/drm-libdrm-${{ env.libdrm-version }}.tar.gz
SEATD_URL: https://git.sr.ht/~kennylevinsen/seatd/archive/${{ env.seatd-version }}.tar.gz
PIXMAN_URL: https://gitlab.freedesktop.org/pixman/pixman/-/archive/pixman-${{ env.pixman-version }}/pixman-pixman-${{ env.pixman-version }}.tar.bz2
WLROOTS_URL: https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/${{ env.wlroots-version }}/wlroots-${{ env.wlroots-version }}.tar.gz
- name: Install meson
run: |
pip3 install meson
- name: Build wayland
working-directory: wayland-${{ env.wayland-version }}
run: |
meson build --prefix=/usr -Ddocumentation=false
ninja -C build
DESTDIR=~/wayland ninja -C build install
ninja -C build install
- name: Build wayland-protocols
working-directory: wayland-protocols-${{ env.wayland-protocols-version }}
run: |
meson build --prefix=/usr
ninja -C build
DESTDIR=~/wayland ninja -C build install
ninja -C build install
- name: Build libdrm
working-directory: drm-libdrm-${{ env.libdrm-version }}
run: |
meson build --prefix=/usr
ninja -C build
DESTDIR=~/wayland ninja -C build install
ninja -C build install
- name: Build seatd
working-directory: seatd-${{ env.seatd-version }}
run: |
meson build --prefix=/usr
ninja -C build
DESTDIR=~/wayland ninja -C build install
ninja -C build install
- name: Build pixman
working-directory: pixman-pixman-${{ env.pixman-version }}
run: |
meson build --prefix=/usr
ninja -C build
DESTDIR=~/wayland ninja -C build install
ninja -C build install
- name: Build inputproto
working-directory: xorgproto-xorgproto-${{ env.inputproto-version }}
run: |
meson build --prefix=/usr
ninja -C build
DESTDIR=~/wayland ninja -C build install
ninja -C build install
- name: Build libxcvt
working-directory: libxcvt-libxcvt-${{ env.xcvt-version }}
run: |
meson build --prefix=/usr
ninja -C build
DESTDIR=~/wayland ninja -C build install
ninja -C build install
- name: Build xwayland
working-directory: xserver-xwayland-${{ env.xwayland-version }}
run: |
meson build --prefix=/usr
ninja -C build
DESTDIR=~/wayland ninja -C build install
ninja -C build install
- name: Build wlroots
working-directory: wlroots-${{ env.wlroots-version }}
run: |
meson build --prefix=/usr -Dxwayland=enabled
ninja -C build
DESTDIR=~/wayland ninja -C build install
- name: Create artifact
run: tar czf ~/wayland.tar.gz -C ${HOME}/wayland/ .
- name: Upload built libraries
uses: actions/upload-artifact@v4
with:
name: wayland
path: ~/wayland.tar.gz
if-no-files-found: error
build-wheel-cpython:
name: Build CPython wheels
runs-on: ubuntu-24.04
container: quay.io/pypa/manylinux_2_28_x86_64
needs: build-wayland
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Download wayland libraries
uses: actions/download-artifact@v4
with:
name: wayland
- name: Unpack wayland artifact
run: tar xf wayland.tar.gz -C /
- name: Set python version
run: |
PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-*)
echo "${PYTHON_ROOT}/bin" >> $GITHUB_PATH
shell: bash
env:
PYTHON_VERSION: ${{ matrix.python-version }}
- name: Checkout repo
uses: actions/checkout@v4
- name: Install dependencies
run: |
yum -y install \
libinput-devel \
libpciaccess \
libudev-devel \
libxkbcommon-x11-devel \
mesa-libEGL \
mesa-libgbm \
xcb-util \
xcb-util-image \
xcb-util-keysyms \
xcb-util-renderutil \
xcb-util-wm-devel
pip install auditwheel build
- name: Build wheels
run: |
python -m build --wheel
ls dist/
auditwheel show dist/pywlroots-*.whl
auditwheel repair --plat manylinux_2_28_x86_64 -w output_wheels dist/pywlroots-*.whl
env:
PIP_CONSTRAINT: dist-build-constraints.txt
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.python-version }}
path: output_wheels/*.whl
build-wheel-pypy:
name: Build PyPy wheels
runs-on: ubuntu-24.04
container: quay.io/pypa/manylinux_2_28_x86_64
needs: build-wayland
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
pypy-version: ["7.3"]
steps:
- name: Download wayland libraries
uses: actions/download-artifact@v4
with:
name: wayland
- name: Unpack wayland artifact
run: tar xf wayland.tar.gz -C /
- name: Set python version
run: |
ls /opt/python/
PYTHON_ROOT=$(find /opt/python -name pp${PYTHON_VERSION/./}-*_pp${PP_VERSION/./})
echo "${PYTHON_ROOT}"
echo "${PYTHON_ROOT}/bin" >> $GITHUB_PATH
shell: bash
env:
PYTHON_VERSION: ${{ matrix.python-version }}
PP_VERSION: ${{ matrix.pypy-version }}
- name: Checkout repo
uses: actions/checkout@v4
- name: Install dependencies
run: |
yum -y install \
libinput-devel \
libpciaccess \
libudev-devel \
libxkbcommon-x11-devel \
mesa-libEGL \
mesa-libgbm \
xcb-util \
xcb-util-image \
xcb-util-keysyms \
xcb-util-renderutil \
xcb-util-wm-devel
pip install auditwheel build
- name: Build wheels
run: |
python -m build --wheel
ls dist/
auditwheel show dist/pywlroots-*.whl
auditwheel repair --plat manylinux_2_28_x86_64 -w output_wheels dist/pywlroots-*.whl
env:
PIP_CONSTRAINT: dist-build-constraints.txt
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: wheels-pypy-${{ matrix.python-version }}
path: output_wheels/*.whl
test-wheel:
name: Test wheels
runs-on: ubuntu-24.04
needs: [build-wheel-cpython, build-wheel-pypy]
strategy:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "pypy-3.9"
- "pypy-3.10"
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y --no-install-recommends \
libxkbcommon-dev
- name: Download wheels
uses: actions/download-artifact@v4
with:
name: wheels-${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install wheel
run: |
pip install pywlroots-*.whl
pip install setuptools
- name: Check installation
shell: python
run: |
import wlroots
print(wlroots.__version__)
print(wlroots.__wlroots_version__)
from wlroots.ffi_build import has_xwayland
assert has_xwayland()
build-source:
name: Build source package
runs-on: ubuntu-24.04
container: quay.io/pypa/manylinux_2_28_x86_64
needs: build-wayland
env:
python-version: "3.12"
steps:
- name: Download wayland libraries
uses: actions/download-artifact@v4
with:
name: wayland
- name: Unpack wayland artifact
run: tar xf wayland.tar.gz -C /
- name: Set python version
run: |
PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-*)
echo "${PYTHON_ROOT}/bin" >> $GITHUB_PATH
shell: bash
env:
PYTHON_VERSION: ${{ env.python-version }}
- name: Checkout repo
uses: actions/checkout@v4
- name: Install dependencies
run: |
yum -y install \
libinput-devel \
libpciaccess \
libudev-devel \
libxkbcommon-x11-devel \
mesa-libEGL \
mesa-libgbm \
xcb-util \
xcb-util-image \
xcb-util-keysyms \
xcb-util-renderutil \
xcb-util-wm-devel
pip install build
- name: Build source
run: |
python -m build --sdist
env:
PIP_CONSTRAINT: dist-build-constraints.txt
- name: Upload source
uses: actions/upload-artifact@v4
with:
name: source
path: dist/*.tar.gz
upload-wheel:
name: Upload wheels
runs-on: ubuntu-24.04
needs: [test-wheel, build-source]
steps:
- name: Download wheels
uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist/
merge-multiple: true
- name: Download source
uses: actions/download-artifact@v4
with:
name: source
path: dist/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release'
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true