-
-
Notifications
You must be signed in to change notification settings - Fork 954
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2216 from LizardByte/nightly
v0.22.1
- Loading branch information
Showing
41 changed files
with
604 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# ensure dockerfiles are checked out with LF line endings | ||
Dockerfile text eol=lf | ||
*.dockerfile text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -505,124 +505,111 @@ jobs: | |
discussionCategory: announcements | ||
prerelease: ${{ needs.setup_release.outputs.pre_release }} | ||
|
||
build_mac: | ||
name: MacOS | ||
runs-on: macos-11 | ||
build_mac_brew: | ||
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" | ||
release: true | ||
- os_version: "13" | ||
- os_version: "14" | ||
name: Homebrew (macOS-${{ matrix.os_version }}) | ||
runs-on: macos-${{ matrix.os_version }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Dependencies MacOS | ||
- name: Setup Dependencies Homebrew | ||
run: | | ||
# install dependencies using homebrew | ||
brew install cmake curl miniupnpc node openssl opus pkg-config | ||
# fix openssl header not found | ||
# ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl | ||
# by installing boost from source, several headers cannot be found... | ||
# the above commented out link only works if boost is installed from homebrew... does not make sense | ||
ln -sf $(find /usr/local/Cellar -type d -name "openssl" -path "*/openssl@3/*/include" | head -n 1) \ | ||
/usr/local/include/openssl | ||
brew install cmake | ||
# 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 | ||
- name: Configure formula | ||
run: | | ||
# variables for formula | ||
branch=${GITHUB_HEAD_REF} | ||
# fix miniupnpc header not found | ||
ln -sf $(find /usr/local/Cellar -type d -name "miniupnpc" -path "*/miniupnpc/*/include" | head -n 1) \ | ||
/usr/local/include/miniupnpc | ||
# check the branch variable | ||
if [ -z "$branch" ] | ||
then | ||
echo "This is a PUSH event" | ||
clone_url=${{ github.event.repository.clone_url }} | ||
branch="${{ github.ref_name }}" | ||
else | ||
echo "This is a PR event" | ||
clone_url=${{ github.event.pull_request.head.repo.clone_url }} | ||
branch="${{ github.event.pull_request.head.ref }}" | ||
fi | ||
echo "Branch: ${branch}" | ||
echo "Clone URL: ${clone_url}" | ||
- name: Install Boost | ||
# installing boost from homebrew takes 30 minutes in a GitHub runner | ||
run: | | ||
export BOOST_ROOT=${HOME}/boost-${BOOST_VERSION} | ||
# install boost | ||
wget \ | ||
https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}.tar.gz \ | ||
--progress=bar:force:noscroll -q --show-progress | ||
tar xf boost-${BOOST_VERSION}.tar.gz | ||
cd boost-${BOOST_VERSION} | ||
# libdir should be set by --prefix but isn't | ||
./bootstrap.sh \ | ||
--prefix=${BOOST_ROOT} \ | ||
--libdir=${BOOST_ROOT}/lib \ | ||
--with-libraries=locale,log,program_options,system,thread | ||
./b2 headers | ||
./b2 install \ | ||
--prefix=${BOOST_ROOT} \ | ||
--libdir=${BOOST_ROOT}/lib \ | ||
-j$(sysctl -n hw.ncpu) \ | ||
link=shared,static \ | ||
variant=release \ | ||
cxxflags=-std=c++14 \ | ||
cxxflags=-stdlib=libc++ \ | ||
linkflags=-stdlib=libc++ | ||
# put boost in cmake prefix path | ||
echo "BOOST_ROOT=${BOOST_ROOT}" >> ${GITHUB_ENV} | ||
- name: Build MacOS | ||
env: | ||
BRANCH: ${{ github.head_ref || github.ref_name }} | ||
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }} | ||
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake \ | ||
-DBUILD_WERROR=ON \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-DSUNSHINE_ASSETS_DIR=local/sunshine/assets \ | ||
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \ | ||
-DGITHUB_BRANCH="${branch}" \ | ||
-DGITHUB_CLONE_URL="${clone_url}" \ | ||
-DSUNSHINE_CONFIGURE_HOMEBREW=ON \ | ||
-DSUNSHINE_CONFIGURE_ONLY=ON \ | ||
.. | ||
make -j $(sysctl -n hw.ncpu) | ||
- name: Package MacOS | ||
run: | | ||
mkdir -p artifacts | ||
cd build | ||
cd .. | ||
# package | ||
cpack -G DragNDrop | ||
mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine.dmg | ||
# copy formula to artifacts | ||
mkdir -p homebrew | ||
cp -f ./build/sunshine.rb ./homebrew/sunshine.rb | ||
# cpack -G Bundle | ||
# mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-bundle.dmg | ||
# testing | ||
cat ./homebrew/sunshine.rb | ||
- name: Upload Artifacts | ||
if: ${{ matrix.release }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sunshine-macos | ||
path: artifacts/ | ||
name: sunshine-homebrew | ||
path: homebrew/ | ||
|
||
- name: Create/Update GitHub Release | ||
if: ${{ needs.setup_release.outputs.create_release == 'true' }} | ||
uses: ncipollo/release-action@v1 | ||
- name: Should Publish Homebrew Formula | ||
id: homebrew_publish | ||
run: | | ||
PUBLISH=false | ||
if [[ \ | ||
"${{ matrix.release }}" == "true" && \ | ||
"${{ github.repository_owner }}" == "LizardByte" && \ | ||
"${{ needs.setup_release.outputs.create_release }}" == "true" && \ | ||
"${{ github.ref }}" == "refs/heads/master" \ | ||
]]; then | ||
PUBLISH=true | ||
fi | ||
echo "publish=${PUBLISH}" >> $GITHUB_OUTPUT | ||
- name: Validate and Publish Homebrew Formula | ||
uses: LizardByte/[email protected] | ||
with: | ||
name: ${{ needs.setup_release.outputs.release_name }} | ||
tag: ${{ needs.setup_release.outputs.release_tag }} | ||
commit: ${{ needs.setup_release.outputs.release_commit }} | ||
artifacts: "*artifacts/*" | ||
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb | ||
git_email: ${{ secrets.GH_BOT_EMAIL }} | ||
git_username: ${{ secrets.GH_BOT_NAME }} | ||
publish: ${{ steps.homebrew_publish.outputs.publish }} | ||
token: ${{ secrets.GH_BOT_TOKEN }} | ||
allowUpdates: true | ||
body: ${{ needs.setup_release.outputs.release_body }} | ||
discussionCategory: announcements | ||
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" | ||
release: true | ||
- os_version: "13" | ||
- os_version: "14" | ||
name: Macports (macOS-${{ matrix.os_version }}) | ||
runs-on: macos-${{ matrix.os_version }} | ||
|
||
steps: | ||
- name: Checkout | ||
|
@@ -725,13 +712,14 @@ jobs: | |
echo "::endgroup::" | ||
- name: Upload Artifacts | ||
if: ${{ matrix.release }} | ||
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 }} | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
name: ${{ needs.setup_release.outputs.release_name }} | ||
|
@@ -814,11 +802,15 @@ jobs: | |
- name: Package Windows Debug Info | ||
working-directory: build | ||
run: | | ||
# save the original binaries with debug info | ||
# use .dbg file extension for binaries to avoid confusion with real packages | ||
Get-ChildItem -File -Recurse | ` | ||
% { Rename-Item -Path $_.PSPath -NewName $_.Name.Replace(".exe",".dbg") } | ||
# save the binaries with debug info | ||
7z -r ` | ||
"-xr!CMakeFiles" ` | ||
"-xr!cpack_artifacts" ` | ||
a "../artifacts/sunshine-debuginfo-win32.zip" "*.exe" | ||
a "../artifacts/sunshine-win32-debuginfo.7z" "*.dbg" | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.