Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/targets/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ endif()

# tests
if(BUILD_TESTS)
enable_testing()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already in the tests/CMakeLists.txt... is it truly necessary here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the location affects where you can run ctest from. Before you had to do it from {builddir}/tests, but with this you can do it from {builddir}

add_subdirectory(tests)
endif()

Expand Down
17 changes: 7 additions & 10 deletions packaging/linux/copr/Sunshine.spec
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,9 @@ cuda_supported_architectures=("x86_64" "aarch64")

# prepare CMAKE args
cmake_args=(
"-B=%{_builddir}/Sunshine/build"
"-G=Unix Makefiles"
"-S=."
Comment thread
ReenigneArcher marked this conversation as resolved.
"-DBUILD_DOCS=OFF"
"-DBUILD_WERROR=ON"
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_INSTALL_PREFIX=%{_prefix}"
"-DSUNSHINE_ASSETS_DIR=%{_datadir}/sunshine"
"-DSUNSHINE_EXECUTABLE_PATH=%{_bindir}/sunshine"
"-DSUNSHINE_ENABLE_DRM=ON"
Expand All @@ -241,6 +237,7 @@ cmake_args=(
"-DSUNSHINE_PUBLISHER_NAME=LizardByte"
"-DSUNSHINE_PUBLISHER_WEBSITE=https://app.lizardbyte.dev"
"-DSUNSHINE_PUBLISHER_ISSUE_URL=https://app.lizardbyte.dev/support"
"-DCMAKE_TEST_LAUNCHER=xvfb-run"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was assuming there is CMake 3.29 at least everywhere, but it's not the case for opensuse leap 15.x. Leap 16 has CMake 3.31. I will check with copr team why those are not made available since opensuse 15.6 is already EOL. But also just to confirm, which opensuse version would you like to build on?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But also just to confirm, which opensuse version would you like to build on?

Ideally whichever one is supported... but it's becoming apparent that OpenSuse is a second class citizen on copr. (#5353 (comment))

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fwiw, we did do some work to support OBS with packit, but that kinda stalled because of lack of push from users. If interested to build there, we can probably revive the effort.

But for now, I am considering just waiting it out 1 week to see if the new chroot will be added.

@gummiangler gummiangler Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to add some context regarding openSUSE: there is already an open PR by me adding Tumbleweed support, but it currently can't be merged because of an existing bug with Tumbleweed in Copr. Any changes made to accommodate Leap's older CMake version could definitely impact or break that Tumbleweed build.

Regarding OBS: that's unfortunately a no-go for the full version. Because of NVENC licensing restrictions, OBS can't build it with NVENC enabled (there is actually already an NVENC-less build sitting in games:tools on OBS right now).

Sticking with Copr is the best bet to get a fully-featured build on openSUSE, so it really does seem like waiting for Copr to sort out the chroots/bugs for both Leap and Tumbleweed is the only way forward.

)

%if 0%{?fedora}
Expand Down Expand Up @@ -380,8 +377,8 @@ uv sync \
%endif
echo "cmake args:"
echo "${cmake_args[@]}"
cmake "${cmake_args[@]}"
make -j$(nproc) -C "%{_builddir}/Sunshine/build"
%cmake ${cmake_args[@]}
%cmake_build

%check
# validate the metainfo file
Expand All @@ -390,8 +387,8 @@ appstream-util validate %{buildroot}%{_metainfodir}/*.metainfo.xml
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop

# run tests
cd %{_builddir}/Sunshine/build
xvfb-run ./tests/test_sunshine
cd %{_builddir}/Sunshine/
%ctest

%install
# Load NVM for Fedora 44+ so npm is available during make install
Expand All @@ -409,8 +406,8 @@ echo "Node.js version: $(node --version)"
echo "npm version: $(npm --version)"
%endif

cd %{_builddir}/Sunshine/build
%make_install
cd %{_builddir}/Sunshine
%cmake_install

%post
# Note: this is copied from the postinst script
Expand Down
3 changes: 3 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ list(REMOVE_ITEM SUNSHINE_SOURCES ${CMAKE_SOURCE_DIR}/src/main.cpp)
add_executable(${PROJECT_NAME}
${TEST_SOURCES}
${SUNSHINE_SOURCES})
# TODO: Use proper gtest integration from GoogleTest module
add_test(NAME ${PROJECT_NAME}
COMMAND ${PROJECT_NAME})

# Copy files needed for config consistency tests to build directory
# This ensures both CLI and CLion can access the same files relative to the test executable
Expand Down
Loading