-
Notifications
You must be signed in to change notification settings - Fork 36
/
.gitlab-ci.yml
242 lines (235 loc) · 11.3 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
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
variables:
GLFW_VERSION: "3.4"
stages:
- build
- package
build-manylinux_2_28-x86_64:
stage: build
image: quay.io/pypa/manylinux_2_28_x86_64
script:
# Download GLFW from source
- curl -LO https://github.com/glfw/glfw/releases/download/${GLFW_VERSION}/glfw-${GLFW_VERSION}.zip
- unzip glfw-${GLFW_VERSION}.zip
# Install cmake
- curl -LO https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-Linux-x86_64.tar.gz
- tar xzf cmake-3.28.3-Linux-x86_64.tar.gz
- mv cmake-3.28.3-linux-x86_64 cmake
# Install build dependencies for X11
- yum install -y libXinerama-devel libXrandr-devel libXcursor-devel libXi-devel
# Build GLFW for X11
- mkdir build_x11
- cd build_x11
- ../cmake/bin/cmake ../glfw-${GLFW_VERSION} -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_X11=ON -DGLFW_BUILD_WAYLAND=OFF
- make
- mkdir -p ../artifacts-manylinux_2_28-x86_64/x11
- cp src/libglfw.so ../artifacts-manylinux_2_28-x86_64/x11/libglfw.so
- cd ..
# Install build dependencies for Wayland
- yum install -y libwayland-client-devel libxkbcommon-devel
- curl -LO https://wayland.freedesktop.org/releases/wayland-protocols-1.17.tar.xz
- tar xf wayland-protocols-1.17.tar.xz
- cd wayland-protocols-1.17
- ./configure
- make install
- cd ..
# Build GLFW for Wayland
- mkdir build_wayland
- cd build_wayland
- PKG_CONFIG_PATH=/usr/local/share/pkgconfig ../cmake/bin/cmake ../glfw-${GLFW_VERSION} -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_X11=OFF -DGLFW_BUILD_WAYLAND=ON
- make
- mkdir -p ../artifacts-manylinux_2_28-x86_64/wayland
- cp src/libglfw.so ../artifacts-manylinux_2_28-x86_64/wayland/libglfw.so
artifacts:
paths:
- artifacts-manylinux_2_28-x86_64
build-manylinux_2_28-aarch64:
stage: build
image: quay.io/pypa/manylinux_2_28_aarch64
script:
# Download GLFW from source
- curl -LO https://github.com/glfw/glfw/releases/download/${GLFW_VERSION}/glfw-${GLFW_VERSION}.zip
- unzip glfw-${GLFW_VERSION}.zip
# Install cmake
- curl -LO https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-aarch64.tar.gz
- tar xzf cmake-3.28.3-linux-aarch64.tar.gz
- mv cmake-3.28.3-linux-aarch64 cmake
# Install build dependencies for X11
- yum install -y libXinerama-devel libXrandr-devel libXcursor-devel libXi-devel
# Build GLFW for X11
- mkdir build_x11
- cd build_x11
- ../cmake/bin/cmake ../glfw-${GLFW_VERSION} -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_X11=ON -DGLFW_BUILD_WAYLAND=OFF
- make
- mkdir -p ../artifacts-manylinux_2_28-aarch64/x11
- cp src/libglfw.so ../artifacts-manylinux_2_28-aarch64/x11/libglfw.so
- cd ..
# Install build dependencies for Wayland
- yum install -y epel-release
- yum install -y libwayland-client-devel libxkbcommon-devel
- curl -LO https://wayland.freedesktop.org/releases/wayland-protocols-1.17.tar.xz
- tar xf wayland-protocols-1.17.tar.xz
- cd wayland-protocols-1.17
- ./configure
- make install
- cd ..
# Build GLFW for Wayland
- mkdir build_wayland
- cd build_wayland
- PKG_CONFIG_PATH=/usr/local/share/pkgconfig ../cmake/bin/cmake ../glfw-${GLFW_VERSION} -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_X11=OFF -DGLFW_BUILD_WAYLAND=ON
- make
- mkdir -p ../artifacts-manylinux_2_28-aarch64/wayland
- cp src/libglfw.so ../artifacts-manylinux_2_28-aarch64/wayland/libglfw.so
artifacts:
paths:
- artifacts-manylinux_2_28-aarch64
build-manylinux2014-x86_64:
stage: build
image: quay.io/pypa/manylinux2014_x86_64
script:
# Download GLFW from source
- curl -LO https://github.com/glfw/glfw/releases/download/${GLFW_VERSION}/glfw-${GLFW_VERSION}.zip
- unzip glfw-${GLFW_VERSION}.zip
# Patch GLFW 3.4 to be compatible with manylinux2014
- patch -p0 -i Willy-JL-glfw-3.4.0-patch.diff
# Install cmake
- curl -LO https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-Linux-x86_64.tar.gz
- tar xzf cmake-3.28.3-Linux-x86_64.tar.gz
- mv cmake-3.28.3-linux-x86_64 cmake
# Install build dependencies for X11
- yum install -y libXinerama-devel libXrandr-devel libXcursor-devel libXi-devel
# Build GLFW for X11
- mkdir build_x11
- cd build_x11
- ../cmake/bin/cmake ../glfw-${GLFW_VERSION} -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_X11=ON -DGLFW_BUILD_WAYLAND=OFF
- make
- mkdir -p ../artifacts-manylinux2014-x86_64/x11
- cp src/libglfw.so ../artifacts-manylinux2014-x86_64/x11/libglfw.so
- cd ..
# Install build dependencies for Wayland
- yum install -y extra-cmake-modules libwayland-client-devel libxkbcommon-devel
- curl -LO https://wayland.freedesktop.org/releases/wayland-protocols-1.17.tar.xz
- tar xf wayland-protocols-1.17.tar.xz
- cd wayland-protocols-1.17
- ./configure
- make install
- cd ..
# Build GLFW for Wayland
- mkdir build_wayland
- cd build_wayland
- PKG_CONFIG_PATH=/usr/local/share/pkgconfig ../cmake/bin/cmake ../glfw-${GLFW_VERSION} -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_X11=OFF -DGLFW_BUILD_WAYLAND=ON
- make
- mkdir -p ../artifacts-manylinux2014-x86_64/wayland
- cp src/libglfw.so ../artifacts-manylinux2014-x86_64/wayland/libglfw.so
artifacts:
paths:
- artifacts-manylinux2014-x86_64
build-manylinux2014-aarch64:
stage: build
image: quay.io/pypa/manylinux2014_aarch64
script:
# Download GLFW from source
- curl -LO https://github.com/glfw/glfw/releases/download/${GLFW_VERSION}/glfw-${GLFW_VERSION}.zip
- unzip glfw-${GLFW_VERSION}.zip
# Patch GLFW 3.4 to be compatible with manylinux2014
- patch -p0 -i Willy-JL-glfw-3.4.0-patch.diff
# Install cmake
- curl -LO https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-aarch64.tar.gz
- tar xzf cmake-3.28.3-linux-aarch64.tar.gz
- mv cmake-3.28.3-linux-aarch64 cmake
# Install build dependencies for X11
- yum install -y libXinerama-devel libXrandr-devel libXcursor-devel libXi-devel
# Build GLFW for X11
- mkdir build_x11
- cd build_x11
- ../cmake/bin/cmake ../glfw-${GLFW_VERSION} -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_X11=ON -DGLFW_BUILD_WAYLAND=OFF
- make
- mkdir -p ../artifacts-manylinux2014-aarch64/x11
- cp src/libglfw.so ../artifacts-manylinux2014-aarch64/x11/libglfw.so
- cd ..
# Install build dependencies for Wayland
- yum install -y epel-release
- yum install -y extra-cmake-modules libwayland-client-devel libxkbcommon-devel
- curl -LO https://wayland.freedesktop.org/releases/wayland-protocols-1.17.tar.xz
- tar xf wayland-protocols-1.17.tar.xz
- cd wayland-protocols-1.17
- ./configure
- make install
- cd ..
# Build GLFW for Wayland
- mkdir build_wayland
- cd build_wayland
- PKG_CONFIG_PATH=/usr/local/share/pkgconfig ../cmake/bin/cmake ../glfw-${GLFW_VERSION} -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_X11=OFF -DGLFW_BUILD_WAYLAND=ON
- make
- mkdir -p ../artifacts-manylinux2014-aarch64/wayland
- cp src/libglfw.so ../artifacts-manylinux2014-aarch64/wayland/libglfw.so
artifacts:
paths:
- artifacts-manylinux2014-aarch64
packages:
stage: package
image: ubuntu:latest
script:
- apt-get update -qy
- apt-get install -y curl python3-setuptools python3-wheel unzip
# Build source distribution
- python3 setup.py sdist
# Build wheel for Windows x86
- curl -L -o glfw.bin.zip https://github.com/glfw/glfw/releases/download/${GLFW_VERSION}/glfw-${GLFW_VERSION}.bin.WIN32.zip
- unzip glfw.bin.zip -d glfw.bin
- cp glfw.bin/*/lib-vc2013/glfw3.dll glfw/glfw3.dll
- cp vcredist/msvcr120.dll glfw/msvcr120.dll
- python3 setup.py bdist_wheel --python-tag py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.p39.p310.p311.p312.p313 --plat-name win32
- rm -rf glfw.bin.zip glfw.bin glfw/glfw3.dll glfw/msvcr120.dll build
# Build wheel for Windows x86_64
- curl -L -o glfw.bin.zip https://github.com/glfw/glfw/releases/download/${GLFW_VERSION}/glfw-${GLFW_VERSION}.bin.WIN64.zip
- unzip glfw.bin.zip -d glfw.bin
- cp glfw.bin/*/lib-vc2013/glfw3.dll glfw/glfw3.dll
- cp vcredist/msvcr120.dll glfw/msvcr120.dll
- python3 setup.py bdist_wheel --python-tag py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.p39.p310.p311.p312.p313 --plat-name win_amd64
- rm -rf glfw.bin.zip glfw.bin glfw/glfw3.dll glfw/msvcr120.dll build
# Build wheel for macOS x86_64
- curl -L -o glfw.bin.zip https://github.com/glfw/glfw/releases/download/${GLFW_VERSION}/glfw-${GLFW_VERSION}.bin.MACOS.zip
- unzip glfw.bin.zip -d glfw.bin
- cp glfw.bin/*/lib-x86_64/libglfw.3.dylib glfw/libglfw.3.dylib
- python3 setup.py bdist_wheel --python-tag py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.p39.p310.p311.p312.p313 --plat-name macosx_10.6_intel
- rm -rf glfw/libglfw.3.dylib build
# Build wheel for macOS arm64
- cp glfw.bin/*/lib-arm64/libglfw.3.dylib glfw/libglfw.3.dylib
- python3 setup.py bdist_wheel --python-tag py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.p39.p310.p311.p312.p313 --plat-name macosx_11.0_arm64
- rm -rf glfw.bin.zip glfw.bin glfw/libglfw.3.dylib build
# Build wheel for manylinux2014 x86_64
- mkdir -p glfw/x11/
- cp artifacts-manylinux2014-x86_64/x11/libglfw.so glfw/x11/libglfw.so
- mkdir -p glfw/wayland/
- cp artifacts-manylinux2014-x86_64/wayland/libglfw.so glfw/wayland/libglfw.so
- python3 setup.py bdist_wheel --python-tag py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.p39.p310.p311.p312.p313 --plat-name manylinux2014_x86_64
- rm -rf glfw/x11/libglfw.so glfw/wayland/libglfw.so build
# Build wheel for manylinux2014 aarch64
- mkdir -p glfw/x11/
- cp artifacts-manylinux2014-aarch64/x11/libglfw.so glfw/x11/libglfw.so
- mkdir -p glfw/wayland/
- cp artifacts-manylinux2014-aarch64/wayland/libglfw.so glfw/wayland/libglfw.so
- python3 setup.py bdist_wheel --python-tag py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.p39.p310.p311.p312.p313 --plat-name manylinux2014_aarch64
- rm -rf glfw/x11/libglfw.so glfw/wayland/libglfw.so build
# Build wheel for manylinux_2_28 x86_64
- mkdir -p glfw/x11/
- cp artifacts-manylinux_2_28-x86_64/x11/libglfw.so glfw/x11/libglfw.so
- mkdir -p glfw/wayland/
- cp artifacts-manylinux_2_28-x86_64/wayland/libglfw.so glfw/wayland/libglfw.so
- python3 setup.py bdist_wheel --python-tag py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.p39.p310.p311.p312.p313 --plat-name manylinux_2_28_x86_64
- rm -rf glfw/x11/libglfw.so glfw/wayland/libglfw.so build
# Build wheel for manylinux_2_28 aarch64
- mkdir -p glfw/x11/
- cp artifacts-manylinux_2_28-aarch64/x11/libglfw.so glfw/x11/libglfw.so
- mkdir -p glfw/wayland/
- cp artifacts-manylinux_2_28-aarch64/wayland/libglfw.so glfw/wayland/libglfw.so
- python3 setup.py bdist_wheel --python-tag py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.p39.p310.p311.p312.p313 --plat-name manylinux_2_28_aarch64
- rm -rf glfw/x11/libglfw.so glfw/wayland/libglfw.so build
# Build source distribution for glfw_preview helper package
- cd utils/glfw_preview
- python3 setup.py sdist
- cp dist/* ../../dist
- cd ../..
artifacts:
paths:
- dist/