Build chiaki-ng macOSX arm64 #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build chiaki-ng macOSX arm64 | |
on: | |
workflow_dispatch: | |
env: | |
QT_PATH: "/opt/qt" | |
QT_VERSION: "6.8.2" | |
jobs: | |
build-mac_arm64_github: | |
name: Build macOSX arm64 version Github | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install protobuf | |
run: | | |
pip3 install --user protobuf aqtinstall --break-system-packages | |
- name: Install brew dependencies | |
run: | | |
brew update | |
brew uninstall pkgconfig || true | |
brew install --force ffmpeg pkgconfig opus openssl cmake ninja nasm sdl2 protobuf speexdsp libplacebo wget python-setuptools json-c miniupnpc | |
- name: Install qt | |
run: | | |
aqt install-qt -O "${HOME}/${QT_PATH}" mac desktop "${QT_VERSION}" clang_64 -m qtpositioning qtwebchannel qtwebsockets qtserialport qtwebengine | |
- 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 | |
export PATH="${HOME}/${QT_PATH}/${QT_VERSION}/clang_64/bin:${PATH}" | |
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/ | |
export PATH="${HOME}/${QT_PATH}/${QT_VERSION}/clang_64/bin:${PATH}" | |
macdeployqt chiaki-ng.app -qmldir="$PWD/gui/src/qml" -libpath=$(brew --prefix)/lib -libpath=${HOME}/${QT_PATH}/${QT_VERSION}/clang_64/bin | |
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 | |
macdeployqt chiaki-ng.app -qmldir="$PWD/gui/src/qml" -libpath=$(brew --prefix)/lib -libpath=${HOME}/${QT_PATH}/${QT_VERSION}/clang_64/bin | |
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 | |
- name: Upload chiaki-ng Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chiaki-ng-macos_arm64-Release | |
path: chiaki-ng.dmg | |
if-no-files-found: error | |
retention-days: 7 |