-
Notifications
You must be signed in to change notification settings - Fork 81
344 lines (282 loc) · 10.4 KB
/
Copy pathci-build-libs.yml
File metadata and controls
344 lines (282 loc) · 10.4 KB
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
name: Manual build static libraries
# NOTE:
# - the matrices are repeated for each library
# - we don't run that on self-hosted because the cmake version is too old for libxml
on:
workflow_dispatch:
push:
branches:
- main
- master
env:
LIBXML2_VERSION: 2.13.6
FREETYPE2_VERSION: 2.13.3
LIBPNG16_VERSION: 1.6.47
ZLIB_VERSION: 1.3.1
jobs:
build-libxml2:
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-24.04-arm, macos-latest, macos-15-intel ]
fail-fast: false
runs-on: ${{ matrix.os }}
env:
JOB_VAR: "job_value"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up dependencies Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y wget cmake autoconf automake libfontconfig-dev
- name: Set up dependencies Macos
if: runner.os == 'macOS'
run: |
brew install wget cmake autoconf automake fontconfig
- name: Set OS and ARCH variables
run: |
echo "OS=${{ runner.os == 'Linux' && 'linux' || 'mac' }}" >> $GITHUB_ENV
echo "ARCH=${{ runner.arch == 'X64' && '64' || 'arm64' }}" >> $GITHUB_ENV
shell: bash
- name: Download source
run: |
pushd libs/libxml
wget -O source.tar.gz https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${{ env.LIBXML2_VERSION}}/libxml2-v${{ env.LIBXML2_VERSION}}.tar.gz
tar -xzf source.tar.gz
mv libxml2-* src
- name: Build source
run: |
cd libs/libxml/src
mkdir -p build/output
cd build
cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/output -G "Unix Makefiles" .. -D LIBXML2_WITH_LZMA=OFF -D LIBXML2_WITH_ICONV=OFF -D LIBXML2_WITH_ZLIB=OFF -DBUILD_SHARED_LIBS=OFF
make -j8
make install
cd ..
mkdir -p output/libxml/$OS/$ARCH
cp build/output/lib/libxml2.a output/libxml/$OS/$ARCH
cp -r build/output/include/libxml2 output/libxml
mv output/libxml/libxml2 output/libxml/include
- name: Save specific file
uses: actions/upload-artifact@v4
with:
name: libxml2-binary-${{ env.OS }}-${{ env.ARCH }}
path: libs/libxml/src/output
build-freetype:
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-24.04-arm, macos-latest, macos-15-intel ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up dependencies Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y wget cmake autoconf automake libfontconfig-dev
- name: Set up dependencies Macos
if: runner.os == 'macOS'
run: |
brew install wget cmake autoconf automake fontconfig
- name: Set OS and ARCH variables
run: |
echo "OS=${{ runner.os == 'Linux' && 'linux' || 'mac' }}" >> $GITHUB_ENV
echo "ARCH=${{ runner.arch == 'X64' && '64' || 'arm64' }}" >> $GITHUB_ENV
shell: bash
- name: Download source
run: |
cd libs/freetype
wget -O source.tar.gz https://sourceforge.net/projects/freetype/files/freetype2/${{ env.FREETYPE2_VERSION }}/freetype-${{ env.FREETYPE2_VERSION }}.tar.gz/download
tar -zxf source.tar.gz
mv freetype-* src
- name: Build source
run: |
cd libs/freetype/src
mkdir -p build/output
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/output -G "Unix Makefiles" -D FT_DISABLE_BROTLI=TRUE -D FT_DISABLE_HARFBUZZ=TRUE -D FT_DISABLE_ZLIB=TRUE -D FT_DISABLE_BZIP2=TRUE -D FT_DISABLE_PNG=TRUE
make -j8
make install
cd ..
mkdir -p output/freetype/$OS/$ARCH
cp build/output/lib/libfreetype.a output/freetype/$OS/$ARCH/
cp -r build/output/include/freetype2 output/freetype/
mv output/freetype/freetype2 output/freetype/include
- name: Save specific file
uses: actions/upload-artifact@v4
with:
name: freetype-binary-${{ env.OS }}-${{ env.ARCH }}
path: libs/freetype/src/output
build-libpng:
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-24.04-arm, macos-latest, macos-15-intel ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up dependencies Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y wget cmake autoconf automake libfontconfig-dev
- name: Set up dependencies Macos
if: runner.os == 'macOS'
run: |
brew install wget cmake autoconf automake fontconfig
- name: Set OS and ARCH variables
run: |
echo "OS=${{ runner.os == 'Linux' && 'linux' || 'mac' }}" >> $GITHUB_ENV
echo "ARCH=${{ runner.arch == 'X64' && '64' || 'arm64' }}" >> $GITHUB_ENV
shell: bash
- name: Download source
run: |
cd libs/image/png
wget -O source.tar.gz https://sourceforge.net/projects/libpng/files/libpng16/${{ env.LIBPNG16_VERSION }}/libpng-${{ env.LIBPNG16_VERSION }}.tar.gz/download
tar -zxf source.tar.gz
mv libpng* src
- name: Build source
run: |
cd libs/image/png/src
mkdir -p build/output
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/output -DBUILD_SHARED_LIBS=OFF
make -j8
make install
cd ..
mkdir -p output/image/png/$OS/$ARCH
cp build/output/lib/libpng.a output/image/png/$OS/$ARCH
cp build/output/lib/libpng16.a output/image/png/$OS/$ARCH
cp -r build/output/include output/image/png
cp pngstruct.h output/image/png/include
cp pnginfo.h output/image/png/include
cp pngpriv.h output/image/png/include
cp pngstruct.h output/image/png/include/libpng16
cp pngpriv.h output/image/png/include/libpng16
cp pnginfo.h output/image/png/include/libpng16
- name: Save specific file
uses: actions/upload-artifact@v4
with:
name: libpng-binary-${{ env.OS }}-${{ env.ARCH }}
path: libs/image/png/src/output
build-zlib:
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-24.04-arm, macos-latest, macos-15-intel ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up dependencies Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y wget cmake autoconf automake libfontconfig-dev
- name: Set up dependencies Macos
if: runner.os == 'macOS'
run: |
brew install wget cmake autoconf automake fontconfig
- name: Set OS and ARCH variables
run: |
echo "OS=${{ runner.os == 'Linux' && 'linux' || 'mac' }}" >> $GITHUB_ENV
echo "ARCH=${{ runner.arch == 'X64' && '64' || 'arm64' }}" >> $GITHUB_ENV
shell: bash
- name: Download source
run: |
cd libs/image/zlib
wget -O source.tar.gz https://zlib.net/zlib-${{ env.ZLIB_VERSION }}.tar.gz
tar -zxf source.tar.gz
mv zlib-* src
- name: Build source
run: |
cd libs/image/zlib/src
mkdir -p build/output
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/output -DBUILD_SHARED_LIBS=OFF
make -j8
make install
cd ..
mkdir -p output/image/zlib/$OS/$ARCH
cp build/output/lib/libz.a output/image/zlib/$OS/$ARCH
cp -r build/output/include output/image/zlib
- name: Save specific file
uses: actions/upload-artifact@v4
with:
name: libzlib-binary-${{ env.OS }}-${{ env.ARCH }}
path: libs/image/zlib/src/output
build-icu:
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-24.04-arm, macos-latest, macos-15-intel ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up dependencies Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y wget cmake autoconf automake libfontconfig-dev
- name: Set up dependencies Macos
if: runner.os == 'macOS'
run: |
brew install wget cmake autoconf automake fontconfig
- name: Set OS and ARCH variables
run: |
echo "OS=${{ runner.os == 'Linux' && 'linux' || 'mac' }}" >> $GITHUB_ENV
echo "ARCH=${{ runner.arch == 'X64' && '64' || 'arm64' }}" >> $GITHUB_ENV
shell: bash
- name: Download source
run: |
cd libs/icu
wget -O source.tar.gz https://github.com/unicode-org/icu/archive/refs/tags/release-76-1.tar.gz
tar -zxf source.tar.gz
mv icu-release-* src
- name: Build source
run: |
cd libs/icu/src/icu4c/source
mkdir output
./runConfigureICU Linux --enable-static --disable-shared --prefix=$(pwd)/output
make -j8
make install
cd ../../
mkdir -p output/icu/$OS/$ARCH
cp icu4c/source/output/lib/*.a output/icu/$OS/$ARCH
cp -r icu4c/source/output/include output/icu/
- name: Save specific file
uses: actions/upload-artifact@v4
with:
name: icu-binary-${{ env.OS }}-${{ env.ARCH }}
path: libs/icu/src/output
assemble-artifact:
needs: [ build-libxml2, build-freetype, build-libpng, build-zlib, build-icu ]
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: output
- name: Move contents to output directory
run: |
for dir in output/*; do
if [ -d "$dir" ]; then
rsync -a "$dir"/* output/
rm -rf "$dir"
fi
done
shell: bash
- name: Display structure of downloaded files
run: ls -R
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: all-binaries
path: output