mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 23:25:40 +12:00
Qt build: build Mac ARM64 and Universal binaries
This commit is contained in:
parent
60b0e3db85
commit
700a7575d7
1 changed files with 52 additions and 6 deletions
58
.github/workflows/Qt_Build.yml
vendored
58
.github/workflows/Qt_Build.yml
vendored
|
@ -51,6 +51,11 @@ jobs:
|
||||||
path: upload
|
path: upload
|
||||||
|
|
||||||
MacOS:
|
MacOS:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [x86_64, arm64]
|
||||||
|
|
||||||
|
name: MacOS-${{ matrix.arch }}
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -69,11 +74,17 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
brew install dylibbundler imagemagick
|
brew install dylibbundler imagemagick
|
||||||
|
|
||||||
- name: Install qt
|
- name: Install Qt
|
||||||
run: brew install qt && which macdeployqt
|
uses: jurplel/install-qt-action@v3
|
||||||
|
with:
|
||||||
|
aqtversion: '==3.1.*'
|
||||||
|
version: '6.8.1'
|
||||||
|
host: 'mac'
|
||||||
|
target: 'desktop'
|
||||||
|
arch: 'clang_64'
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_USER_BUILD=ON -DENABLE_QT_GUI=ON
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_USER_BUILD=ON -DENABLE_QT_GUI=ON -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||||
|
@ -87,13 +98,48 @@ jobs:
|
||||||
run: codesign --force -s - -vvvv Alber.app
|
run: codesign --force -s - -vvvv Alber.app
|
||||||
|
|
||||||
- name: Zip it up
|
- name: Zip it up
|
||||||
run: zip -r Alber Alber.app
|
run: zip -r Alber-${{ matrix.arch }} Alber.app
|
||||||
|
|
||||||
- name: Upload MacOS App
|
- name: Upload MacOS App
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: MacOS Alber App Bundle
|
name: MacOS Alber App Bundle (${{ matrix.arch }})
|
||||||
path: 'Alber.zip'
|
path: Alber-${{ matrix.arch }}.zip
|
||||||
|
|
||||||
|
MacOS-Universal:
|
||||||
|
name: MacOS-Universal
|
||||||
|
needs: [MacOS]
|
||||||
|
runs-on: macos-13
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download x86_64
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: MacOS Alber App Bundle (x86_64)
|
||||||
|
path: x86_64
|
||||||
|
- name: Download ARM64
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: MacOS Alber App Bundle (arm64)
|
||||||
|
path: arm64
|
||||||
|
- name: Combine app bundles
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
unzip x86_64/*.zip -d x86_64
|
||||||
|
unzip arm64/*.zip -d arm64
|
||||||
|
lipo {x86_64,arm64}/Alber.app/Contents/MacOS/Alber -create -output Alber
|
||||||
|
cp -v -a arm64/Alber.app Alber.app
|
||||||
|
cp -v Alber Alber.app/Contents/MacOS/Alber
|
||||||
|
# Mix in x86_64 files that do not appear in the ARM64 build (e.g. libvulkan)
|
||||||
|
cp -v -R -n x86_64/Alber.app/* Alber.app/ || true
|
||||||
|
codesign --force -s - -vvvv Alber.app
|
||||||
|
zip -r -y Alber-universal.zip Alber.app
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: MacOS Alber App Bundle (universal)
|
||||||
|
path: Alber-universal.zip
|
||||||
|
|
||||||
Linux:
|
Linux:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
Loading…
Add table
Reference in a new issue