Merge branch 'nightly' into nightly

This commit is contained in:
ReenigneArcher
2022-10-26 16:19:05 -04:00
committed by GitHub
13 changed files with 175 additions and 99 deletions
+4 -3
View File
@@ -1,3 +1,4 @@
---
# This file is centrally managed in https://github.com/<organization>/.github/ # This file is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in # 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. # the above-mentioned repo.
@@ -6,7 +7,7 @@
BasedOnStyle: LLVM BasedOnStyle: LLVM
AccessModifierOffset: -2 AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: true AlignConsecutiveAssignments: Consecutive
AlignOperands: Align AlignOperands: Align
AllowAllArgumentsOnNextLine: false AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false AllowAllConstructorInitializersOnNextLine: false
@@ -14,7 +15,7 @@ AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Always AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: None AlwaysBreakAfterReturnType: None
@@ -62,7 +63,7 @@ SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: true SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1 SpacesBeforeTrailingComments: 1
SpacesInAngles: false SpacesInAngles: Never
SpacesInCStyleCastParentheses: false SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false SpacesInContainerLiterals: false
SpacesInParentheses: false SpacesInParentheses: false
+35 -9
View File
@@ -73,7 +73,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Setup Dependencies Linux AUR - name: Setup Dependencies Linux AUR
run: | run: |
@@ -173,6 +173,13 @@ jobs:
name: Linux Flatpak name: Linux Flatpak
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
needs: check_changelog 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: steps:
- name: Checkout - name: Checkout
@@ -183,11 +190,22 @@ jobs:
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y \ sudo apt-get install -y \
cmake \ cmake \
qemu-user-static \
flatpak 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' https://flathub.org/repo/flathub.flatpakrepo'
sudo su $(whoami) -c 'flatpak install --user flathub \ sudo su $(whoami) -c 'flatpak --user install -y flathub \
org.flatpak.Builder org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08 -y' 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 - name: Configure Flatpak Manifest
run: | run: |
@@ -224,14 +242,22 @@ jobs:
- name: Build Linux Flatpak - name: Build Linux Flatpak
working-directory: build working-directory: build
run: | run: |
sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --repo=repo --force-clean build-sunshine \ sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --arch=${{ matrix.arch }} --repo=repo --force-clean \
dev.lizardbyte.sunshine.yml' --stop-at=cuda build-sunshine dev.lizardbyte.sunshine.yml'
sudo su $(whoami) -c 'flatpak build-bundle ./repo ../artifacts/sunshine.flatpak dev.lizardbyte.sunshine' 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 -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'
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 - name: Upload Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: sunshine-linux-flatpak name: sunshine-linux-flatpak-${{ matrix.arch }}
path: artifacts/ path: artifacts/
- name: Create Release - name: Create Release
@@ -591,7 +617,7 @@ jobs:
echo "$subport" echo "$subport"
subportlist="$subportlist $subport" subportlist="$subportlist $subport"
done done
echo "::set-output name=subportlist::${subportlist}" echo "subportlist=${subportlist}" >> $GITHUB_OUTPUT
- name: Run port lint for all subports - name: Run port lint for all subports
run: | run: |
+2 -2
View File
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Autoapproving - name: Autoapproving
uses: hmarr/auto-approve-action@v2 uses: hmarr/auto-approve-action@v3
with: with:
github-token: "${{ secrets.GITHUB_TOKEN }}" github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -44,7 +44,7 @@ jobs:
steps: steps:
- name: Automerging - name: Automerging
uses: pascalgn/automerge-action@v0.15.3 uses: pascalgn/automerge-action@v0.15.5
env: env:
BASE_BRANCHES: nightly BASE_BRANCHES: nightly
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
FOUND=false FOUND=false
fi fi
echo "::set-output name=src::${FOUND}" echo "src=${FOUND}" >> $GITHUB_OUTPUT
outputs: outputs:
src: ${{ steps.check.outputs.src }} src: ${{ steps.check.outputs.src }}
+8 -5
View File
@@ -62,17 +62,20 @@ jobs:
# print the git diff # print the git diff
git diff locale/sunshine.po git diff locale/sunshine.po
# set the variable with minimal output # set the variable with minimal output, replacing `\t` with ` `
OUTPUT=$(git diff --numstat locale/sunshine.po) OUTPUT=$(git diff --numstat locale/sunshine.po | sed -e "s#\t# #g")
echo "git_diff=${OUTPUT}" >> $GITHUB_ENV echo "git_diff=${OUTPUT}" >> $GITHUB_ENV
- name: git reset - name: git reset
# only run if a single line changed (date/time) and file already existed # 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 1 locale/sunshine.po' && env.new_file == 'false' }}
if: ${{ env.git_diff == '1\t1\tlocale/sunshine.po' && env.new_file == 'false' }}
run: | run: |
git reset --hard git reset --hard
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Create/Update Pull Request - name: Create/Update Pull Request
uses: peter-evans/create-pull-request@v4 uses: peter-evans/create-pull-request@v4
with: with:
@@ -86,7 +89,7 @@ jobs:
title: New Babel Updates title: New Babel Updates
body: | body: |
Update report Update report
- Updated with *today's* date - Updated ${{ steps.date.outputs.date }}
- Auto-generated by [create-pull-request][1] - Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request [1]: https://github.com/peter-evans/create-pull-request
@@ -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
+25 -10
View File
@@ -17,6 +17,24 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 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 - name: yaml lint
id: yaml-lint id: yaml-lint
uses: ibiqlik/action-yamllint@v3 uses: ibiqlik/action-yamllint@v3
@@ -30,17 +48,14 @@ jobs:
line-length: line-length:
max: 120 max: 120
truthy: 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 check-keys: true
level: error level: warning
file_or_dir: . ${{ steps.find-files.outputs.found }}
- name: Log - name: Log
run: |
echo ${{ steps.yaml-lint.outputs.logfile }}
- name: Upload logs
uses: actions/upload-artifact@v3
if: failure() if: failure()
with: run: |
name: yamllint-logfile cat "${{ steps.yaml-lint.outputs.logfile }}" >> $GITHUB_STEP_SUMMARY
path: ${{ steps.yaml-lint.outputs.logfile }}
@@ -26,40 +26,14 @@ cleanup:
- /share/man - /share/man
modules: 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 - name: boost
disabled: false disabled: false
buildsystem: simple buildsystem: simple
build-commands: build-commands:
- cd tools/build && bison -y -d -o src/engine/jamgram.cpp src/engine/jamgram.y - 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 - ./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: sources:
- type: archive - type: archive
url: http://archive.ubuntu.com/ubuntu/pool/main/b/boost1.74/boost1.74_1.74.0.orig.tar.xz url: http://archive.ubuntu.com/ubuntu/pool/main/b/boost1.74/boost1.74_1.74.0.orig.tar.xz
@@ -74,22 +48,20 @@ modules:
- --disable-doc - --disable-doc
- --disable-programs - --disable-programs
- --disable-decoders - --disable-decoders
- --enable-libfontconfig - --disable-vdpau
- --enable-libfreetype - --disable-audiotoolbox
- --enable-libopus - --disable-videotoolbox
- --enable-libvorbis - --disable-vulkan
- --enable-libvpx - --disable-sdl2
- --disable-filters
- --disable-avfilter
- --disable-postproc
- --disable-autodetect
- --enable-nvenc
- --enable-ffnvcodec
- --enable-vaapi
- --enable-libx264 - --enable-libx264
- --enable-libx265 - --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: cleanup:
- /share - /share
sources: sources:
@@ -107,6 +79,7 @@ modules:
sha256: 8b237e94b08c196a1da22f2f25875f10be4cff3648df4eeff21e00da8f683fc2 sha256: 8b237e94b08c196a1da22f2f25875f10be4cff3648df4eeff21e00da8f683fc2
- name: x265 - name: x265
disabled: false
buildsystem: cmake-ninja buildsystem: cmake-ninja
builddir: true builddir: true
subdir: source subdir: source
@@ -157,24 +130,18 @@ modules:
- --disable-doxygen-html - --disable-doxygen-html
- --disable-manpages - --disable-manpages
- --disable-xmltoman - --disable-xmltoman
- --disable-libevent
sources: sources:
- type: archive - type: archive
url: http://archive.ubuntu.com/ubuntu/pool/main/a/avahi/avahi_0.8.orig.tar.gz url: http://archive.ubuntu.com/ubuntu/pool/main/a/avahi/avahi_0.8.orig.tar.gz
sha256: 060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda 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 - name: libevdev
disabled: false
buildsystem: meson buildsystem: meson
config-opts: config-opts:
- -Ddocumentation=disabled - -Ddocumentation=disabled
- -Dtests=disabled
cleanup: cleanup:
- /bin - /bin
sources: sources:
@@ -182,17 +149,36 @@ modules:
url: http://archive.ubuntu.com/ubuntu/pool/main/libe/libevdev/libevdev_1.13.0+dfsg.orig.tar.xz url: http://archive.ubuntu.com/ubuntu/pool/main/libe/libevdev/libevdev_1.13.0+dfsg.orig.tar.xz
sha256: a882e13ef1dd6bd227318080cabf60fe5af3c06471259d3acfc9dbfb202351a7 sha256: a882e13ef1dd6bd227318080cabf60fe5af3c06471259d3acfc9dbfb202351a7
modules: - name: cuda
- name: libcheck disabled: false
buildsystem: cmake buildsystem: simple
cleanup: only-arches:
- /bin - x86_64
sources: - aarch64
- type: archive cleanup:
url: http://archive.ubuntu.com/ubuntu/pool/universe/c/check/check_0.15.2.orig.tar.gz - '*'
sha256: 8451b68ac5d6f3157b24f22eceff575bcf566264f6d78f3852f89d4e08cf42e1 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
- 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 - name: sunshine
disabled: false
buildsystem: cmake buildsystem: cmake
no-make-install: false no-make-install: false
builddir: true builddir: true
+1 -1
View File
@@ -1,5 +1,5 @@
Babel==2.10.3 Babel==2.10.3
m2r2==0.3.2 m2r2==0.3.2
Sphinx==5.2.3 Sphinx==5.3.0
sphinx-copybutton==0.5.0 sphinx-copybutton==0.5.0
sphinx-rtd-theme==1.0.0 sphinx-rtd-theme==1.0.0
+1
View File
@@ -365,6 +365,7 @@ display_t make_display(std::variant<gbm::gbm_t::pointer, wl_display *, _XDisplay
"EGL_KHR_create_context", "EGL_KHR_create_context",
"EGL_KHR_surfaceless_context", "EGL_KHR_surfaceless_context",
"EGL_EXT_image_dma_buf_import", "EGL_EXT_image_dma_buf_import",
"EGL_EXT_image_dma_buf_import_modifiers",
}; };
for(auto ext : extensions) { for(auto ext : extensions) {
+28 -6
View File
@@ -192,8 +192,9 @@ std::vector<ctx_t> &proc_t::get_apps() {
} }
// Gets application image from application list. // Gets application image from application list.
// Returns image from assets directory if found there.
// Returns default image if image configuration is not set. // 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) { std::string proc_t::get_app_image(int app_id) {
auto app_index = app_id - 1; auto app_index = app_id - 1;
if(app_index < 0 || app_index >= _apps.size()) { if(app_index < 0 || app_index >= _apps.size()) {
@@ -201,20 +202,41 @@ std::string proc_t::get_app_image(int app_id) {
return SUNSHINE_ASSETS_DIR "/box.png"; return SUNSHINE_ASSETS_DIR "/box.png";
} }
auto default_image = SUNSHINE_ASSETS_DIR "/box.png";
auto app_image_path = _apps[app_index].image_path; auto app_image_path = _apps[app_index].image_path;
if(app_image_path.empty()) { if(app_image_path.empty()) {
return SUNSHINE_ASSETS_DIR "/box.png"; // image is empty, return default box image
return default_image;
} }
// get the image extension and convert it to lowercase
auto image_extension = std::filesystem::path(app_image_path).extension().string(); auto image_extension = std::filesystem::path(app_image_path).extension().string();
boost::to_lower(image_extension); boost::to_lower(image_extension);
std::error_code code; // return the default box image if extension is not "png"
if(!std::filesystem::exists(app_image_path, code) || image_extension != ".png") { if(image_extension != ".png") {
return SUNSHINE_ASSETS_DIR "/box.png"; return default_image;
} }
// return only "content-type" http header compatible image type. // check if image is in assets directory
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
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 default_image;
}
// image is a png, and not in assets directory
// return only "content-type" http header compatible image type
return app_image_path; return app_image_path;
} }
+1 -1
View File
@@ -14,7 +14,7 @@
"output":"steam.txt", "output":"steam.txt",
"detached":["setsid steam steam://open/bigpicture"], "detached":["setsid steam steam://open/bigpicture"],
"image-path":"./assets/steam.png" "image-path":"steam.png"
} }
] ]
} }
+1 -1
View File
@@ -8,7 +8,7 @@
"output":"steam.txt", "output":"steam.txt",
"detached":["steam steam://open/bigpicture"], "detached":["steam steam://open/bigpicture"],
"image-path":"./assets/steam.png" "image-path":"steam.png"
} }
] ]
} }