CI: Fix/re-enable Mac builds

Credit to TellowKrinkle for debugging the QtNetwork build issue.
This commit is contained in:
Connor McLaughlin 2022-10-08 21:32:46 +10:00
parent 42768c3101
commit 5fa7960c31
2 changed files with 44 additions and 45 deletions

View file

@ -220,47 +220,46 @@ jobs:
# path: "build/duckstation-qt-x64.AppImage.zsync"
# macos-build:
# runs-on: macos-11
# steps:
# - uses: actions/checkout@v2.3.1
# with:
# fetch-depth: 0
#
# - name: Install packages
# shell: bash
# run: |
# brew install curl ninja
#
# - name: Cache Dependencies
# id: cache-deps-mac
# uses: actions/cache@v3
# with:
# path: ~/deps
# key: deps-mac ${{ hashFiles('scripts/build-dependencies-mac.sh') }}
#
# - name: Build Dependencies
# if: steps.cache-deps-mac.outputs.cache-hit != 'true'
# run: scripts/build-dependencies-mac.sh
#
# - name: Compile and zip .app
# shell: bash
# run: |
# mkdir build
# cd build
# ../scripts/make-universal-macos-binary.sh ..
# zip -r duckstation-mac-release.zip DuckStation.app/
#
# - name: Upload macOS .app
# uses: actions/upload-artifact@v1
# with:
# name: "macos"
# path: "build/duckstation-mac-release.zip"
macos-build:
runs-on: macos-11
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- name: Install packages
shell: bash
run: |
brew install curl ninja
- name: Cache Dependencies
id: cache-deps-mac
uses: actions/cache@v3
with:
path: ~/deps
key: deps-mac ${{ hashFiles('scripts/build-dependencies-mac.sh') }}
- name: Build Dependencies
if: steps.cache-deps-mac.outputs.cache-hit != 'true'
run: scripts/build-dependencies-mac.sh
- name: Compile and zip .app
shell: bash
run: |
mkdir build
cd build
../scripts/make-universal-macos-binary.sh ..
zip -r duckstation-mac-release.zip DuckStation.app/
- name: Upload macOS .app
uses: actions/upload-artifact@v1
with:
name: "macos"
path: "build/duckstation-mac-release.zip"
create-release:
#needs: [windows-build, windows-arm64-build, linux-build, macos-build]
needs: [windows-build, windows-arm64-build, linux-build]
needs: [windows-build, windows-arm64-build, linux-build, macos-build]
runs-on: "ubuntu-20.04"
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
steps:
@ -289,10 +288,10 @@ jobs:
with:
name: "linux-x64-appimage-qt"
# - name: Download MacOS Artifact
# uses: actions/download-artifact@v1
# with:
# name: "macos"
- name: Download MacOS Artifact
uses: actions/download-artifact@v1
with:
name: "macos"
- name: Create preview release
if: github.ref == 'refs/heads/master'
@ -308,7 +307,7 @@ jobs:
windows-arm64/duckstation-windows-arm64-release.zip
windows-arm64/duckstation-windows-arm64-release-symbols.zip
linux-x64-appimage-qt/DuckStation-x64.AppImage
# macos/duckstation-mac-release.zip
macos/duckstation-mac-release.zip
# linux-x64-appimage-qt/duckstation-qt-x64.AppImage
# linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
# linux-x64-appimage-nogui/duckstation-nogui-x64.AppImage
@ -328,7 +327,7 @@ jobs:
windows-arm64/duckstation-windows-arm64-release.zip
windows-arm64/duckstation-windows-arm64-release-symbols.zip
linux-x64-appimage-qt/DuckStation-x64.AppImage
# macos/duckstation-mac-release.zip
macos/duckstation-mac-release.zip
# linux-x64-appimage-qt/duckstation-qt-x64.AppImage
# linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
# linux-x64-appimage-nogui/duckstation-nogui-x64.AppImage

View file

@ -123,7 +123,7 @@ tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
mkdir build
cd build
cmake -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_optimize_size=ON -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF ..
cmake -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_optimize_size=ON -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF ..
cmake --build . --parallel
cmake --install .
cd ../../