style(Homebrew): Update Homebrew formula dependencies and conflicts (#4484)

This commit is contained in:
David Lane 2025-12-19 22:23:54 -05:00 committed by GitHub
commit 79b4b9f6fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 54 additions and 26 deletions

View file

@ -62,7 +62,7 @@ jobs:
run: ls -l artifacts run: ls -l artifacts
- name: Update GitHub Release - name: Update GitHub Release
uses: LizardByte/actions/actions/release_create@v2025.1028.23217 uses: LizardByte/actions/actions/release_create@v2025.1220.21713
with: with:
allowUpdates: true allowUpdates: true
body: ${{ github.event.release.body }} body: ${{ github.event.release.body }}

View file

@ -33,7 +33,7 @@ jobs:
steps: steps:
- name: More space - name: More space
if: matrix.arch == 'x86_64' if: matrix.arch == 'x86_64'
uses: LizardByte/actions/actions/more_space@v2025.1028.23217 uses: LizardByte/actions/actions/more_space@v2025.1220.21713
with: with:
analyze-space-savings: true analyze-space-savings: true
clean-all: true clean-all: true

View file

@ -36,21 +36,21 @@ jobs:
include: 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 # 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 :( # while GitHub has larger macOS runners, they are not available for our repos :(
- os_version: "14" - os_name: "macos"
os_name: "macos" os_version: "14"
- os_version: "15" - os_name: "macos"
os_name: "macos" os_version: "15"
- os_version: "26" - os_name: "macos"
os_name: "macos" os_version: "26"
- os_version: "latest" - os_name: "ubuntu"
os_name: "ubuntu" os_version: "22.04"
- os_version: "latest" # this job will only configure the formula for release, no validation - os_name: "ubuntu"
os_name: "ubuntu" os_version: "latest"
release: true release: true # this job will only configure the formula for release, no validation
steps: steps:
- name: More space - name: More space
if: runner.os == 'Linux' if: runner.os == 'Linux'
uses: LizardByte/actions/actions/more_space@v2025.1028.23217 uses: LizardByte/actions/actions/more_space@v2025.1220.21713
with: with:
analyze-space-savings: true analyze-space-savings: true
clean-all: true clean-all: true
@ -142,7 +142,7 @@ jobs:
- name: Validate Homebrew Formula - name: Validate Homebrew Formula
id: test id: test
if: matrix.release != true if: matrix.release != true
uses: LizardByte/actions/actions/release_homebrew@v2025.1028.23217 uses: LizardByte/actions/actions/release_homebrew@v2025.1220.21713
with: with:
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
git_email: ${{ secrets.GIT_EMAIL }} git_email: ${{ secrets.GIT_EMAIL }}
@ -178,7 +178,22 @@ jobs:
# update the formula # update the formula
sed -i 's/class Sunshine < Formula/class SunshineBeta < Formula/' $formula_file sed -i 's/class Sunshine < Formula/class SunshineBeta < Formula/' $formula_file
sed -i 's/# conflicts_with/conflicts_with/' $formula_file sed -i 's/conflicts_with "sunshine-beta"/conflicts_with "sunshine"/' $formula_file
sed -i '0,/^ version .*$/d' $formula_file
# update livecheck to check for latest stable or pre-release
# shellcheck disable=SC1004
sed -i '/strategy :github_latest do |json, regex|/,/^ end$/c\
strategy :github_releases do |json, regex|\
json.map do |release|\
next if release["draft"]\
\
match = release["tag_name"]?\&.match(regex)\
next if match.blank?\
\
match[1]\
end\
end' $formula_file
# print new file # print new file
echo "New formula:" echo "New formula:"

View file

@ -29,7 +29,7 @@ jobs:
dist: 22.04 dist: 22.04
steps: steps:
- name: More space - name: More space
uses: LizardByte/actions/actions/more_space@v2025.1028.23217 uses: LizardByte/actions/actions/more_space@v2025.1220.21713
with: with:
analyze-space-savings: true analyze-space-savings: true
clean-all: true clean-all: true

View file

@ -43,7 +43,7 @@ jobs:
- name: Release Setup - name: Release Setup
id: release-setup id: release-setup
uses: LizardByte/actions/actions/release_setup@v2025.1028.23217 uses: LizardByte/actions/actions/release_setup@v2025.1220.21713
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
@ -181,7 +181,7 @@ jobs:
- name: Homebrew-macos-26 - name: Homebrew-macos-26
coverage: false coverage: false
pr: true pr: true
- name: Homebrew-ubuntu-latest - name: Homebrew-ubuntu-22.04
coverage: true coverage: true
pr: true pr: true
- name: Windows-AMD64 - name: Windows-AMD64
@ -259,7 +259,7 @@ jobs:
run: ls -l artifacts run: ls -l artifacts
- name: Create/Update GitHub Release - name: Create/Update GitHub Release
uses: LizardByte/actions/actions/release_create@v2025.1028.23217 uses: LizardByte/actions/actions/release_create@v2025.1220.21713
with: with:
allowUpdates: false allowUpdates: false
body: ${{ needs.release-setup.outputs.release_body }} body: ${{ needs.release-setup.outputs.release_body }}
@ -288,7 +288,7 @@ jobs:
path: homebrew path: homebrew
- name: Upload Homebrew Beta Formula - name: Upload Homebrew Beta Formula
uses: LizardByte/actions/actions/release_homebrew@v2025.1028.23217 uses: LizardByte/actions/actions/release_homebrew@v2025.1220.21713
with: with:
formula_file: ${{ github.workspace }}/homebrew/sunshine-beta.rb formula_file: ${{ github.workspace }}/homebrew/sunshine-beta.rb
git_email: ${{ secrets.GH_BOT_EMAIL }} git_email: ${{ secrets.GH_BOT_EMAIL }}

View file

@ -5,7 +5,6 @@ class Sunshine < Formula
GCC_FORMULA = "gcc@#{GCC_VERSION}".freeze GCC_FORMULA = "gcc@#{GCC_VERSION}".freeze
IS_UPSTREAM_REPO = ENV.fetch("GITHUB_REPOSITORY", "") == "LizardByte/Sunshine" IS_UPSTREAM_REPO = ENV.fetch("GITHUB_REPOSITORY", "") == "LizardByte/Sunshine"
# conflicts_with "sunshine", because: "sunshine and sunshine-beta cannot be installed at the same time"
desc "@PROJECT_DESCRIPTION@" desc "@PROJECT_DESCRIPTION@"
homepage "@PROJECT_HOMEPAGE_URL@" homepage "@PROJECT_HOMEPAGE_URL@"
url "@GITHUB_CLONE_URL@", url "@GITHUB_CLONE_URL@",
@ -36,12 +35,12 @@ class Sunshine < Formula
depends_on "node" => :build depends_on "node" => :build
depends_on "pkgconf" => :build depends_on "pkgconf" => :build
depends_on "gcovr" => :test depends_on "gcovr" => :test
depends_on "boost"
depends_on "curl" depends_on "curl"
depends_on "icu4c@78"
depends_on "miniupnpc" depends_on "miniupnpc"
depends_on "openssl" depends_on "openssl@3"
depends_on "opus" depends_on "opus"
depends_on "boost" => :recommended
depends_on "icu4c" => :recommended
on_macos do on_macos do
depends_on "llvm" => [:build, :test] depends_on "llvm" => [:build, :test]
@ -49,16 +48,28 @@ class Sunshine < Formula
on_linux do on_linux do
depends_on GCC_FORMULA => [:build, :test] depends_on GCC_FORMULA => [:build, :test]
depends_on "at-spi2-core"
depends_on "avahi" depends_on "avahi"
depends_on "ayatana-ido"
depends_on "cairo"
depends_on "gdk-pixbuf"
depends_on "glib"
depends_on "gnu-which" depends_on "gnu-which"
depends_on "gtk+3"
depends_on "harfbuzz"
depends_on "libayatana-appindicator" depends_on "libayatana-appindicator"
depends_on "libayatana-indicator"
depends_on "libcap" depends_on "libcap"
depends_on "libdbusmenu"
depends_on "libdrm" depends_on "libdrm"
depends_on "libice"
depends_on "libnotify" depends_on "libnotify"
depends_on "libsm"
depends_on "libva" depends_on "libva"
depends_on "libx11" depends_on "libx11"
depends_on "libxcb" depends_on "libxcb"
depends_on "libxcursor" depends_on "libxcursor"
depends_on "libxext"
depends_on "libxfixes" depends_on "libxfixes"
depends_on "libxi" depends_on "libxi"
depends_on "libxinerama" depends_on "libxinerama"
@ -66,11 +77,13 @@ class Sunshine < Formula
depends_on "libxtst" depends_on "libxtst"
depends_on "mesa" depends_on "mesa"
depends_on "numactl" depends_on "numactl"
depends_on "pango"
depends_on "pulseaudio" depends_on "pulseaudio"
depends_on "systemd" depends_on "systemd"
depends_on "wayland" depends_on "wayland"
end end
conflicts_with "sunshine-beta", because: "sunshine and sunshine-beta cannot be installed at the same time"
fails_with :clang do fails_with :clang do
build 1400 build 1400
cause "Requires C++23 support" cause "Requires C++23 support"
@ -194,7 +207,7 @@ class Sunshine < Formula
# test that the binary runs at all # test that the binary runs at all
system bin/"sunshine", "--version" system bin/"sunshine", "--version"
if IS_UPSTREAM_REPO if IS_UPSTREAM_REPO && ENV.fetch("HOMEBREW_BOTTLE_BUILD", "false") != "true"
# run the test suite # run the test suite
system bin/"test_sunshine", "--gtest_color=yes", "--gtest_output=xml:tests/test_results.xml" system bin/"test_sunshine", "--gtest_color=yes", "--gtest_output=xml:tests/test_results.xml"
assert_path_exists File.join(testpath, "tests", "test_results.xml") assert_path_exists File.join(testpath, "tests", "test_results.xml")