build(homebrew): force cuda on Linux (#5345)
This commit is contained in:
2
.github/workflows/ci-homebrew.yml
vendored
2
.github/workflows/ci-homebrew.yml
vendored
@@ -177,7 +177,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@a46850981292c4bbc0c41715f286ad95adaaaf4a # v2026.625.20301
|
uses: LizardByte/actions/actions/release_homebrew@master # action requires too many updates to pin
|
||||||
with:
|
with:
|
||||||
actionlint_config: "---\n# empty config"
|
actionlint_config: "---\n# empty config"
|
||||||
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
|
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
|
||||||
|
|||||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -347,7 +347,7 @@ jobs:
|
|||||||
path: homebrew
|
path: homebrew
|
||||||
|
|
||||||
- name: Upload Homebrew Beta Formula
|
- name: Upload Homebrew Beta Formula
|
||||||
uses: LizardByte/actions/actions/release_homebrew@a46850981292c4bbc0c41715f286ad95adaaaf4a # v2026.625.20301
|
uses: LizardByte/actions/actions/release_homebrew@master # action requires too many updates to pin
|
||||||
with:
|
with:
|
||||||
actionlint_config: "---\n# empty config"
|
actionlint_config: "---\n# empty config"
|
||||||
formula_file: ${{ github.workspace }}/homebrew/sunshine-beta.rb
|
formula_file: ${{ github.workspace }}/homebrew/sunshine-beta.rb
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ class Sunshine < Formula
|
|||||||
sha256 x86_64_linux: "0000000000000000000000000000000000000000000000000000000000000000"
|
sha256 x86_64_linux: "0000000000000000000000000000000000000000000000000000000000000000"
|
||||||
end
|
end
|
||||||
|
|
||||||
option "with-cuda", "Enable CUDA support (Linux only)"
|
|
||||||
option "with-docs", "Enable docs build"
|
option "with-docs", "Enable docs build"
|
||||||
option "with-static-boost", "Enable static link of Boost libraries"
|
option "with-static-boost", "Enable static link of Boost libraries"
|
||||||
option "without-static-boost", "Disable static link of Boost libraries" # default option
|
option "without-static-boost", "Disable static link of Boost libraries" # default option
|
||||||
@@ -63,7 +62,7 @@ class Sunshine < Formula
|
|||||||
on_linux do
|
on_linux do
|
||||||
depends_on GCC_FORMULA => [:build, :test]
|
depends_on GCC_FORMULA => [:build, :test]
|
||||||
depends_on "gcovr" => [:build, :test]
|
depends_on "gcovr" => [:build, :test]
|
||||||
depends_on "lizardbyte/homebrew/#{CUDA_FORMULA}" => :build if build.with? "cuda"
|
depends_on "lizardbyte/homebrew/#{CUDA_FORMULA}" => :build
|
||||||
depends_on "python3" => :build
|
depends_on "python3" => :build
|
||||||
depends_on "at-spi2-core"
|
depends_on "at-spi2-core"
|
||||||
depends_on "avahi"
|
depends_on "avahi"
|
||||||
@@ -231,12 +230,7 @@ class Sunshine < Formula
|
|||||||
def add_cuda_args(args)
|
def add_cuda_args(args)
|
||||||
return unless OS.linux?
|
return unless OS.linux?
|
||||||
|
|
||||||
if build.with?("cuda")
|
configure_cuda(args)
|
||||||
configure_cuda(args)
|
|
||||||
else
|
|
||||||
args << "-DSUNSHINE_ENABLE_CUDA=OFF"
|
|
||||||
ohai "CUDA disabled"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def configure_cuda(args)
|
def configure_cuda(args)
|
||||||
|
|||||||
Reference in New Issue
Block a user