fix yaml-lint errors

This commit is contained in:
ReenigneArcher
2022-08-07 20:26:40 -04:00
parent 4d3c9b0be8
commit 1d242aed7c
12 changed files with 348 additions and 265 deletions
+7 -3
View File
@@ -1,3 +1,4 @@
---
name: Bug Report name: Bug Report
description: Create a bug report to help us improve. description: Create a bug report to help us improve.
body: body:
@@ -5,7 +6,7 @@ body:
attributes: attributes:
value: > value: >
**THIS IS NOT THE PLACE TO ASK FOR SUPPORT!** **THIS IS NOT THE PLACE TO ASK FOR SUPPORT!**
Please use [Discord](https://docs.lizardbyte.dev/about/support.html#discord) for support issues. Please use [Discord](https://docs.lizardbyte.dev/en/latest/about/support.html#discord) for support issues.
- type: textarea - type: textarea
id: description id: description
attributes: attributes:
@@ -90,9 +91,12 @@ body:
id: logs id: logs
attributes: attributes:
label: Relevant log output label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. description: |
Please copy and paste any relevant log output. This will be automatically formatted into code,
so no need for backticks.
render: Shell render: Shell
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Make sure to close your issue when it's solved! If you found the solution yourself please comment so that others benefit from it. Make sure to close your issue when it's solved! If you found the solution yourself please comment
so that others benefit from it.
+1
View File
@@ -1,3 +1,4 @@
---
# This action is centrally managed in https://github.com/<organization>/.github/ # This action 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.
+181 -142
View File
@@ -1,3 +1,4 @@
---
name: CI name: CI
on: on:
@@ -52,7 +53,8 @@ jobs:
- name: Check CMakeLists.txt Version - name: Check CMakeLists.txt Version
run: | run: |
version=$(grep -o -E '^project\(Sunshine VERSION [0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+') version=$(grep -o -E '^project\(Sunshine VERSION [0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt | \
grep -o -E '[0-9]+\.[0-9]+\.[0-9]+')
echo "cmakelists_version=${version}" >> $GITHUB_ENV echo "cmakelists_version=${version}" >> $GITHUB_ENV
- name: Compare CMakeList.txt Version - name: Compare CMakeList.txt Version
@@ -60,7 +62,8 @@ jobs:
run: | run: |
echo CMakeLists version: "$cmakelists_version" echo CMakeLists version: "$cmakelists_version"
echo Changelog version: "${{ needs.check_changelog.outputs.next_version_bare }}" echo Changelog version: "${{ needs.check_changelog.outputs.next_version_bare }}"
echo Within 'CMakeLists.txt' change "project(Sunshine [VERSION $cmakelists_version]" to "project(Sunshine [VERSION ${{ needs.check_changelog.outputs.next_version_bare }}]" echo Within 'CMakeLists.txt' change "project(Sunshine [VERSION $cmakelists_version]" to \
"project(Sunshine [VERSION ${{ needs.check_changelog.outputs.next_version_bare }}]"
exit 1 exit 1
build_linux_aur: build_linux_aur:
@@ -76,7 +79,7 @@ jobs:
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y \ sudo apt-get install -y \
cmake cmake
- name: Configure PKGBUILD files - name: Configure PKGBUILD files
run: | run: |
@@ -86,47 +89,55 @@ jobs:
sub_version="" sub_version=""
conflicts="'sunshine'" conflicts="'sunshine'"
provides="'sunshine'" provides="'sunshine'"
branch=${GITHUB_HEAD_REF} branch=${GITHUB_HEAD_REF}
# check the branch variable # check the branch variable
if [ -z "$branch" ] if [ -z "$branch" ]
then then
echo "This is a PUSH event" echo "This is a PUSH event"
commit=${{ github.sha }} commit=${{ github.sha }}
clone_url=${{ github.event.repository.clone_url }} clone_url=${{ github.event.repository.clone_url }}
if [[ ${{ github.ref == 'refs/heads/master' }} ]]; then if [[ ${{ github.ref == 'refs/heads/master' }} ]]; then
aur_pkg=sunshine aur_pkg=sunshine
conflicts="" conflicts=""
provides="" provides=""
echo "aur_publish=true" >> $GITHUB_ENV echo "aur_publish=true" >> $GITHUB_ENV
elif [[ ${{ github.ref == 'refs/heads/nightly' }} ]]; then elif [[ ${{ github.ref == 'refs/heads/nightly' }} ]]; then
aur_pkg=sunshine-git aur_pkg=sunshine-git
sub_version=".r${commit}"
echo "aur_publish=true" >> $GITHUB_ENV
fi
else
echo "This is a PR event"
commit=${{ github.event.pull_request.head.sha }}
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
sub_version=".r${commit}" sub_version=".r${commit}"
echo "aur_publish=true" >> $GITHUB_ENV
fi
else
echo "This is a PR event"
commit=${{ github.event.pull_request.head.sha }}
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
sub_version=".r${commit}"
fi fi
echo "Commit: ${commit}" echo "Commit: ${commit}"
echo "Clone URL: ${clone_url}" echo "Clone URL: ${clone_url}"
echo "aur_pkg=${aur_pkg}" >> $GITHUB_ENV echo "aur_pkg=${aur_pkg}" >> $GITHUB_ENV
mkdir -p artifacts mkdir -p artifacts
mkdir -p build mkdir -p build
cd build cd build
cmake -DSUNSHINE_CONFIGURE_AUR=ON -DSUNSHINE_AUR_PKG=${aur_pkg} -DSUNSHINE_SUB_VERSION=${sub_version} -DSUNSHINE_AUR_CONFLICTS=${conflicts} -DSUNSHINE_AUR_PROVIDES=${provides} -DGITHUB_CLONE_URL=${clone_url} -DGITHUB_COMMIT=${commit} -DSUNSHINE_CONFIGURE_ONLY=ON .. cmake -DSUNSHINE_CONFIGURE_AUR=ON \
-DSUNSHINE_AUR_PKG=${aur_pkg} \
-DSUNSHINE_SUB_VERSION=${sub_version} \
-DSUNSHINE_AUR_CONFLICTS=${conflicts} \
-DSUNSHINE_AUR_PROVIDES=${provides} \
-DGITHUB_CLONE_URL=${clone_url} \
-DGITHUB_COMMIT=${commit} \
-DSUNSHINE_CONFIGURE_ONLY=ON \
..
cd .. cd ..
mv ./build/PKGBUILD ./artifacts/ mv ./build/PKGBUILD ./artifacts/
- name: Validate package - name: Validate package
@@ -172,42 +183,50 @@ jobs:
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y \ sudo apt-get install -y \
cmake \ cmake \
flatpak flatpak
sudo su $(whoami) -c 'flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo' sudo su $(whoami) -c 'flatpak remote-add --user --if-not-exists flathub \
sudo su $(whoami) -c 'flatpak install --user flathub org.flatpak.Builder org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08 -y' 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'
- name: Configure Flatpak Manifest - name: Configure Flatpak Manifest
run: | run: |
# variables for manifest # variables for manifest
branch=${GITHUB_HEAD_REF} branch=${GITHUB_HEAD_REF}
# check the branch variable # check the branch variable
if [ -z "$branch" ] if [ -z "$branch" ]
then then
echo "This is a PUSH event" echo "This is a PUSH event"
branch=${{ github.ref_name }} branch=${{ github.ref_name }}
commit=${{ github.sha }} commit=${{ github.sha }}
clone_url=${{ github.event.repository.clone_url }} clone_url=${{ github.event.repository.clone_url }}
else else
echo "This is a PR event" echo "This is a PR event"
commit=${{ github.event.pull_request.head.sha }} commit=${{ github.event.pull_request.head.sha }}
clone_url=${{ github.event.pull_request.head.repo.clone_url }} clone_url=${{ github.event.pull_request.head.repo.clone_url }}
fi fi
echo "Branch: ${branch}" echo "Branch: ${branch}"
echo "Commit: ${commit}" echo "Commit: ${commit}"
echo "Clone URL: ${clone_url}" echo "Clone URL: ${clone_url}"
mkdir -p build mkdir -p build
mkdir -p artifacts mkdir -p artifacts
cd build cd build
cmake -DGITHUB_CLONE_URL=${clone_url} -DGITHUB_BRANCH=${branch} -DGITHUB_COMMIT=${commit} -DSUNSHINE_CONFIGURE_FLATPAK=ON -DSUNSHINE_CONFIGURE_ONLY=ON .. cmake -DGITHUB_CLONE_URL=${clone_url} \
-DGITHUB_BRANCH=${branch} \
-DGITHUB_COMMIT=${commit} \
-DSUNSHINE_CONFIGURE_FLATPAK=ON \
-DSUNSHINE_CONFIGURE_ONLY=ON \
..
- 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 dev.lizardbyte.sunshine.yml' 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 build-bundle ./repo ../artifacts/sunshine.flatpak dev.lizardbyte.sunshine'
- name: Upload Artifacts - name: Upload Artifacts
@@ -232,7 +251,7 @@ jobs:
strategy: strategy:
fail-fast: false # false to test all, true to fail entire job if any fail fail-fast: false # false to test all, true to fail entire job if any fail
matrix: matrix:
include: # package these differently include: # package these differently
- type: cpack - type: cpack
CMAKE_INSTALL_PREFIX: '/usr' CMAKE_INSTALL_PREFIX: '/usr'
SUNSHINE_ASSETS_DIR: 'local/sunshine/assets' SUNSHINE_ASSETS_DIR: 'local/sunshine/assets'
@@ -255,57 +274,60 @@ jobs:
sudo add-apt-repository ppa:savoury1/ffmpeg4 -y sudo add-apt-repository ppa:savoury1/ffmpeg4 -y
# sudo add-apt-repository ppa:savoury1/boost-defaults-1.71 -y # sudo add-apt-repository ppa:savoury1/boost-defaults-1.71 -y
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y \ sudo apt-get install -y \
build-essential \ build-essential \
cmake \ cmake \
gcc-10 \ gcc-10 \
git \ git \
g++-10 \ g++-10 \
libavdevice-dev \ libavdevice-dev \
libboost-filesystem-dev \ libboost-filesystem-dev \
libboost-log-dev \ libboost-log-dev \
libboost-thread-dev \ libboost-thread-dev \
libcap-dev \ libcap-dev \
libdrm-dev \ libdrm-dev \
libevdev-dev \ libevdev-dev \
libpulse-dev \ libpulse-dev \
libopus-dev \ libopus-dev \
libssl-dev \ libssl-dev \
libwayland-dev \ libwayland-dev \
libx11-dev \ libx11-dev \
libxcb-shm0-dev \ libxcb-shm0-dev \
libxcb-xfixes0-dev \ libxcb-xfixes0-dev \
libxcb1-dev \ libxcb1-dev \
libxfixes-dev \ libxfixes-dev \
libxrandr-dev \ libxrandr-dev \
libxtst-dev \ libxtst-dev \
wget wget
# # Ubuntu 20.04+ packages # # Ubuntu 20.04+ packages
# libboost-filesystem-dev # libboost-filesystem-dev
# libboost-log-dev # libboost-log-dev
# libboost-thread-dev # libboost-thread-dev
# # Ubuntu 18.04 packages # # Ubuntu 18.04 packages
# libboost-filesystem1.71-dev \ # libboost-filesystem1.71-dev \
# libboost-log1.71-dev \ # libboost-log1.71-dev \
# libboost-regex1.71-dev \ # libboost-regex1.71-dev \
# libboost-thread1.71-dev \ # libboost-thread1.71-dev \
# clean apt cache # clean apt cache
sudo apt-get clean sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/* sudo rm -rf /var/lib/apt/lists/*
# Update gcc alias # Update gcc alias
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 sudo update-alternatives --install \
/usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
# Install CuDA # Install CuDA
sudo wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O /root/cuda.run sudo wget \
https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run \
--progress=bar:force:noscroll -q --show-progress -O /root/cuda.run
sudo chmod a+x /root/cuda.run sudo chmod a+x /root/cuda.run
sudo /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm sudo /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm
sudo rm /root/cuda.run sudo rm /root/cuda.run
# # Install cmake (necessary for 18.04) # # Install cmake (necessary for 18.04)
# wget https://cmake.org/files/v3.22/cmake-3.22.2-linux-x86_64.sh # wget https://cmake.org/files/v3.22/cmake-3.22.2-linux-x86_64.sh
# chmod +x cmake-3.22.2-linux-x86_64.sh # chmod +x cmake-3.22.2-linux-x86_64.sh
@@ -318,9 +340,19 @@ jobs:
run: | run: |
mkdir -p build mkdir -p build
mkdir -p artifacts mkdir -p artifacts
cd build cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ matrix.CMAKE_INSTALL_PREFIX }} -DSUNSHINE_ASSETS_DIR=${{ matrix.SUNSHINE_ASSETS_DIR }} -DSUNSHINE_CONFIG_DIR=${{ matrix.SUNSHINE_CONFIG_DIR }} -DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine -DSUNSHINE_ENABLE_WAYLAND=ON -DSUNSHINE_ENABLE_X11=ON -DSUNSHINE_ENABLE_DRM=ON -DSUNSHINE_ENABLE_CUDA=ON ${{ matrix.EXTRA_ARGS }} .. cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ matrix.CMAKE_INSTALL_PREFIX }} \
-DSUNSHINE_ASSETS_DIR=${{ matrix.SUNSHINE_ASSETS_DIR }} \
-DSUNSHINE_CONFIG_DIR=${{ matrix.SUNSHINE_CONFIG_DIR }} \
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-DSUNSHINE_ENABLE_WAYLAND=ON \
-DSUNSHINE_ENABLE_X11=ON \
-DSUNSHINE_ENABLE_DRM=ON \
-DSUNSHINE_ENABLE_CUDA=ON \
${{ matrix.EXTRA_ARGS }} \
..
make -j ${nproc} make -j ${nproc}
- name: Package Linux - CPACK - name: Package Linux - CPACK
@@ -336,7 +368,7 @@ jobs:
mv ./cpack_artifacts/Sunshine.rpm ../artifacts/sunshine.rpm mv ./cpack_artifacts/Sunshine.rpm ../artifacts/sunshine.rpm
- name: Set AppImage Version - name: Set AppImage Version
if: ${{ matrix.type == 'appimage' && ( needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.latest_version ) }} if: ${{ matrix.type == 'appimage' && ( needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.latest_version ) }} # yamllint disable-line rule:line-length
run: | run: |
version=${{ needs.check_changelog.outputs.next_version_bare }} version=${{ needs.check_changelog.outputs.next_version_bare }}
echo "VERSION=${version}" >> $GITHUB_ENV echo "VERSION=${version}" >> $GITHUB_ENV
@@ -347,43 +379,44 @@ jobs:
run: | run: |
# install sunshine to the DESTDIR # install sunshine to the DESTDIR
make install DESTDIR=AppDir make install DESTDIR=AppDir
# portable home and config # portable home and config
# todo - this is ugly... we should use a custom AppRun script to take care of this # todo - this is ugly... we should use a custom AppRun script to take care of this
mv ./AppDir${{ matrix.CMAKE_INSTALL_PREFIX }}/sunshine.AppImage.* ../artifacts/ mv ./AppDir${{ matrix.CMAKE_INSTALL_PREFIX }}/sunshine.AppImage.* ../artifacts/
mkdir -p ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/.config/sunshine/${{ matrix.SUNSHINE_CONFIG_DIR }} mkdir -p ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/.config/sunshine/${{ matrix.SUNSHINE_CONFIG_DIR }}
cp ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/apps.json ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/.config/sunshine/${{ matrix.SUNSHINE_CONFIG_DIR }}/ cp ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/apps.json \
../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/.config/sunshine/${{ matrix.SUNSHINE_CONFIG_DIR }}/
# variables # variables
DESKTOP_FILE="${DESKTOP_FILE:-sunshine.desktop}" DESKTOP_FILE="${DESKTOP_FILE:-sunshine.desktop}"
ICON_FILE="${ICON_FILE:-sunshine.png}" ICON_FILE="${ICON_FILE:-sunshine.png}"
# AppImage # AppImage
# https://docs.appimage.org/packaging-guide/index.html # https://docs.appimage.org/packaging-guide/index.html
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage chmod +x linuxdeploy-x86_64.AppImage
# # https://github.com/linuxdeploy/linuxdeploy-plugin-gtk # # https://github.com/linuxdeploy/linuxdeploy-plugin-gtk
# sudo apt-get install libgtk-3-dev librsvg2-dev -y # sudo apt-get install libgtk-3-dev librsvg2-dev -y
# wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh # wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
# chmod +x linuxdeploy-plugin-gtk.sh # chmod +x linuxdeploy-plugin-gtk.sh
# export DEPLOY_GTK_VERSION=3 # export DEPLOY_GTK_VERSION=3
./linuxdeploy-x86_64.AppImage \ ./linuxdeploy-x86_64.AppImage \
--appdir ./AppDir \ --appdir ./AppDir \
--executable ./sunshine \ --executable ./sunshine \
--icon-file "../$ICON_FILE" \ --icon-file "../$ICON_FILE" \
--desktop-file "./$DESKTOP_FILE" \ --desktop-file "./$DESKTOP_FILE" \
--library /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 \ --library /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 \
--library /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 \ --library /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 \
--library /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 \ --library /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 \
--output appimage --output appimage
# # add this argument back if using gtk plugin # # add this argument back if using gtk plugin
# --plugin gtk \ # --plugin gtk \
# move # move
mv Sunshine*.AppImage ../artifacts/sunshine.AppImage mv Sunshine*.AppImage ../artifacts/sunshine.AppImage
# permissions # permissions
chmod +x ../artifacts/sunshine.AppImage chmod +x ../artifacts/sunshine.AppImage
@@ -392,9 +425,9 @@ jobs:
run: | run: |
wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage
chmod +x appimagelint-x86_64.AppImage chmod +x appimagelint-x86_64.AppImage
# rm -rf ~/.cache/appimagelint/ # rm -rf ~/.cache/appimagelint/
./appimagelint-x86_64.AppImage ./artifacts/sunshine.AppImage ./appimagelint-x86_64.AppImage ./artifacts/sunshine.AppImage
- name: Archive AppImage - name: Archive AppImage
@@ -402,7 +435,7 @@ jobs:
working-directory: artifacts working-directory: artifacts
run: | run: |
chmod +x ./sunshine.AppImage chmod +x ./sunshine.AppImage
zip --recurse-paths --move --test ./sunshine-appimage.zip ./* zip --recurse-paths --move --test ./sunshine-appimage.zip ./*
- name: Upload Artifacts - name: Upload Artifacts
@@ -443,7 +476,11 @@ jobs:
run: | run: |
mkdir build mkdir build
cd build cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DSUNSHINE_ASSETS_DIR=local/sunshine/assets -DSUNSHINE_CONFIG_DIR=local/sunshine/config .. cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSUNSHINE_ASSETS_DIR=local/sunshine/assets \
-DSUNSHINE_CONFIG_DIR=local/sunshine/config \
..
make -j ${nproc} make -j ${nproc}
- name: Package MacOS - name: Package MacOS
@@ -454,10 +491,10 @@ jobs:
# package # package
cpack -G DragNDrop cpack -G DragNDrop
mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-macos-experimental-dragndrop.dmg mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-macos-experimental-dragndrop.dmg
cpack -G Bundle cpack -G Bundle
mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-macos-experimental-bundle.dmg mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-macos-experimental-bundle.dmg
cpack -G ZIP cpack -G ZIP
mv ./cpack_artifacts/Sunshine.zip ../artifacts/sunshine-macos-experimental-archive.zip mv ./cpack_artifacts/Sunshine.zip ../artifacts/sunshine-macos-experimental-archive.zip
@@ -476,25 +513,20 @@ jobs:
rm -f ./sunshine-macos-experimental-bundle.dmg rm -f ./sunshine-macos-experimental-bundle.dmg
rm -f ./sunshine-macos-experimental-archive.zip rm -f ./sunshine-macos-experimental-archive.zip
# no artifacts to release currently ## no artifacts to release currently
# - name: Create Release # - name: Create Release
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} # if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
# uses: LizardByte/.github/actions/create_release@master # uses: LizardByte/.github/actions/create_release@master
# with: # with:
# token: ${{ secrets.GH_BOT_TOKEN }} # token: ${{ secrets.GH_BOT_TOKEN }}
# next_version: ${{ needs.check_changelog.outputs.next_version }} # next_version: ${{ needs.check_changelog.outputs.next_version }}
# last_version: ${{ needs.check_changelog.outputs.last_version }} # last_version: ${{ needs.check_changelog.outputs.last_version }}
# release_body: ${{ needs.check_changelog.outputs.release_body }} # release_body: ${{ needs.check_changelog.outputs.release_body }}
build_mac_port: build_mac_port:
name: Macports name: Macports
needs: check_changelog needs: check_changelog
runs-on: macos-11 runs-on: macos-11
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [ macos-10.15, macos-11, macos-12 ]
steps: steps:
- name: Checkout - name: Checkout
@@ -522,42 +554,45 @@ jobs:
run: | run: |
# variables for Portfile # variables for Portfile
branch=${GITHUB_HEAD_REF} branch=${GITHUB_HEAD_REF}
# check the branch variable # check the branch variable
if [ -z "$branch" ] if [ -z "$branch" ]
then then
echo "This is a PUSH event" echo "This is a PUSH event"
commit=${{ github.sha }} commit=${{ github.sha }}
clone_url=${{ github.event.repository.clone_url }} clone_url=${{ github.event.repository.clone_url }}
else else
echo "This is a PR event" echo "This is a PR event"
commit=${{ github.event.pull_request.head.sha }} commit=${{ github.event.pull_request.head.sha }}
clone_url=${{ github.event.pull_request.head.repo.clone_url }} clone_url=${{ github.event.pull_request.head.repo.clone_url }}
fi fi
echo "Commit: ${commit}" echo "Commit: ${commit}"
echo "Clone URL: ${clone_url}" echo "Clone URL: ${clone_url}"
mkdir build mkdir build
cd build cd build
cmake -DGITHUB_COMMIT=${commit} -DGITHUB_CLONE_URL=${clone_url} -DSUNSHINE_CONFIGURE_PORTFILE=ON -DSUNSHINE_CONFIGURE_ONLY=ON .. cmake -DGITHUB_COMMIT=${commit} \
-DGITHUB_CLONE_URL=${clone_url} \
-DSUNSHINE_CONFIGURE_PORTFILE=ON \
-DSUNSHINE_CONFIGURE_ONLY=ON \
..
cd .. cd ..
# copy Portfile to artifacts # copy Portfile to artifacts
mkdir -p artifacts mkdir -p artifacts
cp -f ./build/Portfile ./artifacts/ cp -f ./build/Portfile ./artifacts/
# copy Portfile to ports # copy Portfile to ports
mkdir -p ./ports/multimedia/Sunshine mkdir -p ./ports/multimedia/Sunshine
cp -f ./build/Portfile ./ports/multimedia/Sunshine/Portfile cp -f ./build/Portfile ./ports/multimedia/Sunshine/Portfile
# testing # testing
cat ./artifacts/Portfile cat ./artifacts/Portfile
- name: Bootstrap MacPorts - name: Bootstrap MacPorts
run: | run: |
. ports/.github/workflows/bootstrap.sh . ports/.github/workflows/bootstrap.sh
# Add getopt, mpbb and the MacPorts paths to $PATH for the subsequent steps. # Add getopt, mpbb and the MacPorts paths to $PATH for the subsequent steps.
echo "/opt/mports/bin" >> $GITHUB_PATH echo "/opt/mports/bin" >> $GITHUB_PATH
echo "${PWD}/mpbb" >> $GITHUB_PATH echo "${PWD}/mpbb" >> $GITHUB_PATH
@@ -573,12 +608,12 @@ jobs:
echo "Listing subports for Sunshine" echo "Listing subports for Sunshine"
new_subports=$(mpbb \ new_subports=$(mpbb \
--work-dir /tmp/mpbb \ --work-dir /tmp/mpbb \
list-subports \ list-subports \
--archive-site= \ --archive-site= \
--archive-site-private= \ --archive-site-private= \
--include-deps=no \ --include-deps=no \
"$port" \ "$port" \
| tr '\n' ' ') | tr '\n' ' ')
for subport in $new_subports; do for subport in $new_subports; do
echo "$subport" echo "$subport"
@@ -671,14 +706,14 @@ jobs:
work=$(port work sunshine) work=$(port work sunshine)
echo "Sunshine port work directory: ${work}" echo "Sunshine port work directory: ${work}"
# move components out of port work directory # move components out of port work directory
sudo mv ${work}/Sunshine*component.pkg /tmp/ sudo mv ${work}/Sunshine*component.pkg /tmp/
# copy artifacts # copy artifacts
sudo mv ${work}/Sunshine*.pkg ./artifacts/sunshine.pkg sudo mv ${work}/Sunshine*.pkg ./artifacts/sunshine.pkg
sudo mv ${work}/Sunshine*.dmg ./artifacts/sunshine.dmg sudo mv ${work}/Sunshine*.dmg ./artifacts/sunshine.dmg
# move components back # move components back
# sudo mv /tmp/Sunshine*component.pkg ${work}/ # sudo mv /tmp/Sunshine*component.pkg ${work}/
@@ -733,7 +768,11 @@ jobs:
run: | run: |
mkdir build mkdir build
cd build cd build
cmake -DCMAKE_BUILD_TYPE=Release -DSUNSHINE_ASSETS_DIR=assets -DSUNSHINE_CONFIG_DIR=config -G "MinGW Makefiles" .. cmake -DCMAKE_BUILD_TYPE=Release \
-DSUNSHINE_ASSETS_DIR=assets \
-DSUNSHINE_CONFIG_DIR=config \
-G "MinGW Makefiles" \
..
mingw32-make -j2 mingw32-make -j2
- name: Package Windows - name: Package Windows
-31
View File
@@ -1,31 +0,0 @@
name: clang-format-lint
on:
pull_request:
branches: [master, nightly]
types: [opened, synchronize, reopened]
jobs:
lint:
name: Clang Format Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clang format lint
uses: DoozyX/clang-format-lint-action@v0.14
with:
source: './sunshine'
extensions: 'cpp,h,m,mm'
clangFormatVersion: 13
style: file
inplace: false
- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: sunshine
path: sunshine/
@@ -0,0 +1,60 @@
---
# This action 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
# the above-mentioned repo.
name: Clang Format Lint
on:
pull_request:
branches: [master, nightly]
types: [opened, synchronize, reopened]
jobs:
check_src:
name: Check src
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check
id: check
run: |
if [ -d "./src" ]
then
FOUND=true
else
FOUND=false
fi
echo "::set-output name=src::${FOUND}"
outputs:
src: ${{ steps.check.outputs.src }}
lint:
name: Clang Format Lint
needs: [check_src]
if: ${{ needs.check_src.outputs.src == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clang format lint
uses: DoozyX/clang-format-lint-action@v0.14
with:
source: './src'
extensions: 'cpp,h,m,mm'
clangFormatVersion: 13
style: file
inplace: false
- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: clang-format-fixes
path: src/
+64 -62
View File
@@ -1,3 +1,4 @@
---
name: localize name: localize
on: on:
@@ -18,76 +19,77 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install Python 3.9 - name: Install Python 3.9
uses: actions/setup-python@v4 # https://github.com/actions/setup-python uses: actions/setup-python@v4 # https://github.com/actions/setup-python
with: with:
python-version: '3.9' python-version: '3.9'
- name: Set up Python 3.9 Dependencies - name: Set up Python 3.9 Dependencies
run: | run: |
cd ./scripts cd ./scripts
python -m pip install --upgrade pip setuptools python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt python -m pip install -r requirements.txt
- name: Set up xgettext - name: Set up xgettext
run: | run: |
sudo apt-get update -y && \ sudo apt-get update -y && \
sudo apt-get --reinstall install -y \ sudo apt-get --reinstall install -y \
gettext gettext
- name: Update Strings - name: Update Strings
run: | run: |
# first, try to remove existing file as xgettext does not remove unused translations # first, try to remove existing file as xgettext does not remove unused translations
if [ -f "${{ env.file }}" ]; if [ -f "${{ env.file }}" ];
then then
rm ${{ env.file }} rm ${{ env.file }}
echo "new_file=false" >> $GITHUB_ENV echo "new_file=false" >> $GITHUB_ENV
else else
echo "new_file=true" >> $GITHUB_ENV echo "new_file=true" >> $GITHUB_ENV
fi fi
# extract the new strings # extract the new strings
python ./scripts/_locale.py --extract python ./scripts/_locale.py --extract
- name: git diff - name: git diff
if: ${{ env.new_file == 'false' }} if: ${{ env.new_file == 'false' }}
run: | run: |
# disable the pager # disable the pager
git config --global pager.diff false git config --global pager.diff false
# 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
OUTPUT=$(git diff --numstat locale/sunshine.po) OUTPUT=$(git diff --numstat locale/sunshine.po)
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
if: ${{ env.git_diff == '1 1 locale/sunshine.po' && env.new_file == 'false' }} # \t in next line is a tab character
run: | if: ${{ env.git_diff == '1\t1\tlocale/sunshine.po' && env.new_file == 'false' }}
git reset --hard run: |
git reset --hard
- 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:
add-paths: | add-paths: |
locale/*.po locale/*.po
token: ${{ secrets.GH_BOT_TOKEN }} # must trigger PR tests token: ${{ secrets.GH_BOT_TOKEN }} # must trigger PR tests
commit-message: New localization template commit-message: New localization template
branch: localize/update branch: localize/update
delete-branch: true delete-branch: true
base: nightly base: nightly
title: New Babel Updates title: New Babel Updates
body: | body: |
Update report Update report
- Updated with *today's* date - Updated with *today's* 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
labels: | labels: |
babel babel
l10n l10n
+1
View File
@@ -1,3 +1,4 @@
---
# This action is centrally managed in https://github.com/<organization>/.github/ # This action 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.
+1
View File
@@ -1,3 +1,4 @@
---
# This action is centrally managed in https://github.com/<organization>/.github/ # This action 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.
+17 -14
View File
@@ -1,14 +1,17 @@
name: Publish to WinGet ---
name: Publish to WinGet
on:
release: on:
types: [released] release:
types: [released]
jobs:
publish: jobs:
runs-on: windows-latest winget-releaser:
steps: name: winget releaser
- uses: vedantmgoyal2009/winget-releaser@latest runs-on: windows-latest
with: steps:
identifier: LizardByte.Sunshine - name: winget releaser
token: ${{ secrets.GH_BOT_TOKEN }} uses: vedantmgoyal2009/winget-releaser@latest
with:
identifier: LizardByte.Sunshine
token: ${{ secrets.GH_BOT_TOKEN }}
+4 -3
View File
@@ -1,3 +1,4 @@
---
# .readthedocs.yaml # .readthedocs.yaml
# Read the Docs configuration file # Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
@@ -25,9 +26,9 @@ build:
# - cmake . # - cmake .
## Include the submodules, required for cmake ## Include the submodules, required for cmake
#submodules: # submodules:
# include: all # include: all
# recursive: true # recursive: true
# Build documentation in the docs/ directory with Sphinx # Build documentation in the docs/ directory with Sphinx
sphinx: sphinx:
+4 -3
View File
@@ -1,3 +1,4 @@
---
"base_path": "." "base_path": "."
"base_url": "https://api.crowdin.com" # optional (for Crowdin Enterprise only) "base_url": "https://api.crowdin.com" # optional (for Crowdin Enterprise only)
"preserve_hierarchy": false # flatten tree on crowdin "preserve_hierarchy": false # flatten tree on crowdin
@@ -6,10 +7,10 @@
"l10n" "l10n"
] ]
"files" : [ "files": [
{ {
"source" : "/locale/*.po", "source": "/locale/*.po",
"translation" : "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%", "translation": "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%",
"languages_mapping": { "languages_mapping": {
"two_letters_code": { "two_letters_code": {
# map non-two letter codes here, left side is crowdin designation, right side is babel designation # map non-two letter codes here, left side is crowdin designation, right side is babel designation
@@ -1,3 +1,4 @@
---
app-id: dev.lizardbyte.sunshine app-id: dev.lizardbyte.sunshine
runtime: org.freedesktop.Platform runtime: org.freedesktop.Platform
runtime-version: "21.08" runtime-version: "21.08"
@@ -35,7 +36,7 @@ modules:
- '*' - '*'
build-commands: build-commands:
- chmod u+x ./cuda.run - 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 - ./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 -r $FLATPAK_DEST/cuda/nsight-systems-2021.3.2
- rm ./cuda.run - rm ./cuda.run
sources: sources:
@@ -48,7 +49,7 @@ modules:
- type: file - type: file
only-arches: only-arches:
- aarch64 - aarch64
url: https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux_sbsa.run 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 sha256: f2c4a52e06329606c8dfb7c5ea3f4cb4c0b28f9d3fdffeeb734fcc98daf580d8
dest-filename: cuda.run dest-filename: cuda.run
@@ -56,7 +57,7 @@ modules:
buildsystem: simple buildsystem: simple
build-commands: build-commands:
- ./bootstrap.sh --prefix=$FLATPAK_DEST --with-libraries=system,thread,log - ./bootstrap.sh --prefix=$FLATPAK_DEST --with-libraries=system,thread,log
- ./b2 install variant=release link=static,shared runtime-link=shared cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" -j $FLATPAK_BUILDER_N_JOBS - ./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
sources: sources:
- type: archive - type: archive
url: https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2 url: https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2
@@ -170,7 +171,7 @@ modules:
- /bin - /bin
sources: sources:
- type: archive - type: archive
url: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz url: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz # yamllint disable-line rule:line-length
sha256: 92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb sha256: 92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
- name: libevdev - name: libevdev
@@ -210,6 +211,6 @@ modules:
- -DSUNSHINE_ENABLE_CUDA=ON - -DSUNSHINE_ENABLE_CUDA=ON
sources: sources:
- type: git - type: git
url: @GITHUB_CLONE_URL@ url: '@GITHUB_CLONE_URL@'
branch: @GITHUB_BRANCH@ branch: '@GITHUB_BRANCH@'
commit: @GITHUB_COMMIT@ commit: '@GITHUB_COMMIT@'