2023-12-28 07:03:44 -07:00
|
|
|
name: macOS
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2024-07-29 16:43:15 -06:00
|
|
|
- ci/vcpkg-update
|
2023-12-28 07:03:44 -07:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-macos:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [x86_64, arm64]
|
|
|
|
|
|
|
|
name: ${{ matrix.arch }}
|
2024-02-07 14:27:04 -07:00
|
|
|
runs-on: macos-14
|
2023-12-28 07:03:44 -07:00
|
|
|
steps:
|
|
|
|
- name: Check out sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies for package building
|
|
|
|
run: |
|
2024-04-03 06:49:27 -06:00
|
|
|
brew install autoconf automake autoconf-archive libtool python-setuptools
|
2023-12-28 07:03:44 -07:00
|
|
|
- name: Set up CMake
|
|
|
|
uses: lukka/get-cmake@latest
|
|
|
|
- name: Set up vcpkg
|
|
|
|
uses: lukka/run-vcpkg@v11
|
|
|
|
with:
|
2024-07-29 16:43:15 -06:00
|
|
|
vcpkgGitCommitId: 1de2026f28ead93ff1773e6e680387643e914ea1
|
2023-12-28 07:03:44 -07:00
|
|
|
- name: Build
|
|
|
|
uses: lukka/run-cmake@v10
|
|
|
|
with:
|
|
|
|
configurePreset: release-mac-${{ matrix.arch }}
|
|
|
|
buildPreset: release-mac-${{ matrix.arch }}
|
|
|
|
- name: Compress app bundle
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cd build/release-mac-${{ matrix.arch }}
|
|
|
|
zip -r -y ../../macOS-${{ matrix.arch }}.zip melonDS.app
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: macOS-${{ matrix.arch }}
|
|
|
|
path: macOS-${{ matrix.arch }}.zip
|
2024-02-13 12:15:03 -07:00
|
|
|
retention-days: 1
|
2023-12-28 07:03:44 -07:00
|
|
|
|
|
|
|
universal-binary:
|
|
|
|
name: Universal binary
|
|
|
|
needs: [build-macos]
|
|
|
|
runs-on: macos-13
|
2024-02-07 14:27:04 -07:00
|
|
|
continue-on-error: true
|
2023-12-28 07:03:44 -07:00
|
|
|
steps:
|
|
|
|
- name: Download x86_64
|
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
name: macOS-x86_64
|
|
|
|
path: x86_64
|
|
|
|
- name: Download arm64
|
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
name: macOS-arm64
|
|
|
|
path: arm64
|
|
|
|
- name: Combine app bundles
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
unzip x86_64/*.zip -d x86_64
|
|
|
|
unzip arm64/*.zip -d arm64
|
|
|
|
lipo {x86_64,arm64}/melonDS.app/Contents/MacOS/melonDS -create -output melonDS
|
|
|
|
cp -a arm64/melonDS.app melonDS.app
|
|
|
|
cp melonDS melonDS.app/Contents/MacOS/melonDS
|
|
|
|
codesign -s - --deep melonDS.app
|
|
|
|
zip -r -y macOS-universal.zip melonDS.app
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: macOS-universal
|
|
|
|
path: macOS-universal.zip
|
2024-02-13 12:15:03 -07:00
|
|
|
# - name: Clean up architecture-specific artifacts
|
|
|
|
# uses: geekyeggo/delete-artifact@v4
|
|
|
|
# with:
|
|
|
|
# failOnError: false
|
|
|
|
# name: |
|
|
|
|
# macOS-x86_64
|
|
|
|
# macOS-arm64
|