-
-
Notifications
You must be signed in to change notification settings - Fork 81
399 lines (352 loc) · 15.7 KB
/
build-weekly.yaml
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
name: Build chiaki-ng weekly
on:
workflow_dispatch:
schedule:
- cron: "30 1 * * 1"
jobs:
create-release:
name: Upload weekly release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: ncipollo/release-action@v1
id: maker
with:
prerelease: true
commit: ${{ github.sha }}
tag: weekly-canary-release-${{ github.sha }}
allowUpdates: true
outputs:
upload_url: ${{ steps.maker.outputs.upload_url }}
build-win_x64:
name: Build chiaki-ng win_x64 (VC)
runs-on: windows-latest
permissions:
contents: write
needs: create-release
env:
CC: clang-cl.exe
CXX: clang-cl.exe
VULKAN_SDK: C:\VulkanSDK\
triplet: x64-windows
vcpkg_baseline: 42bb0d9e8d4cf33485afb9ee2229150f79f61a1f
VCPKG_INSTALLED_DIR: ./vcpkg_installed/
dep_folder: deps
libplacebo_tag: v7.349.0
defaults:
run:
shell: powershell
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Vulkan
run: |
$ProgressPreference = 'SilentlyContinue'
$ver = (Invoke-WebRequest -Uri "https://vulkan.lunarg.com/sdk/latest.json" | ConvertFrom-Json).windows
echo Version $ver
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$ver/windows/VulkanSDK-$ver-Installer.exe" -OutFile VulkanSDK.exe
echo Downloaded
.\VulkanSDK.exe --root ${{ env.VULKAN_SDK }} --accept-licenses --default-answer --confirm-command install
- name: Set up Ninja
run: choco install ninja
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: 18
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
architecture: "x64"
- name: Install pip dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools wheel
python3 -m pip install --user --upgrade scons protobuf grpcio-tools pyinstaller
python3 -m pip install --user --upgrade meson
python3 -c 'import google.protobuf; print(google.protobuf.__file__)'
- name: Setup Qt
uses: jurplel/install-qt-action@v4
with:
version: "6.7.*"
host: 'windows'
target: 'desktop'
modules: 'qtwebengine qtpositioning qtwebchannel qtwebsockets qtserialport'
- name: Setup ffmpeg
run: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/r52/FFmpeg-Builds/releases/download/latest/ffmpeg-n7.1-latest-win64-gpl-shared-7.1.zip" -OutFile ".\ffmpeg-n7.1-latest-win64-gpl-shared-7.1.zip"
Expand-Archive -LiteralPath "ffmpeg-n7.1-latest-win64-gpl-shared-7.1.zip" -DestinationPath "."
Rename-Item "ffmpeg-n7.1-latest-win64-gpl-shared-7.1" "${{ env.dep_folder }}"
- name: Build SPIRV-Cross
run: |
git clone https://github.com/KhronosGroup/SPIRV-Cross.git
cd SPIRV-Cross
cmake `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}\${{ env.dep_folder }}" `
-DSPIRV_CROSS_SHARED=ON `
-S . `
-B build `
-G Ninja
cmake --build build --config Release
cmake --install build
- name: Setup shaderc
run: |
$ProgressPreference = 'SilentlyContinue'
$url = ((Invoke-WebRequest -UseBasicParsing -Uri "https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2019_release.html").Content | Select-String -Pattern 'url=(.*)"').Matches.Groups[1].Value
Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile .\shaderc.zip
Expand-Archive -LiteralPath "shaderc.zip" -DestinationPath "."
cp "./install/*" "./${{ env.dep_folder }}" -Force -Recurse
rm "./install" -r -force
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{ env.vcpkg_baseline }}
runVcpkgInstall: true
vcpkgJsonGlob: "vcpkg.json"
- name: Build libplacebo
run: |
git clone --recursive https://github.com/haasn/libplacebo.git
cd libplacebo
git checkout --recurse-submodules ${{ env.libplacebo_tag }}
meson setup `
--prefix "${{ github.workspace }}\${{ env.dep_folder }}" `
--native-file ../meson.ini `
"--pkg-config-path=['${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\lib\pkgconfig','${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\share\pkgconfig','${{ github.workspace }}\${{ env.dep_folder }}\lib\pkgconfig']" `
"--cmake-prefix-path=['${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}', '${{ env.VULKAN_SDK }}', '${{ github.workspace }}\${{ env.dep_folder }}']" `
-Dc_args="/I ${{ env.VULKAN_SDK }}Include" `
-Dcpp_args="/I ${{ env.VULKAN_SDK }}Include" `
-Dc_link_args="/LIBPATH:${{ env.VULKAN_SDK }}Lib" `
-Dcpp_link_args="/LIBPATH:${{ env.VULKAN_SDK }}Lib" `
-Ddemos=false `
./build
ninja -C./build
ninja -C./build install
- name: Apply Patches
run: |
git apply --ignore-whitespace --verbose --directory=third-party/gf-complete/ scripts/windows-vc/gf-complete.patch
git apply --ignore-whitespace --verbose scripts/windows-vc/libplacebo-pc.patch
- name: Configure chiaki-ng
run: |
cmake `
-S . `
-B build `
-G Ninja `
-DCMAKE_TOOLCHAIN_FILE:STRING="vcpkg/scripts/buildsystems/vcpkg.cmake" `
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE `
-DCMAKE_BUILD_TYPE=Release `
-DCHIAKI_ENABLE_CLI=OFF `
-DCHIAKI_GUI_ENABLE_SDL_GAMECONTROLLER=ON `
-DCHIAKI_ENABLE_STEAMDECK_NATIVE=OFF `
-DCHIAKI_ENABLE_STEAM_SHORTCUT=OFF `
-DPYTHON_EXECUTABLE="${{ env.pythonLocation }}\python.exe" `
-DCMAKE_PREFIX_PATH="${{ github.workspace }}\${{ env.dep_folder }};${{ env.VULKAN_SDK }}"
- name: Build chiaki-ng
run: |
cmake --build build --config Release --clean-first --target chiaki
- name: Prepare Qt deployment package
run: |
mkdir chiaki-ng-Win
cp build\gui\chiaki.exe chiaki-ng-Win
cp scripts\qtwebengine_import.qml gui\src\qml\
cp "${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\bin\libcrypto-*-x64.dll" chiaki-ng-Win
cp "${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\bin\libssl-*-x64.dll" chiaki-ng-Win
cp "${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\bin\SDL2.dll" chiaki-ng-Win
cp "${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\bin\hidapi.dll" chiaki-ng-Win
cp "${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\bin\fftw3.dll" chiaki-ng-Win
cp "${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\bin\opus.dll" chiaki-ng-Win
cp "${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\bin\libspeexdsp.dll" chiaki-ng-Win
cp "${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\bin\lcms2.dll" chiaki-ng-Win
cp "${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\bin\miniupnpc.dll" chiaki-ng-Win
cp "${{ github.workspace }}\vcpkg_installed\${{ env.triplet }}\bin\json-c.dll" chiaki-ng-Win
cp "${{ github.workspace }}\${{ env.dep_folder }}\bin\swresample-*.dll" chiaki-ng-Win
cp "${{ github.workspace }}\${{ env.dep_folder }}\bin\avcodec-*.dll" chiaki-ng-Win
cp "${{ github.workspace }}\${{ env.dep_folder }}\bin\avutil-*.dll" chiaki-ng-Win
cp "${{ github.workspace }}\${{ env.dep_folder }}\bin\avformat-*.dll" chiaki-ng-Win
cp "${{ github.workspace }}\${{ env.dep_folder }}\bin\libplacebo-*.dll" chiaki-ng-Win
cp "${{ github.workspace }}\${{ env.dep_folder }}\bin\shaderc_shared.dll" chiaki-ng-Win
cp "${{ github.workspace }}\${{ env.dep_folder }}\bin\spirv-cross-c-shared.dll" chiaki-ng-Win
windeployqt.exe --no-translations --qmldir=gui\src\qml --release chiaki-ng-Win\chiaki.exe
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/[email protected]
with:
path: "scripts/chiaki-ng.iss"
options: /O+
- name: Rename installer
run: |
cp chiaki-ng-windows-installer.exe chiaki-ng-win_x64-VC-installer.exe
- name: Upload chiaki-ng Artifact
uses: nanoufo/action-upload-artifacts-and-release-assets@v2
with:
path: |
chiaki-ng-windows-installer.exe
upload-release-files: true
if-no-files-found: error
release-upload-url: ${{ needs.create-release.outputs.upload_url }}
build-mac_arm64_github:
name: Build macOSX arm64 version Github
runs-on: macos-14
permissions:
contents: write
needs: create-release
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install protobuf
run: |
pip3 install --user protobuf --break-system-packages
- name: Install brew dependencies
run: |
brew update
brew uninstall pkgconfig || true
brew install qt@6 ffmpeg pkgconfig opus openssl cmake ninja nasm sdl2 protobuf speexdsp libplacebo wget python-setuptools json-c miniupnpc
- name: Configure chiaki-ng
run: |
cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCHIAKI_ENABLE_CLI=OFF -DCHIAKI_ENABLE_STEAMDECK_NATIVE=OFF -DCMAKE_PREFIX_PATH="$(brew --prefix)/opt/@openssl@3;$(brew --prefix)/opt/qt@6"
- name: Build chiaki-ng
run: |
export CPATH=$(brew --prefix)/opt/ffmpeg/include
cmake --build build --config Release --clean-first --target chiaki
- name: Deploy chiaki-ng
run: |
cp -a build/gui/chiaki.app chiaki-ng.app
cp scripts/qtwebengine_import.qml gui/src/qml/
$(brew --prefix)/opt/qt@6/bin/macdeployqt chiaki-ng.app -qmldir="$PWD/gui/src/qml" -libpath=$(brew --prefix)/lib
mkdir -p chiaki-ng.app/Contents/Resources/vulkan/icd.d
wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.9/MoltenVK-macos.tar && tar xf MoltenVK-macos.tar
cp MoltenVK/MoltenVK/dylib/macOS/* chiaki-ng.app/Contents/Resources/vulkan/icd.d
$(brew --prefix)/opt/qt@6/bin/macdeployqt chiaki-ng.app -qmldir="$PWD/gui/src/qml" -libpath=$(brew --prefix)/lib
ln -s ../../../../../../../Frameworks chiaki-ng.app/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents
ln -s libvulkan.1.dylib chiaki-ng.app/Contents/Frameworks/vulkan
codesign --force --entitlements gui/entitlements.xml --deep --sign - chiaki-ng.app
hdiutil create -srcfolder chiaki-ng.app chiaki-ng.dmg
codesign --force --entitlements gui/entitlements.xml --deep --sign - chiaki-ng.dmg
cp chiaki-ng.dmg chiaki-ng-macos_arm64-Release.dmg
- name: Upload chiaki-ng Artifact
uses: nanoufo/action-upload-artifacts-and-release-assets@v2
with:
path: |
chiaki-ng-macos_arm64-Release.dmg
if-no-files-found: error
upload-release-files: true
release-upload-url: ${{ needs.create-release.outputs.upload_url }}
build-appimage_x64:
name: Build chiaki-ng appimage_x64
runs-on: ubuntu-latest
permissions:
contents: write
needs: create-release
steps:
- name: Setup Podman
run: |
sudo apt update
sudo apt-get -y install podman
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
path: 'chiaki-ng'
- name: Add QmlWebEngine Import
working-directory: chiaki-ng
run: |
cp scripts/qtwebengine_import.qml gui/src/qml/
- name: Run build script
working-directory: chiaki-ng
run: |
set -xe
podman run --rm \
-v "`pwd`:/build/chiaki" \
-w "/build/chiaki" \
--device /dev/fuse \
--cap-add SYS_ADMIN \
-t docker.io/streetpea/chiaki-ng-builder:qt6.7 \
/bin/bash -c "sudo -E scripts/build-appimage.sh /build/appdir"
cp appimage/chiaki-ng.AppImage appimage/chiaki-ng.AppImage_x86_64
- name: Upload chiaki-ng Artifact
uses: nanoufo/action-upload-artifacts-and-release-assets@v2
with:
path: |
chiaki-ng/appimage/chiaki-ng.AppImage_x86_64
upload-release-files: true
if-no-files-found: error
release-upload-url: ${{ needs.create-release.outputs.upload_url }}
build-appimage_arm64:
name: Build chiaki-ng appimage_arm64
runs-on: ubuntu-latest
permissions:
contents: write
needs: create-release
steps:
- name: Setup Podman
run: |
sudo apt update
sudo apt-get -y install podman
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
path: 'chiaki-ng'
- name: Add QmlWebEngine Import
working-directory: chiaki-ng
run: |
cp scripts/qtwebengine_import.qml gui/src/qml/
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: "arm64"
- name: Run build script
working-directory: chiaki-ng
run: |
set -xe
podman run --rm \
-v "`pwd`:/build/chiaki" \
-w "/build/chiaki" \
--platform linux/arm64 \
--device /dev/fuse \
--cap-add SYS_ADMIN \
-t docker.io/streetpea/chiaki-ng-builder:qt6.7 \
/bin/bash -c "sudo -E scripts/build-appimage.sh /build/appdir"
cp appimage/chiaki-ng.AppImage appimage/chiaki-ng.AppImage_arm64
- name: Upload chiaki-ng Artifact
uses: nanoufo/action-upload-artifacts-and-release-assets@v2
with:
path: |
chiaki-ng/appimage/chiaki-ng.AppImage_arm64
upload-release-files: true
if-no-files-found: error
release-upload-url: ${{ needs.create-release.outputs.upload_url }}
build-switch_x64:
name: Build chiaki-ng switch_x64
runs-on: ubuntu-latest
permissions:
contents: write
needs: create-release
steps:
- name: Setup Docker
run: |
sudo apt update
sudo apt-get -y install docker-ce-cli
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
path: 'chiaki-ng'
- name: Run build script
working-directory: chiaki-ng
run: |
chmod +x scripts/switch/run-docker-build-chiaki.sh
scripts/switch/run-docker-build-chiaki.sh
- name: Upload chiaki-ng Artifact
uses: nanoufo/action-upload-artifacts-and-release-assets@v2
with:
path: |
chiaki-ng/build_switch/switch/chiaki-ng.nro
upload-release-files: true
if-no-files-found: error
release-upload-url: ${{ needs.create-release.outputs.upload_url }}