Skip to content

Commit

Permalink
Replace hardcoded paths for unix and...
Browse files Browse the repository at this point in the history
- Add cache for flatpak job

Co-Authored-By: istori1 <[email protected]>
  • Loading branch information
ReenigneArcher and istori1 committed Jun 17, 2022
1 parent bd51a7d commit 118b596
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ jobs:
remove-android: 'true'
remove-haskell: 'true'

- name: Cache flatpak-builder
uses: actions/cache@v3
with:
path: ./build/.flatpak-builder
key: ${{ runner.os }}-flatpak-builder

- name: Checkout
uses: actions/checkout@v3

Expand Down Expand Up @@ -137,9 +143,9 @@ jobs:
matrix:
include: # package these differently
- type: cpack
CMAKE_INSTALL_PREFIX: '/usr/local/sunshine'
SUNSHINE_ASSETS_DIR: 'assets'
SUNSHINE_CONFIG_DIR: 'config'
CMAKE_INSTALL_PREFIX: '/usr'
SUNSHINE_ASSETS_DIR: 'local/sunshine/assets'
SUNSHINE_CONFIG_DIR: 'local/sunshine/config'
EXTRA_ARGS: ''
- type: appimage
CMAKE_INSTALL_PREFIX: '/usr'
Expand Down Expand Up @@ -370,7 +376,7 @@ jobs:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/sunshine -DSUNSHINE_ASSETS_DIR=assets -DSUNSHINE_CONFIG_DIR=config -DGITHUB_OWNER=${owner} -DGITHUB_REPO=${repo} -DGITHUB_BRANCH=${branch} -DSUNSHINE_CONFIGURE_PORTFILE=ON ..
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DSUNSHINE_ASSETS_DIR=local/sunshine/assets -DSUNSHINE_CONFIG_DIR=local/sunshine/config -DGITHUB_OWNER=${owner} -DGITHUB_REPO=${repo} -DGITHUB_BRANCH=${branch} -DSUNSHINE_CONFIGURE_PORTFILE=ON ..
make -j ${nproc}
- name: Package MacOS
Expand Down
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ project(Sunshine VERSION 0.14.0
HOMEPAGE_URL "https://sunshinestream.github.io"
)

option(SUNSHINE_CONFIGURE_APPIMAGE "Configure files required for AppImage." OFF)
option(SUNSHINE_CONFIGURE_FLATPAK "Configure files required for Flatpak." OFF)
option(SUNSHINE_CONFIGURE_PORTFILE "Configure MacOS Portfile." OFF)
option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF)

if(${SUNSHINE_CONFIGURE_APPIMAGE})
configure_file(packaging/linux/sunshine.desktop sunshine.desktop @ONLY)
elseif(${SUNSHINE_CONFIGURE_FLATPAK})
Expand Down Expand Up @@ -435,7 +440,7 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${OPENSSL_LIBRARIES}
${PLATFORM_LIBRARIES})

if (NOT WIN32)
if(NOT WIN32)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES Boost::log)
endif()

Expand Down Expand Up @@ -590,8 +595,8 @@ if(UNIX AND NOT APPLE)

install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/85-sunshine-rules.rules" DESTINATION "/etc/udev/rules.d")

install(TARGETS sunshine RUNTIME DESTINATION "/usr/bin")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" DESTINATION "/usr/lib/systemd/user")
install(TARGETS sunshine RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" DESTINATION "${CMAKE_INSTALL_LIBDIR}/systemd/user")

# Pre and post install
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ modules:
- name: sunshine
buildsystem: cmake
no-make-install: false
builddir: true
build-options:
cxxflags: -I/app/include/libevdev-1.0
cxxflags: -I${C_INCLUDE_PATH}/libevdev-1.0
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/app/bin
- -DCMAKE_INSTALL_PREFIX='/app'
- -DSUNSHINE_ASSETS_DIR=assets
- -DSUNSHINE_CONFIG_DIR=config
Expand All @@ -204,8 +204,6 @@ modules:
- -DSUNSHINE_ENABLE_X11=ON
- -DSUNSHINE_ENABLE_DRM=ON
- -DSUNSHINE_ENABLE_CUDA=ON
post-install:
- cp -f ./src_assets/linux/misc/85-sunshine-rules.rules /etc/udev/rules.d/
sources:
- type: git
url: https://github.com/@GITHUB_OWNER@/@[email protected]
Expand Down

0 comments on commit 118b596

Please sign in to comment.