From 977a4d3d4a39e9d75d023605a335f17b00bd2f7e Mon Sep 17 00:00:00 2001 From: Jack Brown Date: Fri, 26 Aug 2022 18:20:49 -0400 Subject: [PATCH 01/21] Add dma import modifiers EGL ext --- src/platform/linux/graphics.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/linux/graphics.cpp b/src/platform/linux/graphics.cpp index 3c0adbda..59b85522 100644 --- a/src/platform/linux/graphics.cpp +++ b/src/platform/linux/graphics.cpp @@ -365,6 +365,7 @@ display_t make_display(std::variant Date: Fri, 26 Aug 2022 19:04:41 -0400 Subject: [PATCH 02/21] fix image paths --- src/process.cpp | 28 ++++++++++++++++++++++++---- src_assets/linux/config/apps.json | 2 +- src_assets/windows/config/apps.json | 2 +- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/process.cpp b/src/process.cpp index 7fd900c5..a1b05e46 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -194,8 +194,9 @@ std::vector &proc_t::get_apps() { } /// Gets application image from application list. +/// Returns image from assets directory if found there. /// Returns default image if image configuration is not set. -/// returns http content-type header compatible image type +/// Returns http content-type header compatible image type. std::string proc_t::get_app_image(int app_id) { auto app_index = app_id - 1; if(app_index < 0 || app_index >= _apps.size()) { @@ -205,18 +206,37 @@ std::string proc_t::get_app_image(int app_id) { auto app_image_path = _apps[app_index].image_path; if(app_image_path.empty()) { + // image is empty, return default box image return SUNSHINE_ASSETS_DIR "/box.png"; } + // get the image extension and convert it to lowercase auto image_extension = std::filesystem::path(app_image_path).extension().string(); boost::to_lower(image_extension); - std::error_code code; - if(!std::filesystem::exists(app_image_path, code) || image_extension != ".png") { + // return the default box image if extension is not "png" + if(image_extension != ".png") { return SUNSHINE_ASSETS_DIR "/box.png"; } - // return only "content-type" http header compatible image type. + // check if image is in assets directory + if(std::filesystem::exists(SUNSHINE_ASSETS_DIR + app_image_path)) { + return SUNSHINE_ASSETS_DIR + app_image_path; + } + else if(app_image_path == "./assets/steam.png") { + // handle old default steam image definition + return SUNSHINE_ASSETS_DIR "/steam.png"; + } + + // check if specified image exists + std::error_code code; + if(!std::filesystem::exists(app_image_path, code)) { + // return default box image if image does not exist + return SUNSHINE_ASSETS_DIR "/box.png"; + } + + // image is a png, and not in assets directory + // return only "content-type" http header compatible image type return app_image_path; } diff --git a/src_assets/linux/config/apps.json b/src_assets/linux/config/apps.json index 552dabe2..4a848bd8 100644 --- a/src_assets/linux/config/apps.json +++ b/src_assets/linux/config/apps.json @@ -14,7 +14,7 @@ "output":"steam.txt", "detached":["setsid steam steam://open/bigpicture"], - "image-path":"./assets/steam.png" + "image-path":"steam.png" } ] } diff --git a/src_assets/windows/config/apps.json b/src_assets/windows/config/apps.json index 419f2be4..379dd2fb 100644 --- a/src_assets/windows/config/apps.json +++ b/src_assets/windows/config/apps.json @@ -8,7 +8,7 @@ "output":"steam.txt", "detached":["steam steam://open/bigpicture"], - "image-path":"./assets/steam.png" + "image-path":"steam.png" } ] } From 264c9272df8d443456e405476983cc8bb41687a4 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sat, 15 Oct 2022 16:37:18 -0400 Subject: [PATCH 03/21] fix string concatenation of image in assets dir --- src/process.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/process.cpp b/src/process.cpp index cd74a801..2b6c1507 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -202,10 +202,11 @@ std::string proc_t::get_app_image(int app_id) { return SUNSHINE_ASSETS_DIR "/box.png"; } + auto default_image = SUNSHINE_ASSETS_DIR "/box.png"; auto app_image_path = _apps[app_index].image_path; if(app_image_path.empty()) { // image is empty, return default box image - return SUNSHINE_ASSETS_DIR "/box.png"; + return default_image; } // get the image extension and convert it to lowercase @@ -214,12 +215,13 @@ std::string proc_t::get_app_image(int app_id) { // return the default box image if extension is not "png" if(image_extension != ".png") { - return SUNSHINE_ASSETS_DIR "/box.png"; + return default_image; } // check if image is in assets directory - if(std::filesystem::exists(SUNSHINE_ASSETS_DIR + app_image_path)) { - return SUNSHINE_ASSETS_DIR + app_image_path; + auto full_image_path = std::filesystem::path(SUNSHINE_ASSETS_DIR) / app_image_path; + if(std::filesystem::exists(full_image_path)) { + return full_image_path.string(); } else if(app_image_path == "./assets/steam.png") { // handle old default steam image definition @@ -230,7 +232,7 @@ std::string proc_t::get_app_image(int app_id) { std::error_code code; if(!std::filesystem::exists(app_image_path, code)) { // return default box image if image does not exist - return SUNSHINE_ASSETS_DIR "/box.png"; + return default_image; } // image is a png, and not in assets directory From 9b66a5a16b38e259c654092d11a83d2d843ef373 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 16 Oct 2022 14:12:48 -0400 Subject: [PATCH 04/21] Bump actions/checkout from 2 to 3 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5e534a2b..7ce11790 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -73,7 +73,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Dependencies Linux AUR run: | From 93315f280eea4abe390b31cce318482675d8afdd Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 16 Oct 2022 14:18:20 -0400 Subject: [PATCH 05/21] Update CI.yml - use `GITHUB_OUTPUT` instead of `set-output` --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7ce11790..7e6b01a1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -591,7 +591,7 @@ jobs: echo "$subport" subportlist="$subportlist $subport" done - echo "::set-output name=subportlist::${subportlist}" + echo "subportlist=${subportlist}" >> $GITHUB_OUTPUT - name: Run port lint for all subports run: | From b6ae848bb52b30ff705dac8a1e20abcadedd07c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Oct 2022 01:22:31 +0000 Subject: [PATCH 06/21] Bump sphinx from 5.2.3 to 5.3.0 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 5.2.3 to 5.3.0. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v5.2.3...v5.3.0) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- scripts/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 55da79d8..84c26fe1 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -1,5 +1,5 @@ Babel==2.10.3 m2r2==0.3.2 -Sphinx==5.2.3 +Sphinx==5.3.0 sphinx-copybutton==0.5.0 sphinx-rtd-theme==1.0.0 From 3baace671114b3533010cdd3c57677606fb94fb4 Mon Sep 17 00:00:00 2001 From: istori1 <107304850+istori1@users.noreply.github.com> Date: Mon, 17 Oct 2022 17:31:12 -0400 Subject: [PATCH 07/21] Reduce build time and cleanup --- .../linux/flatpak/dev.lizardbyte.sunshine.yml | 64 ++++++++----------- 1 file changed, 27 insertions(+), 37 deletions(-) diff --git a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml index 0b7e57b5..2c31e50b 100644 --- a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml +++ b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml @@ -26,33 +26,6 @@ cleanup: - /share/man modules: - - name: cuda - disabled: false - buildsystem: simple - only-arches: - - x86_64 - - aarch64 - cleanup: - - '*' - build-commands: - - chmod u+x ./cuda.run - - ./cuda.run --silent --toolkit --toolkitpath=$FLATPAK_DEST/cuda --no-opengl-libs --no-man-page --no-drm --tmpdir=$FLATPAK_BUILDER_BUILDDIR # yamllint disable-line rule:line-length - - rm -r $FLATPAK_DEST/cuda/nsight-systems-2021.3.2 - - rm ./cuda.run - sources: - - type: file - only-arches: - - x86_64 - url: https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run - sha256: bbd87ca0e913f837454a796367473513cddef555082e4d86ed9a38659cc81f0a - dest-filename: cuda.run - - type: file - only-arches: - - aarch64 - url: https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux_sbsa.run # yamllint disable-line rule:line-length - sha256: f2c4a52e06329606c8dfb7c5ea3f4cb4c0b28f9d3fdffeeb734fcc98daf580d8 - dest-filename: cuda.run - - name: boost disabled: false buildsystem: simple @@ -82,14 +55,6 @@ modules: - --enable-libx264 - --enable-libx265 - --enable-nvenc - - --enable-encoder=h264_v4l2m2m - - --enable-encoder=hevc_v4l2m2m - # - --enable-nonfree - # - --enable-cuda-nvcc - # - --enable-libnpp - # - --extra-cflags=-I${FLATPAK_DEST}/cuda/include - # - --extra-ldflags=-L${FLATPAK_DEST}/cuda/lib64 - # - --nvccflags="-gencode arch=compute_52,code=sm_52 -O2" cleanup: - /share sources: @@ -161,7 +126,6 @@ modules: - type: archive url: http://archive.ubuntu.com/ubuntu/pool/main/a/avahi/avahi_0.8.orig.tar.gz sha256: 060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda - modules: - name: libevent cleanup: @@ -181,7 +145,6 @@ modules: - type: archive url: http://archive.ubuntu.com/ubuntu/pool/main/libe/libevdev/libevdev_1.13.0+dfsg.orig.tar.xz sha256: a882e13ef1dd6bd227318080cabf60fe5af3c06471259d3acfc9dbfb202351a7 - modules: - name: libcheck buildsystem: cmake @@ -192,6 +155,33 @@ modules: url: http://archive.ubuntu.com/ubuntu/pool/universe/c/check/check_0.15.2.orig.tar.gz sha256: 8451b68ac5d6f3157b24f22eceff575bcf566264f6d78f3852f89d4e08cf42e1 + - name: cuda + disabled: false + buildsystem: simple + only-arches: + - x86_64 + - aarch64 + cleanup: + - '*' + build-commands: + - chmod u+x ./cuda.run + - ./cuda.run --silent --toolkit --toolkitpath=$FLATPAK_DEST/cuda --no-opengl-libs --no-man-page --no-drm --tmpdir=$FLATPAK_BUILDER_BUILDDIR # yamllint disable-line rule:line-length + - rm -r $FLATPAK_DEST/cuda/nsight-systems-2021.3.2 + - rm ./cuda.run + sources: + - type: file + only-arches: + - x86_64 + url: https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run + sha256: bbd87ca0e913f837454a796367473513cddef555082e4d86ed9a38659cc81f0a + dest-filename: cuda.run + - type: file + only-arches: + - aarch64 + url: https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux_sbsa.run # yamllint disable-line rule:line-length + sha256: f2c4a52e06329606c8dfb7c5ea3f4cb4c0b28f9d3fdffeeb734fcc98daf580d8 + dest-filename: cuda.run + - name: sunshine buildsystem: cmake no-make-install: false From 35cdc2c89bed824459902725147000111f13cde6 Mon Sep 17 00:00:00 2001 From: istori1 <107304850+istori1@users.noreply.github.com> Date: Mon, 17 Oct 2022 20:28:45 -0400 Subject: [PATCH 08/21] Update dev.lizardbyte.sunshine.yml --- .../linux/flatpak/dev.lizardbyte.sunshine.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml index 2c31e50b..cfb8678e 100644 --- a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml +++ b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml @@ -47,14 +47,18 @@ modules: - --disable-doc - --disable-programs - --disable-decoders - - --enable-libfontconfig - - --enable-libfreetype - - --enable-libopus - - --enable-libvorbis - - --enable-libvpx - - --enable-libx264 - - --enable-libx265 + - --disable-vdpau + - --disable-audiotoolbox + - --disable-videotoolbox + - --disable-vulkan + - --disable-sdl2 + - --disable-filters + - --disable-avfilter + - --disable-postproc + - --disable-autodetect - --enable-nvenc + - --enable-ffnvcodec + - --enable-vaapi cleanup: - /share sources: From ef2ca538a38e00aece0fde0e72a444d3ebdf77cc Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Wed, 19 Oct 2022 09:35:48 -0400 Subject: [PATCH 09/21] use matrix build for flatpak Co-Authored-By: istori1 <107304850+istori1@users.noreply.github.com> --- .github/workflows/CI.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7e6b01a1..ead43706 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -173,6 +173,13 @@ jobs: name: Linux Flatpak runs-on: ubuntu-22.04 needs: check_changelog + strategy: + fail-fast: false # false to test all, true to fail entire job if any fail + matrix: + arch: ['x86_64', 'aarch64'] + exclude: + # exclude `aarch64` on anything except a release triggering event + - arch: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) && '' || 'aarch64' }} steps: - name: Checkout @@ -183,12 +190,14 @@ jobs: sudo apt-get update -y sudo apt-get install -y \ cmake \ + qemu-user-static \ flatpak - sudo su $(whoami) -c 'flatpak remote-add --user --if-not-exists flathub \ + sudo su $(whoami) -c 'flatpak --user remote-add --if-not-exists flathub \ https://flathub.org/repo/flathub.flatpakrepo' - sudo su $(whoami) -c 'flatpak install --user flathub \ - org.flatpak.Builder org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08 -y' - + sudo su $(whoami) -c 'flatpak --user install -y flathub \ + org.flatpak.Builder \ + org.freedesktop.Platform/${{ matrix.arch }}/21.08 \ + org.freedesktop.Sdk/${{ matrix.arch }}/21.08' - name: Configure Flatpak Manifest run: | # variables for manifest @@ -224,14 +233,15 @@ jobs: - name: Build Linux Flatpak working-directory: build run: | - sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --repo=repo --force-clean build-sunshine \ - dev.lizardbyte.sunshine.yml' - sudo su $(whoami) -c 'flatpak build-bundle ./repo ../artifacts/sunshine.flatpak dev.lizardbyte.sunshine' + sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --arch=${{ matrix.arch }} --repo=repo --force-clean \ + build-sunshine dev.lizardbyte.sunshine.yml' + sudo su $(whoami) -c 'flatpak build-bundle --arch=${{ matrix.arch }} ./repo \ + ../artifacts/sunshine_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine' - name: Upload Artifacts uses: actions/upload-artifact@v3 with: - name: sunshine-linux-flatpak + name: sunshine-linux-flatpak-${{ matrix.arch }} path: artifacts/ - name: Create Release From 87f01fc0b86e0ad564b7773138aa225e5d107234 Mon Sep 17 00:00:00 2001 From: istori1 <107304850+istori1@users.noreply.github.com> Date: Wed, 19 Oct 2022 17:29:27 -0400 Subject: [PATCH 10/21] Update dev.lizardbyte.sunshine.yml --- packaging/linux/flatpak/dev.lizardbyte.sunshine.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml index cfb8678e..105caddc 100644 --- a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml +++ b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml @@ -32,7 +32,8 @@ modules: build-commands: - cd tools/build && bison -y -d -o src/engine/jamgram.cpp src/engine/jamgram.y - ./bootstrap.sh --prefix=$FLATPAK_DEST --with-libraries=system,thread,log || cat bootstrap.log - - ./b2 install variant=release link=static,shared runtime-link=shared cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" -j $FLATPAK_BUILDER_N_JOBS # yamllint disable-line rule:line-length + - ./b2 install variant=release link=static,shared runtime-link=shared cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" + -j $FLATPAK_BUILDER_N_JOBS sources: - type: archive url: http://archive.ubuntu.com/ubuntu/pool/main/b/boost1.74/boost1.74_1.74.0.orig.tar.xz @@ -140,6 +141,7 @@ modules: sha256: 92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb - name: libevdev + disabled: false buildsystem: meson config-opts: - -Ddocumentation=disabled @@ -169,7 +171,8 @@ modules: - '*' build-commands: - chmod u+x ./cuda.run - - ./cuda.run --silent --toolkit --toolkitpath=$FLATPAK_DEST/cuda --no-opengl-libs --no-man-page --no-drm --tmpdir=$FLATPAK_BUILDER_BUILDDIR # yamllint disable-line rule:line-length + - ./cuda.run --silent --toolkit --toolkitpath=$FLATPAK_DEST/cuda --no-opengl-libs --no-man-page --no-drm + --tmpdir=$FLATPAK_BUILDER_BUILDDIR - rm -r $FLATPAK_DEST/cuda/nsight-systems-2021.3.2 - rm ./cuda.run sources: @@ -187,6 +190,7 @@ modules: dest-filename: cuda.run - name: sunshine + disabled: false buildsystem: cmake no-make-install: false builddir: true From 9f0af0f8ae22a37a2351b5d9a0ad8d7d93f85fb6 Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Wed, 19 Oct 2022 19:34:36 -0400 Subject: [PATCH 11/21] ci: update global workflows (#417) --- .github/workflows/automerge.yml | 4 ++-- .github/workflows/yaml-lint.yml | 35 +++++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 7ff83e0a..0ac82a7a 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Autoapproving - uses: hmarr/auto-approve-action@v2 + uses: hmarr/auto-approve-action@v3 with: github-token: "${{ secrets.GITHUB_TOKEN }}" @@ -44,7 +44,7 @@ jobs: steps: - name: Automerging - uses: pascalgn/automerge-action@v0.15.3 + uses: pascalgn/automerge-action@v0.15.5 env: BASE_BRANCHES: nightly GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} diff --git a/.github/workflows/yaml-lint.yml b/.github/workflows/yaml-lint.yml index f2e07218..5623c2dc 100644 --- a/.github/workflows/yaml-lint.yml +++ b/.github/workflows/yaml-lint.yml @@ -17,6 +17,24 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Find additional files + id: find-files + run: | + # space separated list of files + FILES=.clang-format + + # empty placeholder + FOUND="" + + for FILE in ${FILES}; do + if [ -f "$FILE" ] + then + FOUND="$FOUND $FILE" + fi + done + + echo "found=${FOUND}" >> $GITHUB_OUTPUT + - name: yaml lint id: yaml-lint uses: ibiqlik/action-yamllint@v3 @@ -30,17 +48,14 @@ jobs: line-length: max: 120 truthy: - allowed-values: ['true', 'false', 'on'] # GitHub uses "on" for workflow event triggers + # GitHub uses "on" for workflow event triggers + # .clang-format file has options of "Yes" "No" that will be caught by this, so changed to "warning" + allowed-values: ['true', 'false', 'on'] check-keys: true - level: error + level: warning + file_or_dir: . ${{ steps.find-files.outputs.found }} - name: Log - run: | - echo ${{ steps.yaml-lint.outputs.logfile }} - - - name: Upload logs - uses: actions/upload-artifact@v3 if: failure() - with: - name: yamllint-logfile - path: ${{ steps.yaml-lint.outputs.logfile }} + run: | + cat "${{ steps.yaml-lint.outputs.logfile }}" >> $GITHUB_STEP_SUMMARY From cd89808a21e203c58f2ac5132acb03bd9c576e6a Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Wed, 19 Oct 2022 20:18:25 -0400 Subject: [PATCH 12/21] ci: update global cpp (#421) --- .clang-format | 7 ++++--- .github/workflows/cpp-clang-format-lint.yml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.clang-format b/.clang-format index 6944ec3e..9f868d75 100644 --- a/.clang-format +++ b/.clang-format @@ -1,3 +1,4 @@ +--- # This file is centrally managed in https://github.com//.github/ # Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in # the above-mentioned repo. @@ -6,7 +7,7 @@ BasedOnStyle: LLVM AccessModifierOffset: -2 AlignAfterOpenBracket: DontAlign -AlignConsecutiveAssignments: true +AlignConsecutiveAssignments: Consecutive AlignOperands: Align AllowAllArgumentsOnNextLine: false AllowAllConstructorInitializersOnNextLine: false @@ -14,7 +15,7 @@ AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: Always AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: Always +AllowShortIfStatementsOnASingleLine: WithoutElse AllowShortLambdasOnASingleLine: All AllowShortLoopsOnASingleLine: true AlwaysBreakAfterReturnType: None @@ -62,7 +63,7 @@ SpaceBeforeParens: Never SpaceBeforeRangeBasedForLoopColon: true SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 -SpacesInAngles: false +SpacesInAngles: Never SpacesInCStyleCastParentheses: false SpacesInContainerLiterals: false SpacesInParentheses: false diff --git a/.github/workflows/cpp-clang-format-lint.yml b/.github/workflows/cpp-clang-format-lint.yml index 4717f70a..cc42ea10 100644 --- a/.github/workflows/cpp-clang-format-lint.yml +++ b/.github/workflows/cpp-clang-format-lint.yml @@ -28,7 +28,7 @@ jobs: FOUND=false fi - echo "::set-output name=src::${FOUND}" + echo "src=${FOUND}" >> $GITHUB_OUTPUT outputs: src: ${{ steps.check.outputs.src }} From e2bb1a720ac19dd00a6e8942f7a82e7d2149ca9e Mon Sep 17 00:00:00 2001 From: istori1 <107304850+istori1@users.noreply.github.com> Date: Thu, 20 Oct 2022 10:34:29 -0400 Subject: [PATCH 13/21] Adding back CPU encoding (#419) --- packaging/linux/flatpak/dev.lizardbyte.sunshine.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml index 105caddc..d2c5af4d 100644 --- a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml +++ b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml @@ -60,6 +60,8 @@ modules: - --enable-nvenc - --enable-ffnvcodec - --enable-vaapi + - --enable-libx264 + - --enable-libx265 cleanup: - /share sources: From 49afefc43f92d09eeee69c6c9baca2cc6f9f3836 Mon Sep 17 00:00:00 2001 From: istori1 <107304850+istori1@users.noreply.github.com> Date: Thu, 20 Oct 2022 13:37:34 -0400 Subject: [PATCH 14/21] Export Debug Bundle [Flatpak] (#422) --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ead43706..33300441 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -237,6 +237,8 @@ jobs: build-sunshine dev.lizardbyte.sunshine.yml' sudo su $(whoami) -c 'flatpak build-bundle --arch=${{ matrix.arch }} ./repo \ ../artifacts/sunshine_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine' + sudo su $(whoami) -c 'flatpak build-bundle --runtime --arch=${{ matrix.arch }} ./repo \ + ../artifacts/sunshine_debug_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine.Debug' - name: Upload Artifacts uses: actions/upload-artifact@v3 From b5ec178cd6fb7145833a4d4d212f4b322fb2b3ba Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Thu, 20 Oct 2022 20:08:19 -0400 Subject: [PATCH 15/21] add flatpak-builder cache --- .github/workflows/CI.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 33300441..cd0e5c5c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -198,6 +198,15 @@ jobs: org.flatpak.Builder \ org.freedesktop.Platform/${{ matrix.arch }}/21.08 \ org.freedesktop.Sdk/${{ matrix.arch }}/21.08' + + - name: Cache Flatpak build + uses: actions/cache@v3 + with: + path: ./build/.flatpak-builder + key: flatpak-${{ matrix.arch }}-${{ github.sha }} + restore-keys: | + flatpak-${{ matrix.arch }}- + - name: Configure Flatpak Manifest run: | # variables for manifest From 272368b59ce45d4a1de07b5f03ccd456ad9cb24c Mon Sep 17 00:00:00 2001 From: istori1 <107304850+istori1@users.noreply.github.com> Date: Fri, 21 Oct 2022 19:28:36 -0400 Subject: [PATCH 16/21] Do not cache cuda module --- .github/workflows/CI.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cd0e5c5c..f212aaed 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -242,8 +242,13 @@ jobs: - name: Build Linux Flatpak working-directory: build run: | + sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --arch=${{ matrix.arch }} --repo=repo --force-clean \ + --stop-at=cuda build-sunshine dev.lizardbyte.sunshine.yml' + cp -r .flatpak-builder copy-of-flatpak-builder sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --arch=${{ matrix.arch }} --repo=repo --force-clean \ build-sunshine dev.lizardbyte.sunshine.yml' + rm -r .flatpak-builder + mv copy-of-flatpak-builder .flatpak-builder sudo su $(whoami) -c 'flatpak build-bundle --arch=${{ matrix.arch }} ./repo \ ../artifacts/sunshine_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine' sudo su $(whoami) -c 'flatpak build-bundle --runtime --arch=${{ matrix.arch }} ./repo \ From cc0ac47f2967ccaf2942545aba0883fe8e52e1a9 Mon Sep 17 00:00:00 2001 From: istori1 <107304850+istori1@users.noreply.github.com> Date: Fri, 21 Oct 2022 19:40:54 -0400 Subject: [PATCH 17/21] Update CI.yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f212aaed..2d367286 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -247,7 +247,7 @@ jobs: cp -r .flatpak-builder copy-of-flatpak-builder sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --arch=${{ matrix.arch }} --repo=repo --force-clean \ build-sunshine dev.lizardbyte.sunshine.yml' - rm -r .flatpak-builder + rm -rf .flatpak-builder mv copy-of-flatpak-builder .flatpak-builder sudo su $(whoami) -c 'flatpak build-bundle --arch=${{ matrix.arch }} ./repo \ ../artifacts/sunshine_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine' From 88d67277f6d37a7ef3777a0c0ba4176cc2c543f7 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 23 Oct 2022 13:21:00 -0400 Subject: [PATCH 18/21] update localize workflow - fix git diff comparison - add current date to created PR --- .github/workflows/localize.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/localize.yml b/.github/workflows/localize.yml index 79674aa4..2c57c114 100644 --- a/.github/workflows/localize.yml +++ b/.github/workflows/localize.yml @@ -62,17 +62,20 @@ jobs: # print the git diff git diff locale/sunshine.po - # set the variable with minimal output - OUTPUT=$(git diff --numstat locale/sunshine.po) + # set the variable with minimal output, replacing `\t` with ` ` + OUTPUT=$(git diff --numstat locale/sunshine.po | sed -e "s#\t# #g") echo "git_diff=${OUTPUT}" >> $GITHUB_ENV - name: git reset # only run if a single line changed (date/time) and file already existed - # \t in next line is a tab character - if: ${{ env.git_diff == '1\t1\tlocale/sunshine.po' && env.new_file == 'false' }} + if: ${{ env.git_diff == '1 1 locale/sunshine.po' && env.new_file == 'false' }} run: | git reset --hard + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + - name: Create/Update Pull Request uses: peter-evans/create-pull-request@v4 with: @@ -86,7 +89,7 @@ jobs: title: New Babel Updates body: | Update report - - Updated with *today's* date + - Updated ${{ steps.date.outputs.date }} - Auto-generated by [create-pull-request][1] [1]: https://github.com/peter-evans/create-pull-request From db55ff8ea18fcbbe7995d07e08dd29a585f63c8d Mon Sep 17 00:00:00 2001 From: istori1 <107304850+istori1@users.noreply.github.com> Date: Mon, 24 Oct 2022 07:05:13 -0400 Subject: [PATCH 19/21] Remove libcheck and disable x265 --- packaging/linux/flatpak/dev.lizardbyte.sunshine.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml index d2c5af4d..7737936d 100644 --- a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml +++ b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml @@ -61,7 +61,7 @@ modules: - --enable-ffnvcodec - --enable-vaapi - --enable-libx264 - - --enable-libx265 + # - --enable-libx265 cleanup: - /share sources: @@ -79,6 +79,7 @@ modules: sha256: 8b237e94b08c196a1da22f2f25875f10be4cff3648df4eeff21e00da8f683fc2 - name: x265 + disabled: true buildsystem: cmake-ninja builddir: true subdir: source @@ -147,21 +148,13 @@ modules: buildsystem: meson config-opts: - -Ddocumentation=disabled + - -Dtests=disabled cleanup: - /bin sources: - type: archive url: http://archive.ubuntu.com/ubuntu/pool/main/libe/libevdev/libevdev_1.13.0+dfsg.orig.tar.xz sha256: a882e13ef1dd6bd227318080cabf60fe5af3c06471259d3acfc9dbfb202351a7 - modules: - - name: libcheck - buildsystem: cmake - cleanup: - - /bin - sources: - - type: archive - url: http://archive.ubuntu.com/ubuntu/pool/universe/c/check/check_0.15.2.orig.tar.gz - sha256: 8451b68ac5d6f3157b24f22eceff575bcf566264f6d78f3852f89d4e08cf42e1 - name: cuda disabled: false From 166f9f73e0b63d1794c9bbdcf2a673020caf6573 Mon Sep 17 00:00:00 2001 From: istori1 <107304850+istori1@users.noreply.github.com> Date: Mon, 24 Oct 2022 17:47:19 -0400 Subject: [PATCH 20/21] Enabled x264 and removed libevent --- packaging/linux/flatpak/dev.lizardbyte.sunshine.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml index 7737936d..d9e64a13 100644 --- a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml +++ b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml @@ -61,7 +61,7 @@ modules: - --enable-ffnvcodec - --enable-vaapi - --enable-libx264 - # - --enable-libx265 + - --enable-libx265 cleanup: - /share sources: @@ -79,7 +79,7 @@ modules: sha256: 8b237e94b08c196a1da22f2f25875f10be4cff3648df4eeff21e00da8f683fc2 - name: x265 - disabled: true + disabled: false buildsystem: cmake-ninja builddir: true subdir: source @@ -130,18 +130,11 @@ modules: - --disable-doxygen-html - --disable-manpages - --disable-xmltoman + - --disable-libevent sources: - type: archive url: http://archive.ubuntu.com/ubuntu/pool/main/a/avahi/avahi_0.8.orig.tar.gz sha256: 060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda - modules: - - name: libevent - cleanup: - - /bin - sources: - - type: archive - url: http://archive.ubuntu.com/ubuntu/pool/main/libe/libevent/libevent_2.1.12-stable.orig.tar.gz - sha256: 92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb - name: libevdev disabled: false From 4769a9348b1b57d90c965eaeb5f5a06942430eaf Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Tue, 25 Oct 2022 10:38:03 -0400 Subject: [PATCH 21/21] Create release-notifier-moonlight.yml --- .../workflows/release-notifier-moonlight.yml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/release-notifier-moonlight.yml diff --git a/.github/workflows/release-notifier-moonlight.yml b/.github/workflows/release-notifier-moonlight.yml new file mode 100644 index 00000000..9ac896f3 --- /dev/null +++ b/.github/workflows/release-notifier-moonlight.yml @@ -0,0 +1,22 @@ +--- +name: Release Notifications (Moonlight) + +on: + release: + types: [published] + +jobs: + discord: + runs-on: ubuntu-latest + steps: + - name: discord + uses: sarisia/actions-status-discord@v1 # https://github.com/sarisia/actions-status-discord + with: + webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK_MOONLIGHT }} + nodetail: true + nofail: false + username: ${{ secrets.DISCORD_USERNAME }} + avatar_url: ${{ secrets.ORG_LOGO_URL }} + title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released + description: ${{ github.event.release.body }} + color: 0xFF4500