From 5fa7960c312cb6c330f0f3973ab26cfdf7879d94 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 8 Oct 2022 21:32:46 +1000 Subject: [PATCH] CI: Fix/re-enable Mac builds Credit to TellowKrinkle for debugging the QtNetwork build issue. --- .github/workflows/rolling-release.yml | 87 +++++++++++++-------------- scripts/build-dependencies-mac.sh | 2 +- 2 files changed, 44 insertions(+), 45 deletions(-) diff --git a/.github/workflows/rolling-release.yml b/.github/workflows/rolling-release.yml index 790a73668..b203c6072 100644 --- a/.github/workflows/rolling-release.yml +++ b/.github/workflows/rolling-release.yml @@ -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 diff --git a/scripts/build-dependencies-mac.sh b/scripts/build-dependencies-mac.sh index 0919d715a..4e4f3f05f 100755 --- a/scripts/build-dependencies-mac.sh +++ b/scripts/build-dependencies-mac.sh @@ -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 ../../