-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
chore(packaging/copr): Use standard cmake macros #5341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
64b8f91
5c83eab
5abdf71
b9628c9
073854d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,6 +69,7 @@ endif() | |
|
|
||
| # tests | ||
| if(BUILD_TESTS) | ||
| enable_testing() | ||
| add_subdirectory(tests) | ||
| endif() | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -224,13 +224,9 @@ cuda_supported_architectures=("x86_64" "aarch64") | |
|
|
||
| # prepare CMAKE args | ||
| cmake_args=( | ||
| "-B=%{_builddir}/Sunshine/build" | ||
| "-G=Unix Makefiles" | ||
| "-S=." | ||
|
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" | ||
|
|
@@ -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" | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ideally whichever one is supported... but it's becoming apparent that OpenSuse is a second class citizen on copr. (#5353 (comment))
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fwiw, we did do some work to support OBS with But for now, I am considering just waiting it out 1 week to see if the new chroot will be added. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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} | ||
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
||
There was a problem hiding this comment.
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?There was a problem hiding this comment.
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}