Skip to content

Commit

Permalink
build(macos): add build strategy matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Mar 4, 2024
1 parent 529f1b8 commit e8d1c9c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 12 deletions.
47 changes: 37 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 /usr -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
+------------+------------------------------------------------------------+
Expand Down

0 comments on commit e8d1c9c

Please sign in to comment.