From 4155def4b285f7bae6884bd29f9887b755fcc569 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 7 Aug 2022 20:26:40 -0400 Subject: [PATCH] fix yaml-lint errors --- .github/ISSUE_TEMPLATE/bug-report.yml | 10 +- .github/ISSUE_TEMPLATE/config.yml | 1 + .github/workflows/CI.yml | 323 ++++++++++-------- .github/workflows/clang.yml | 31 -- .github/workflows/cpp-clang-format-lint.yml | 60 ++++ .github/workflows/localize.yml | 126 +++---- .github/workflows/python-flake8.yml | 1 + .github/workflows/release-notifier.yml | 1 + .github/workflows/winget.yml | 6 +- .readthedocs.yaml | 7 +- crowdin.yml | 7 +- .../linux/flatpak/dev.lizardbyte.sunshine.yml | 15 +- 12 files changed, 335 insertions(+), 253 deletions(-) delete mode 100644 .github/workflows/clang.yml create mode 100644 .github/workflows/cpp-clang-format-lint.yml diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 8e4bfc7613c..bd21df2945f 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,3 +1,4 @@ +--- name: Bug Report description: Create a bug report to help us improve. body: @@ -5,7 +6,7 @@ body: attributes: value: > **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 id: description attributes: @@ -90,9 +91,12 @@ body: id: logs attributes: 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 - type: markdown attributes: 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. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 286695394ef..ba507895ebf 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,3 +1,4 @@ +--- # This action 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. diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ad690428dc5..c9e6b0df0e6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,3 +1,4 @@ +--- name: CI on: @@ -52,7 +53,8 @@ jobs: - name: Check CMakeLists.txt Version 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 - name: Compare CMakeList.txt Version @@ -60,7 +62,8 @@ jobs: run: | echo CMakeLists version: "$cmakelists_version" 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 build_linux_aur: @@ -76,7 +79,7 @@ jobs: run: | sudo apt-get update -y sudo apt-get install -y \ - cmake + cmake - name: Configure PKGBUILD files run: | @@ -86,47 +89,55 @@ jobs: sub_version="" conflicts="'sunshine'" provides="'sunshine'" - + branch=${GITHUB_HEAD_REF} - + # check the branch variable if [ -z "$branch" ] then - echo "This is a PUSH event" - commit=${{ github.sha }} - clone_url=${{ github.event.repository.clone_url }} - - if [[ ${{ github.ref == 'refs/heads/master' }} ]]; then - aur_pkg=sunshine - conflicts="" - provides="" - - echo "aur_publish=true" >> $GITHUB_ENV - elif [[ ${{ github.ref == 'refs/heads/nightly' }} ]]; then - 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 }} - + echo "This is a PUSH event" + commit=${{ github.sha }} + clone_url=${{ github.event.repository.clone_url }} + + if [[ ${{ github.ref == 'refs/heads/master' }} ]]; then + aur_pkg=sunshine + conflicts="" + provides="" + + echo "aur_publish=true" >> $GITHUB_ENV + elif [[ ${{ github.ref == 'refs/heads/nightly' }} ]]; then + 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}" fi echo "Commit: ${commit}" echo "Clone URL: ${clone_url}" - + echo "aur_pkg=${aur_pkg}" >> $GITHUB_ENV - + mkdir -p artifacts mkdir -p 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 .. - + mv ./build/PKGBUILD ./artifacts/ - name: Validate package @@ -172,42 +183,50 @@ jobs: run: | sudo apt-get update -y sudo apt-get install -y \ - cmake \ - flatpak - sudo su $(whoami) -c 'flatpak remote-add --user --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' + cmake \ + flatpak + sudo su $(whoami) -c 'flatpak remote-add --user --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' - name: Configure Flatpak Manifest run: | # variables for manifest branch=${GITHUB_HEAD_REF} - + # check the branch variable if [ -z "$branch" ] then - echo "This is a PUSH event" - branch=${{ github.ref_name }} - commit=${{ github.sha }} - clone_url=${{ github.event.repository.clone_url }} + echo "This is a PUSH event" + branch=${{ github.ref_name }} + commit=${{ github.sha }} + clone_url=${{ github.event.repository.clone_url }} else - echo "This is a PR event" - commit=${{ github.event.pull_request.head.sha }} - clone_url=${{ github.event.pull_request.head.repo.clone_url }} + echo "This is a PR event" + commit=${{ github.event.pull_request.head.sha }} + clone_url=${{ github.event.pull_request.head.repo.clone_url }} fi echo "Branch: ${branch}" echo "Commit: ${commit}" echo "Clone URL: ${clone_url}" - + mkdir -p build mkdir -p artifacts - + 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 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 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' - name: Upload Artifacts @@ -232,7 +251,7 @@ jobs: strategy: fail-fast: false # false to test all, true to fail entire job if any fail matrix: - include: # package these differently + include: # package these differently - type: cpack CMAKE_INSTALL_PREFIX: '/usr' 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/boost-defaults-1.71 -y sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - + sudo apt-get update -y sudo apt-get install -y \ - build-essential \ - cmake \ - gcc-10 \ - git \ - g++-10 \ - libavdevice-dev \ - libboost-filesystem-dev \ - libboost-log-dev \ - libboost-thread-dev \ - libcap-dev \ - libdrm-dev \ - libevdev-dev \ - libpulse-dev \ - libopus-dev \ - libssl-dev \ - libwayland-dev \ - libx11-dev \ - libxcb-shm0-dev \ - libxcb-xfixes0-dev \ - libxcb1-dev \ - libxfixes-dev \ - libxrandr-dev \ - libxtst-dev \ - wget + build-essential \ + cmake \ + gcc-10 \ + git \ + g++-10 \ + libavdevice-dev \ + libboost-filesystem-dev \ + libboost-log-dev \ + libboost-thread-dev \ + libcap-dev \ + libdrm-dev \ + libevdev-dev \ + libpulse-dev \ + libopus-dev \ + libssl-dev \ + libwayland-dev \ + libx11-dev \ + libxcb-shm0-dev \ + libxcb-xfixes0-dev \ + libxcb1-dev \ + libxfixes-dev \ + libxrandr-dev \ + libxtst-dev \ + wget # # Ubuntu 20.04+ packages # libboost-filesystem-dev # libboost-log-dev # libboost-thread-dev - + # # Ubuntu 18.04 packages # libboost-filesystem1.71-dev \ # libboost-log1.71-dev \ # libboost-regex1.71-dev \ # libboost-thread1.71-dev \ - + # clean apt cache sudo apt-get clean sudo rm -rf /var/lib/apt/lists/* - + # 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 - 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 /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm sudo rm /root/cuda.run - + # # Install cmake (necessary for 18.04) # 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 @@ -318,9 +340,19 @@ jobs: run: | mkdir -p build mkdir -p artifacts - + 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} - name: Package Linux - CPACK @@ -336,7 +368,7 @@ jobs: mv ./cpack_artifacts/Sunshine.rpm ../artifacts/sunshine.rpm - 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: | version=${{ needs.check_changelog.outputs.next_version_bare }} echo "VERSION=${version}" >> $GITHUB_ENV @@ -347,43 +379,44 @@ jobs: run: | # install sunshine to the DESTDIR make install DESTDIR=AppDir - + # portable home and config # 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/ 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 DESKTOP_FILE="${DESKTOP_FILE:-sunshine.desktop}" ICON_FILE="${ICON_FILE:-sunshine.png}" - + # AppImage # https://docs.appimage.org/packaging-guide/index.html wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage chmod +x linuxdeploy-x86_64.AppImage - + # # https://github.com/linuxdeploy/linuxdeploy-plugin-gtk # sudo apt-get install libgtk-3-dev librsvg2-dev -y # wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh # chmod +x linuxdeploy-plugin-gtk.sh # export DEPLOY_GTK_VERSION=3 - + ./linuxdeploy-x86_64.AppImage \ - --appdir ./AppDir \ - --executable ./sunshine \ - --icon-file "../$ICON_FILE" \ - --desktop-file "./$DESKTOP_FILE" \ - --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/libpangoft2-1.0.so.0 \ - --output appimage + --appdir ./AppDir \ + --executable ./sunshine \ + --icon-file "../$ICON_FILE" \ + --desktop-file "./$DESKTOP_FILE" \ + --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/libpangoft2-1.0.so.0 \ + --output appimage # # add this argument back if using gtk plugin # --plugin gtk \ # move mv Sunshine*.AppImage ../artifacts/sunshine.AppImage - + # permissions chmod +x ../artifacts/sunshine.AppImage @@ -392,9 +425,9 @@ jobs: run: | wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage chmod +x appimagelint-x86_64.AppImage - + # rm -rf ~/.cache/appimagelint/ - + ./appimagelint-x86_64.AppImage ./artifacts/sunshine.AppImage - name: Archive AppImage @@ -402,7 +435,7 @@ jobs: working-directory: artifacts run: | chmod +x ./sunshine.AppImage - + zip --recurse-paths --move --test ./sunshine-appimage.zip ./* - name: Upload Artifacts @@ -443,7 +476,11 @@ jobs: run: | mkdir 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} - name: Package MacOS @@ -454,10 +491,10 @@ jobs: # package cpack -G DragNDrop mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-macos-experimental-dragndrop.dmg - + cpack -G Bundle mv ./cpack_artifacts/Sunshine.dmg ../artifacts/sunshine-macos-experimental-bundle.dmg - + cpack -G 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-archive.zip - # no artifacts to release currently -# - name: Create Release -# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} -# uses: LizardByte/.github/actions/create_release@master -# with: -# token: ${{ secrets.GH_BOT_TOKEN }} -# next_version: ${{ needs.check_changelog.outputs.next_version }} -# last_version: ${{ needs.check_changelog.outputs.last_version }} -# release_body: ${{ needs.check_changelog.outputs.release_body }} + ## no artifacts to release currently + # - name: Create Release + # if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + # uses: LizardByte/.github/actions/create_release@master + # with: + # token: ${{ secrets.GH_BOT_TOKEN }} + # next_version: ${{ needs.check_changelog.outputs.next_version }} + # last_version: ${{ needs.check_changelog.outputs.last_version }} + # release_body: ${{ needs.check_changelog.outputs.release_body }} build_mac_port: name: Macports needs: check_changelog runs-on: macos-11 -# runs-on: ${{ matrix.os }} -# strategy: -# fail-fast: false -# matrix: -# os: [ macos-10.15, macos-11, macos-12 ] steps: - name: Checkout @@ -522,42 +554,45 @@ jobs: run: | # variables for Portfile branch=${GITHUB_HEAD_REF} - + # check the branch variable if [ -z "$branch" ] then - echo "This is a PUSH event" - commit=${{ github.sha }} - clone_url=${{ github.event.repository.clone_url }} + echo "This is a PUSH event" + commit=${{ github.sha }} + clone_url=${{ github.event.repository.clone_url }} else - echo "This is a PR event" - commit=${{ github.event.pull_request.head.sha }} - clone_url=${{ github.event.pull_request.head.repo.clone_url }} + echo "This is a PR event" + commit=${{ github.event.pull_request.head.sha }} + clone_url=${{ github.event.pull_request.head.repo.clone_url }} fi echo "Commit: ${commit}" echo "Clone URL: ${clone_url}" - + mkdir 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 .. - + # copy Portfile to artifacts mkdir -p artifacts cp -f ./build/Portfile ./artifacts/ - + # copy Portfile to ports mkdir -p ./ports/multimedia/Sunshine cp -f ./build/Portfile ./ports/multimedia/Sunshine/Portfile - + # testing cat ./artifacts/Portfile - name: Bootstrap MacPorts run: | . ports/.github/workflows/bootstrap.sh - + # Add getopt, mpbb and the MacPorts paths to $PATH for the subsequent steps. echo "/opt/mports/bin" >> $GITHUB_PATH echo "${PWD}/mpbb" >> $GITHUB_PATH @@ -573,12 +608,12 @@ jobs: echo "Listing subports for Sunshine" new_subports=$(mpbb \ - --work-dir /tmp/mpbb \ - list-subports \ - --archive-site= \ - --archive-site-private= \ - --include-deps=no \ - "$port" \ + --work-dir /tmp/mpbb \ + list-subports \ + --archive-site= \ + --archive-site-private= \ + --include-deps=no \ + "$port" \ | tr '\n' ' ') for subport in $new_subports; do echo "$subport" @@ -671,14 +706,14 @@ jobs: work=$(port work sunshine) echo "Sunshine port work directory: ${work}" - + # move components out of port work directory sudo mv ${work}/Sunshine*component.pkg /tmp/ - + # copy artifacts sudo mv ${work}/Sunshine*.pkg ./artifacts/sunshine.pkg sudo mv ${work}/Sunshine*.dmg ./artifacts/sunshine.dmg - + # move components back # sudo mv /tmp/Sunshine*component.pkg ${work}/ @@ -733,7 +768,11 @@ jobs: run: | mkdir 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 - name: Package Windows diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml deleted file mode 100644 index 3c0a70e6d59..00000000000 --- a/.github/workflows/clang.yml +++ /dev/null @@ -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/ diff --git a/.github/workflows/cpp-clang-format-lint.yml b/.github/workflows/cpp-clang-format-lint.yml new file mode 100644 index 00000000000..4717f70a5e3 --- /dev/null +++ b/.github/workflows/cpp-clang-format-lint.yml @@ -0,0 +1,60 @@ +--- +# This action 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. + +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/ diff --git a/.github/workflows/localize.yml b/.github/workflows/localize.yml index d48ab2232da..df3e69caa6f 100644 --- a/.github/workflows/localize.yml +++ b/.github/workflows/localize.yml @@ -1,3 +1,4 @@ +--- name: localize on: @@ -18,76 +19,77 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - - name: Install Python 3.9 - uses: actions/setup-python@v4 # https://github.com/actions/setup-python - with: - python-version: '3.9' + - name: Install Python 3.9 + uses: actions/setup-python@v4 # https://github.com/actions/setup-python + with: + python-version: '3.9' - - name: Set up Python 3.9 Dependencies - run: | - cd ./scripts - python -m pip install --upgrade pip setuptools - python -m pip install -r requirements.txt + - name: Set up Python 3.9 Dependencies + run: | + cd ./scripts + python -m pip install --upgrade pip setuptools + python -m pip install -r requirements.txt - - name: Set up xgettext - run: | - sudo apt-get update -y && \ - sudo apt-get --reinstall install -y \ - gettext + - name: Set up xgettext + run: | + sudo apt-get update -y && \ + sudo apt-get --reinstall install -y \ + gettext - - name: Update Strings - run: | - # first, try to remove existing file as xgettext does not remove unused translations - if [ -f "${{ env.file }}" ]; - then - rm ${{ env.file }} - echo "new_file=false" >> $GITHUB_ENV - else - echo "new_file=true" >> $GITHUB_ENV - fi + - name: Update Strings + run: | + # first, try to remove existing file as xgettext does not remove unused translations + if [ -f "${{ env.file }}" ]; + then + rm ${{ env.file }} + echo "new_file=false" >> $GITHUB_ENV + else + echo "new_file=true" >> $GITHUB_ENV + fi - # extract the new strings - python ./scripts/_locale.py --extract + # extract the new strings + python ./scripts/_locale.py --extract - - name: git diff - if: ${{ env.new_file == 'false' }} - run: | - # disable the pager - git config --global pager.diff false + - name: git diff + if: ${{ env.new_file == 'false' }} + run: | + # disable the pager + git config --global pager.diff false - # print the git diff - git diff locale/sunshine.po + # print the git diff + git diff locale/sunshine.po - # set the variable with minimal output - OUTPUT=$(git diff --numstat locale/sunshine.po) - echo "git_diff=${OUTPUT}" >> $GITHUB_ENV + # set the variable with minimal output + OUTPUT=$(git diff --numstat locale/sunshine.po) + echo "git_diff=${OUTPUT}" >> $GITHUB_ENV - - name: git reset - # 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' }} - run: | - git reset --hard + - 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' }} + run: | + git reset --hard - - name: Create/Update Pull Request - uses: peter-evans/create-pull-request@v4 - with: - add-paths: | - locale/*.po - token: ${{ secrets.GH_BOT_TOKEN }} # must trigger PR tests - commit-message: New localization template - branch: localize/update - delete-branch: true - base: nightly - title: New Babel Updates - body: | - Update report - - Updated with *today's* date - - Auto-generated by [create-pull-request][1] + - name: Create/Update Pull Request + uses: peter-evans/create-pull-request@v4 + with: + add-paths: | + locale/*.po + token: ${{ secrets.GH_BOT_TOKEN }} # must trigger PR tests + commit-message: New localization template + branch: localize/update + delete-branch: true + base: nightly + title: New Babel Updates + body: | + Update report + - Updated with *today's* date + - Auto-generated by [create-pull-request][1] - [1]: https://github.com/peter-evans/create-pull-request - labels: | - babel - l10n + [1]: https://github.com/peter-evans/create-pull-request + labels: | + babel + l10n diff --git a/.github/workflows/python-flake8.yml b/.github/workflows/python-flake8.yml index 8769016f249..463fb8a2033 100644 --- a/.github/workflows/python-flake8.yml +++ b/.github/workflows/python-flake8.yml @@ -1,3 +1,4 @@ +--- # This action 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. diff --git a/.github/workflows/release-notifier.yml b/.github/workflows/release-notifier.yml index 6b33643b54d..7a2c13ea5cf 100644 --- a/.github/workflows/release-notifier.yml +++ b/.github/workflows/release-notifier.yml @@ -1,3 +1,4 @@ +--- # This action 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. diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml index d1cd5166ea6..1bf1f20194e 100644 --- a/.github/workflows/winget.yml +++ b/.github/workflows/winget.yml @@ -5,10 +5,12 @@ on: types: [released] jobs: - publish: + winget-releaser: + name: winget releaser runs-on: windows-latest steps: - - uses: vedantmgoyal2009/winget-releaser@latest + - name: winget releaser + uses: vedantmgoyal2009/winget-releaser@latest with: identifier: LizardByte.Sunshine token: ${{ secrets.GH_BOT_TOKEN }} diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 762371f85d7..156e5624620 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,3 +1,4 @@ +--- # .readthedocs.yaml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details @@ -25,9 +26,9 @@ build: # - cmake . ## Include the submodules, required for cmake -#submodules: -# include: all -# recursive: true +# submodules: +# include: all +# recursive: true # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/crowdin.yml b/crowdin.yml index ca9c8c5c58b..0be504ba7d8 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,3 +1,4 @@ +--- "base_path": "." "base_url": "https://api.crowdin.com" # optional (for Crowdin Enterprise only) "preserve_hierarchy": false # flatten tree on crowdin @@ -6,10 +7,10 @@ "l10n" ] -"files" : [ +"files": [ { - "source" : "/locale/*.po", - "translation" : "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%", + "source": "/locale/*.po", + "translation": "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%", "languages_mapping": { "two_letters_code": { # map non-two letter codes here, left side is crowdin designation, right side is babel designation diff --git a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml index 15fdb1f2796..04d3df5a6a9 100644 --- a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml +++ b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml @@ -1,3 +1,4 @@ +--- app-id: dev.lizardbyte.sunshine runtime: org.freedesktop.Platform runtime-version: "21.08" @@ -35,7 +36,7 @@ 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 + - ./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: @@ -48,7 +49,7 @@ modules: - 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 + 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 @@ -56,7 +57,7 @@ modules: buildsystem: simple build-commands: - ./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: - type: archive url: https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2 @@ -170,7 +171,7 @@ modules: - /bin sources: - 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 - name: libevdev @@ -210,6 +211,6 @@ modules: - -DSUNSHINE_ENABLE_CUDA=ON sources: - type: git - url: @GITHUB_CLONE_URL@ - branch: @GITHUB_BRANCH@ - commit: @GITHUB_COMMIT@ + url: '@GITHUB_CLONE_URL@' + branch: '@GITHUB_BRANCH@' + commit: '@GITHUB_COMMIT@'