From 3a740ee4a7722f1ac73d1d4d0059947617697a8a Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:33:40 -0500 Subject: [PATCH] build(macos): add build strategy matrix --- .github/workflows/CI.yml | 47 +++++++++++++++++++++++++++++++--------- README.rst | 4 ++-- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 60f555c2166..93d9c890937 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -506,11 +506,23 @@ jobs: prerelease: ${{ needs.setup_release.outputs.pre_release }} build_mac: - name: MacOS - runs-on: macos-11 needs: [check_changelog, setup_release] env: BOOST_VERSION: 1.83.0 + strategy: + fail-fast: false # false to test all, true to fail entire job if any fail + matrix: + include: + # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories + # while GitHub has larger macOS runners, they are not available for our repos :( + - os_version: "12" + arch: "x86_64" + - os_version: "13" + arch: "x86_64" + - os_version: "14" + arch: "arm64" + name: macOS-${{ matrix.os_version }} ${{ matrix.arch }} + runs-on: macos-${{ matrix.os_version }} steps: - name: Checkout @@ -531,6 +543,9 @@ jobs: ln -sf $(find /usr/local/Cellar -type d -name "openssl" -path "*/openssl@3/*/include" | head -n 1) \ /usr/local/include/openssl + # find where evp.h is located on the system + find / -type f -name "evp.h" + # fix opus header not found ln -sf $(find /usr/local/Cellar -type d -name "opus" -path "*/opus/*/include" | head -n 1) \ /usr/local/include/opus @@ -594,15 +609,13 @@ jobs: # package cpack -G DragNDrop - mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine.dmg - - # cpack -G Bundle - # mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-bundle.dmg + mv ./cpack_artifacts/Sunshine.dmg \ + ../artifacts/sunshine-macos-${{ matrix.os_version }}-${{ matrix.arch }}.dmg - name: Upload Artifacts uses: actions/upload-artifact@v4 with: - name: sunshine-macos + name: sunshine-macos-${{ matrix.os_version }}-${{ matrix.arch }} path: artifacts/ - name: Create/Update GitHub Release @@ -620,9 +633,22 @@ jobs: prerelease: ${{ needs.setup_release.outputs.pre_release }} build_mac_port: - name: Macports needs: [check_changelog, setup_release] - runs-on: macos-11 + strategy: + fail-fast: false # false to test all, true to fail entire job if any fail + matrix: + include: + # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories + # while GitHub has larger macOS runners, they are not available for our repos :( + - os_version: "12" + arch: "x86_64" + release: true + - os_version: "13" + arch: "x86_64" + - os_version: "14" + arch: "arm64" + name: Macports (macOS-${{ matrix.os_version }} ${{ matrix.arch }}) + runs-on: macos-${{ matrix.os_version }} steps: - name: Checkout @@ -725,13 +751,14 @@ jobs: echo "::endgroup::" - name: Upload Artifacts + if: ${{ matrix.release == 'true' }} uses: actions/upload-artifact@v4 with: name: sunshine-macports path: artifacts/ - name: Create/Update GitHub Release - if: ${{ needs.setup_release.outputs.create_release == 'true' }} + if: ${{ needs.setup_release.outputs.create_release == 'true' && matrix.release == 'true' }} uses: ncipollo/release-action@v1 with: name: ${{ needs.setup_release.outputs.release_name }} diff --git a/README.rst b/README.rst index fbc78658668..11508d976e3 100644 --- a/README.rst +++ b/README.rst @@ -32,11 +32,11 @@ System Requirements +------------+------------------------------------------------------------+ | OS | Windows: 10+ (Windows Server not supported) | | +------------------------------------------------------------+ -| | macOS: 11.7+ | +| | macOS: 12+ | | +------------------------------------------------------------+ | | Linux/Debian: 11 (bullseye) | | +------------------------------------------------------------+ -| | Linux/Fedora: 37+ | +| | Linux/Fedora: 38+ | | +------------------------------------------------------------+ | | Linux/Ubuntu: 20.04+ (focal) | +------------+------------------------------------------------------------+