-
Notifications
You must be signed in to change notification settings - Fork 0
469 lines (418 loc) · 22.9 KB
/
build.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
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
name: Build
on:
push:
branches:
- '**'
jobs:
build:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
submodules: true
- name: Free up some space
if: false
run: |
sudo rm --recursive --force \
'/opt/'* \
'/usr/local/lib/android' \
'/usr/local/share/vcpkg' \
'/usr/share/java'
sudo apt purge --auto-remove \
'*apache2*' \
'*docker*' \
'*dotnet*' \
'*firefox*' \
'*google*' \
'*jdk*' \
'*nginx*' \
'*php*' \
'*ruby*' \
'*wayland*' \
'auto*' \
'azure-cli' \
'bind9*' \
'build-essential' \
'clang*' \
'container*' \
'glib*' \
'libmono*' \
'lld*' \
'llvm*' \
'mercurial*' \
'mysql*' \
'postgresql*' \
'powershell' \
'x11*' \
'xdg*'
- name: Increase swap space
if: false
run: |
sudo swapoff -a
sudo fallocate -l '15G' '/mnt/swapfile'
sudo mkswap '/mnt/swapfile'
sudo swapon '/mnt/swapfile'
- name: Install required dependencies
if: false
run: |
sudo apt-get install 'libxml2-dev'
- name: Setup Linux cross-compiler
if: false
run: |
declare -r SPHYNX_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Sphynx/releases/latest')")"
declare -r SPHYNX_TARBALL='/tmp/toolchain.tar.xz'
declare -r SPHYNX_URL="https://github.com/AmanoTeam/Sphynx/releases/download/${SPHYNX_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${SPHYNX_URL}" --output "${SPHYNX_TARBALL}"
tar --directory="$(dirname "${SPHYNX_TARBALL}")" --extract --file="${SPHYNX_TARBALL}"
echo 'SPHYNX_HOME=/tmp/sphynx' >> "${GITHUB_ENV}"
echo '/tmp/sphynx/bin' >> "${GITHUB_PATH}"
- name: Setup Android cross-compiler
if: false
uses: nttld/setup-ndk@main
id: setup-ndk
with:
ndk-version: r26d
- name: Post setup settings for Android cross-compiler
run: |
echo 'ANDROID_HOME=${{ steps.setup-ndk.outputs.ndk-path }}' >> "${GITHUB_ENV}"
sudo sed --in-place '/CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG/d' '/usr/local/share/cmake-'*'/Modules/Platform/Android.cmake'
echo '${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin' >> "${GITHUB_PATH}"
- name: Setup Windows cross-compiler
if: false
run: |
declare -r LLVM_MINGW_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/LLVMMinGW-Builds/releases/latest')")"
declare -r LLVM_MINGW_TARBALL='/tmp/toolchain.tar.xz'
declare -r LLVM_MINGW_URL="https://github.com/AmanoTeam/LLVMMinGW-Builds/releases/download/${LLVM_MINGW_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${LLVM_MINGW_URL}" --output "${LLVM_MINGW_TARBALL}"
tar --directory="$(dirname "${LLVM_MINGW_TARBALL}")" --extract --file="${LLVM_MINGW_TARBALL}"
echo 'LLVM_MINGW_HOME=/tmp/llvm-mingw' >> "${GITHUB_ENV}"
echo '/tmp/llvm-mingw/bin' >> "${GITHUB_PATH}"
- name: Setup MacOS X cross-compiler
if: false
run: |
git clone --depth='1' 'https://github.com/tpoechtrager/osxcross.git'
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url 'https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz' --output './osxcross/tarballs/MacOSX11.3.sdk.tar.xz'
cd './osxcross'
JOBS='38' SDK_VERSION='11.3' OSX_VERSION_MIN='10.6' ./build.sh <<< ''
echo "OSXCROSS_HOME=$(realpath './target')" >> "${GITHUB_ENV}"
echo "$(realpath './target/bin')" >> "${GITHUB_PATH}"
- name: Setup NetBSD cross-compiler
if: false
run: |
declare -r DAKINI_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Dakini/releases/latest')")"
declare -r DAKINI_TARBALL='/tmp/toolchain.tar.xz'
declare -r DAKINI_URL="https://github.com/AmanoTeam/Dakini/releases/download/${DAKINI_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${DAKINI_URL}" --output "${DAKINI_TARBALL}"
tar --directory="$(dirname "${DAKINI_TARBALL}")" --extract --file="${DAKINI_TARBALL}"
echo 'DAKINI_HOME=/tmp/dakini' >> "${GITHUB_ENV}"
echo '/tmp/dakini/bin' >> "${GITHUB_PATH}"
- name: Setup FreeBSD cross-compiler
if: false
run: |
declare -r LOKI_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Loki/releases/latest')")"
declare -r LOKI_TARBALL='/tmp/toolchain.tar.xz'
declare -r LOKI_URL="https://github.com/AmanoTeam/Loki/releases/download/${LOKI_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --silent --connect-timeout '10' --retry '15' --retry-all-errors --fail --location --url "${LOKI_URL}" --output "${LOKI_TARBALL}"
tar --directory="$(dirname "${LOKI_TARBALL}")" --extract --file="${LOKI_TARBALL}"
echo 'LOKI_HOME=/tmp/loki' >> "${GITHUB_ENV}"
echo '/tmp/loki/bin' >> "${GITHUB_PATH}"
- name: Setup DragonFly cross-compiler
if: false
run: |
declare -r DRAGONFLY_CROSS_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Venti/releases/latest')")"
declare -r DRAGONFLY_CROSS_TARBALL='/tmp/toolchain.tar.xz'
declare -r DRAGONFLY_CROSS_URL="https://github.com/AmanoTeam/dr4g0nflybsdcr0ss/releases/download/${DRAGONFLY_CROSS_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${DRAGONFLY_CROSS_URL}" --output "${DRAGONFLY_CROSS_TARBALL}"
tar --directory="$(dirname "${DRAGONFLY_CROSS_TARBALL}")" --extract --file="${DRAGONFLY_CROSS_TARBALL}"
echo 'VENTI_HOME=/tmp/venti' >> "${GITHUB_ENV}"
echo '/tmp/venti/bin' >> "${GITHUB_PATH}"
- name: Setup Haiku cross-compiler
if: false
run: |
declare -r SIL_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Sil/releases/latest')")"
declare -r SIL_TARBALL='/tmp/toolchain.tar.xz'
declare -r SIL_URL="https://github.com/AmanoTeam/Sil/releases/download/${SIL_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${SIL_URL}" --output "${SIL_TARBALL}"
tar --directory="$(dirname "${SIL_TARBALL}")" --extract --file="${SIL_TARBALL}"
echo 'SIL_HOME=/tmp/sil' >> "${GITHUB_ENV}"
echo '/tmp/sil/bin' >> "${GITHUB_PATH}"
- name: Setup OBGGCC cross-compiler
run: |
declare -r OBGGCC_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/obggcc/releases/latest')")"
declare -r OBGGCC_TARBALL='/tmp/toolchain.tar.xz'
declare -r OBGGCC_URL="https://github.com/AmanoTeam/obggcc/releases/download/${OBGGCC_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${OBGGCC_URL}" --output "${OBGGCC_TARBALL}"
tar --directory="$(dirname "${OBGGCC_TARBALL}")" --extract --file="${OBGGCC_TARBALL}"
echo 'OBGGCC_HOME=/tmp/obggcc' >> "${GITHUB_ENV}"
echo '/tmp/obggcc/bin' >> "${GITHUB_PATH}"
- name: Setup OpenBSD cross-compiler
if: false
run: |
declare -r ATAR_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Atar/releases/latest')")"
declare -r ATAR_TARBALL='/tmp/toolchain.tar.xz'
declare -r ATAR_URL="https://github.com/AmanoTeam/Atar/releases/download/${ATAR_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${ATAR_URL}" --output "${ATAR_TARBALL}"
tar --directory="$(dirname "${ATAR_TARBALL}")" --extract --file="${ATAR_TARBALL}"
echo 'ATAR_HOME=/tmp/atar' >> "${GITHUB_ENV}"
echo '/tmp/atar/bin' >> "${GITHUB_PATH}"
- name: Setup Linux musl cross-compiler
if: false
run: |
declare -r RAIDEN_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Raiden/releases/latest')")"
declare -r RAIDEN_TARBALL='/tmp/toolchain.tar.xz'
declare -r RAIDEN_URL="https://github.com/AmanoTeam/Raiden/releases/download/${RAIDEN_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${RAIDEN_URL}" --output "${RAIDEN_TARBALL}"
tar --directory="$(dirname "${RAIDEN_TARBALL}")" --extract --file="${RAIDEN_TARBALL}"
echo 'RAIDEN_HOME=/tmp/raiden' >> "${GITHUB_ENV}"
echo '/tmp/raiden/bin' >> "${GITHUB_PATH}"
- name: Setup SerenityOS cross-compiler
if: false
run: |
declare -r SENNA_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Senna/releases/latest')")"
declare -r SENNA_TARBALL='/tmp/toolchain.tar.xz'
declare -r SENNA_URL="https://github.com/AmanoTeam/Senna/releases/download/${SENNA_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${SENNA_URL}" --output "${SENNA_TARBALL}"
tar --directory="$(dirname "${SENNA_TARBALL}")" --extract --file="${SENNA_TARBALL}"
echo 'SENNA_HOME=/tmp/senna' >> "${GITHUB_ENV}"
echo '/tmp/senna/bin' >> "${GITHUB_PATH}"
- name: Setup Kindle cross-compiler
if: false
run: |
declare -r KEL_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Kel/releases/latest')")"
declare -r KEL_TARBALL='/tmp/toolchain.tar.xz'
declare -r KEL_URL="https://github.com/AmanoTeam/Kel/releases/download/${KEL_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${KEL_URL}" --output "${KEL_TARBALL}"
tar --directory="$(dirname "${KEL_TARBALL}")" --extract --file="${KEL_TARBALL}"
echo 'KEL_HOME=/tmp/kel' >> "${GITHUB_ENV}"
echo '/tmp/kel/bin' >> "${GITHUB_PATH}"
- name: Setup PocketBook cross-compiler
if: false
run: |
declare -r NERO_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Nero/releases/latest')")"
declare -r NERO_TARBALL='/tmp/toolchain.tar.xz'
declare -r NERO_URL="https://github.com/AmanoTeam/Nero/releases/download/${NERO_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${NERO_URL}" --output "${NERO_TARBALL}"
tar --directory="$(dirname "${NERO_TARBALL}")" --extract --file="${NERO_TARBALL}"
echo 'NERO_HOME=/tmp/nero' >> "${GITHUB_ENV}"
echo '/tmp/nero/bin' >> "${GITHUB_PATH}"
- name: Setup reMarkable cross-compiler
if: false
run: |
declare -r NAN_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Nan/releases/latest')")"
declare -r NAN_TARBALL='/tmp/toolchain.tar.xz'
declare -r NAN_URL="https://github.com/AmanoTeam/Nan/releases/download/${NAN_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${NAN_URL}" --output "${NAN_TARBALL}"
tar --directory="$(dirname "${NAN_TARBALL}")" --extract --file="${NAN_TARBALL}"
echo 'NAN_HOME=/tmp/nan' >> "${GITHUB_ENV}"
echo '/tmp/nan/bin' >> "${GITHUB_PATH}"
- name: Setup Cervantes cross-compiler
if: false
run: |
declare -r NIL_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Nil/releases/latest')")"
declare -r NIL_TARBALL='/tmp/toolchain.tar.xz'
declare -r NIL_URL="https://github.com/AmanoTeam/Nil/releases/download/${NIL_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${NIL_URL}" --output "${NIL_TARBALL}"
tar --directory="$(dirname "${NIL_TARBALL}")" --extract --file="${NIL_TARBALL}"
echo 'NIL_HOME=/tmp/nil' >> "${GITHUB_ENV}"
echo '/tmp/nil/bin' >> "${GITHUB_PATH}"
- name: Setup Bookeen cross-compiler
if: false
run: |
declare -r AI_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Ai/releases/latest')")"
declare -r AI_TARBALL='/tmp/toolchain.tar.xz'
declare -r AI_URL="https://github.com/AmanoTeam/Ai/releases/download/${AI_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${AI_URL}" --output "${AI_TARBALL}"
tar --directory="$(dirname "${AI_TARBALL}")" --extract --file="${AI_TARBALL}"
echo 'AI_HOME=/tmp/ai' >> "${GITHUB_ENV}"
echo '/tmp/ai/bin' >> "${GITHUB_PATH}"
- name: Setup Kobo cross-compiler
if: false
run: |
declare -r KAL_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Kal/releases/latest')")"
declare -r KAL_TARBALL='/tmp/toolchain.tar.xz'
declare -r KAL_URL="https://github.com/AmanoTeam/Kal/releases/download/${KAL_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${KAL_URL}" --output "${KAL_TARBALL}"
tar --directory="$(dirname "${KAL_TARBALL}")" --extract --file="${KAL_TARBALL}"
echo 'KAL_HOME=/tmp/kal' >> "${GITHUB_ENV}"
echo '/tmp/kal/bin' >> "${GITHUB_PATH}"
- name: Setup Tizen cross-compiler
if: false
run: |
declare -r NUL_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --url 'https://api.github.com/repos/AmanoTeam/Nul/releases/latest')")"
declare -r NUL_TARBALL='/tmp/toolchain.tar.xz'
declare -r NUL_URL="https://github.com/AmanoTeam/Nul/releases/download/${NUL_TAG}/x86_64-unknown-linux-gnu.tar.xz"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${NUL_URL}" --output "${NUL_TARBALL}"
tar --directory="$(dirname "${NUL_TARBALL}")" --extract --file="${NUL_TARBALL}"
echo 'NUL_HOME=/tmp/nul' >> "${GITHUB_ENV}"
echo '/tmp/nul/bin' >> "${GITHUB_PATH}"
- name: Build with CMake
run: |
declare -ra targets=(
x86_64-unknown-linux-gnu
# hppa-unknown-openbsd
arm-unknown-openbsd
aarch64-unknown-openbsd
powerpc-unknown-openbsd
# powerpc64-unknown-openbsd
sparc64-unknown-openbsd
mips64-unknown-openbsd
mips64el-unknown-openbsd
riscv64-unknown-openbsd
riscv64-unknown-freebsd
# vax-unknown-netbsdelf
arm-kobo-linux-gnueabihf
arm-bookeen-linux-gnueabi
arm-obreey-linux-gnueabi
arm-cervantes-linux-gnueabi
arm-remarkable-linux-gnueabihf
arm-kindlepw2-linux-gnueabi
arm-kindle5-linux-gnueabi
arm-kindle-linux-gnueabi
arm-tizenwearable-linux-gnueabi
arm-tizenmobile-linux-gnueabi
arm-tizeniot-linux-gnueabi
arm-tizeniotheadless-linux-gnueabi
i386-tizenmobile-linux-gnueabi
i386-tizenwearable-linux-gnueabi
aarch64-tizeniot-linux-gnu
ia64-unknown-linux-gnu
aarch64-apple-darwin
aarch64-linux-android
aarch64-linux-gnu
aarch64-unknown-freebsd
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl
aarch64-w64-mingw32
alpha-linux-gnu
alpha-unknown-linux-gnu
alpha-unknown-netbsd
alpha-unknown-openbsd
arm-linux-gnueabi
arm-linux-gnueabihf
arm-unknown-linux-gnueabi
arm-unknown-linux-gnueabihf
arm-unknown-linux-musleabihf
armv7-w64-mingw32
armv7a-linux-androideabi
armv7l-unknown-linux-musleabihf
hppa-linux-gnu
hppa-unknown-linux-gnu
hppa-unknown-netbsd
i386-unknown-freebsd
i386-unknown-linux-gnu
i386-unknown-linux-musl
i386-unknown-netbsdelf
i386-unknown-openbsd
i586-unknown-haiku
i686-linux-android
i686-linux-gnu
i686-w64-mingw32
m68k-linux-gnu
mips-linux-gnu
mips-unknown-linux-gnu
mips-unknown-netbsd
mips64-linux-gnuabi64
mips64-unknown-linux-musl
mips64el-linux-gnuabi64
mips64el-unknown-linux-gnuabi64
mipsel-linux-gnu
mipsel-unknown-linux-gnu
mipsisa32r6-linux-gnu
mipsisa32r6el-linux-gnu
mipsisa64r6-linux-gnuabi64
mipsisa64r6el-linux-gnuabi64
powerpc-linux-gnu
powerpc-unknown-freebsd
powerpc-unknown-linux-gnu
powerpc-unknown-netbsd
powerpc64-linux-gnu
powerpc64-unknown-freebsd
powerpc64-unknown-freebsd_elfv2
powerpc64le-linux-gnu
powerpc64le-unknown-linux-gnu
powerpc64le-unknown-linux-musl
riscv64-linux-gnu
riscv64-unknown-linux-musl
s390-unknown-linux-gnu
s390x-linux-gnu
s390x-unknown-linux-gnu
s390x-unknown-linux-musl
sh4-linux-gnu
shle-unknown-netbsdelf
sparc-unknown-linux-gnu
sparc-unknown-netbsdelf
sparc64-linux-gnu
sparc64-unknown-freebsd
sparc64-unknown-netbsd
x86_64-apple-darwin
x86_64-linux-android
x86_64-linux-gnu
x86_64-linux-gnux32
x86_64-unknown-dragonfly
x86_64-unknown-freebsd
x86_64-unknown-haiku
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl
x86_64-unknown-netbsd
x86_64-unknown-openbsd
x86_64-w64-mingw32
x86_64h-apple-darwin
aarch64-unknown-serenity
x86_64-unknown-serenity
)
rm -rf submodules/curl && git clone https://github.com/curl/curl submodules/curl
cd submodules/curl && git checkout 46d7214ca98f26088c0882804ff61f8800d44343 && cd ../../
declare -r OUTPUT_DIRECTORY="$(realpath './output')"
mkdir --parent "${OUTPUT_DIRECTORY}"
mkdir build && cd build
for target in "${targets[@]}"; do
echo "Building for ${target}"
KAI_ENABLE_LTO='OFF'
if [[ "${target}" == *-apple-darwin ]] || [[ "${target}" == *-w64-mingw32 ]] || [[ "${target}" == *-unknown-openbsd ]]; then
KAI_ENABLE_LTO=OFF
fi
cmake -Wno-dev \
-DKAI_ENABLE_LTO="${KAI_ENABLE_LTO}" \
-DCMAKE_TOOLCHAIN_FILE="./.github/workflows/cmake_toolchains/${target}.cmake" \
-DCMAKE_INSTALL_PREFIX="${target}" \
-DCMAKE_BUILD_TYPE='MinSizeRel' ../ 1>/dev/null
pushd './ffmpeg-build'
make --jobs 1>/dev/null
pushd
cmake --build ./ --target ffmpeg -- --jobs 1>/dev/null
cmake --build ./ --target bearssl -- --jobs 1>/dev/null
cmake --build ./ -- --jobs 1>/dev/null
cmake --install ./ --strip 1>/dev/null
chmod 644 "${target}/lib/libav"* || true
if [[ "${target}" == *'mingw32' ]]; then
zip --recurse-paths -9 "${OUTPUT_DIRECTORY}/${target}.zip" "${target}" 1>/dev/null
else
tar --create --file=- "${target}" | xz --compress -9 > "${OUTPUT_DIRECTORY}/${target}.tar.xz"
fi
rm --force --recursive ./*
break
done
- name: Upload artifact
uses: actions/upload-artifact@main
with:
path: ./output
- name: Get tag name for release
if: startsWith(github.event.head_commit.message, 'Bump version')
run: echo "VERSION_TAG=${COMMIT_MESSAGE/* }" >> "${GITHUB_ENV}"
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
- name: Create release
if: startsWith(github.event.head_commit.message, 'Bump version')
uses: softprops/action-gh-release@master
with:
tag_name: v${{ env.VERSION_TAG }}
name: Kai v${{ env.VERSION_TAG }}
files: ./output/*
draft: true
prerelease: false
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}