diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml deleted file mode 100644 index f0337455..00000000 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ /dev/null @@ -1,187 +0,0 @@ ---- -name: Bug Report -description: Create a bug report to help us improve. -body: - - type: markdown - attributes: - value: > - **THIS IS NOT THE PLACE TO ASK FOR SUPPORT!** - Please use our [Support Center](https://app.lizardbyte.dev/support) for support issues. - Non actionable bug reports will be LOCKED and CLOSED! - - type: checkboxes - attributes: - label: Is there an existing issue for this? - description: Please search to see if an issue already exists for the bug you encountered. - options: - - label: I have searched the existing issues - - type: checkboxes - attributes: - label: Is your issue described in the documentation? - description: Please read our [documentation](https://docs.lizardbyte.dev/projects/sunshine) - options: - - label: I have read the documentation - - type: dropdown - attributes: - label: Is your issue present in the latest beta/pre-release? - description: Please test the latest [pre-release](https://github.com/LizardByte/Sunshine/releases). - options: - - "I didn't read the issue template" - - "I'm too lazy to test" - - "This issue is present in the latest pre-release" - - type: textarea - id: description - attributes: - label: Describe the Bug - description: A clear and concise description of the bug, list the reproduction steps. - validations: - required: true - - type: textarea - id: expected - attributes: - label: Expected Behavior - description: A clear and concise description of what you expected to happen. - - type: textarea - id: additional - attributes: - label: Additional Context - description: Add any other context about the bug here. - - type: dropdown - id: os - attributes: - label: Host Operating System - description: What version operating system are you running the software on? - options: - - Docker - - Linux - - macOS - - Windows - - other, n/a - validations: - required: true - - type: input - id: os-version - attributes: - label: Operating System Version - description: Provide the version of the operating system. Additionally a build number would be helpful. - validations: - required: true - - type: dropdown - id: os-architecture - attributes: - label: Architecture - options: - - 32 bit - - 64 bit - - arm - - other, n/a - validations: - required: true - - type: input - id: version - attributes: - label: Sunshine commit or version - description: | - Use `sunshine --verison` to get the version, or get the version from web UI. - Please don't just copy the latest commit from our repo, if that's not the commit you're actually using. - validations: - required: true - - type: dropdown - id: package_type - attributes: - label: Package - description: The package you installed - options: - - Linux - AppImage - - Linux - AUR (Third Party) - - Linux - deb - - Linux - Docker - - Linux - flathub (Third Party) - - Linux - flatpak - - Linux - Homebrew - - Linux - nixpkgs (Third Party) - - Linux - pkg.tar.zst - - Linux - rpm - - Linux - solus (Third Party) - - macOS - Homebrew - - macOS - Portfile - - Windows - Chocolatey (Third Party) - - Windows - installer - - Windows - portable - - Windows - Scoop (Third Party) - - Windows - Winget - - other (not listed) - - other (self built) - - other (fork of this repo) - - n/a - validations: - required: true - - type: dropdown - id: graphics_type - attributes: - label: GPU Type - description: The type of the installed graphics card. - options: - - AMD - - Intel - - Nvidia - - none (software encoding) - - n/a - validations: - required: true - - type: input - id: graphics_model - attributes: - label: GPU Model - description: The model of the installed graphics card. - validations: - required: true - - type: input - id: graphics_driver - attributes: - label: GPU Driver/Mesa Version - description: The driver/mesa version of the installed graphics card. - validations: - required: true - - type: dropdown - id: capture_method - attributes: - label: Capture Method - description: The capture method being used. - options: - - AVCaptureScreen (macOS) - - KMX (Linux) - - NvFBC (Linux) - - wlroots (Linux) - - X11 (Linux) - - Desktop Duplication API (Windows) - - Windows.Graphics.Capture (Windows) - validations: - required: false - - type: textarea - id: config - attributes: - label: Config - description: | - Please copy and paste your config (`sunshine.conf`) file. - render: Shell - validations: - required: true - - type: textarea - id: apps - attributes: - label: Apps - description: | - If this is an issue with launching a game or app, please copy and paste your `apps.json` file. - render: json - validations: - required: false - - type: textarea - 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. - render: shell - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 296a44db..00000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# 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. - -blank_issues_enabled: false -contact_links: - - name: Support Center - url: https://app.lizardbyte.dev/support - about: Official LizardByte support - - name: Feature request - url: https://ideas.moonlight-stream.org - about: Share your suggestions or ideas to help Moonlight and Sunshine improve diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index b736c94c..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -# 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. - -version: 2 -updates: - - package-ecosystem: "docker" - directory: "/" - schedule: - interval: "daily" - time: "08:00" - open-pull-requests-limit: 10 - - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - time: "08:30" - open-pull-requests-limit: 10 - - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "daily" - time: "09:00" - open-pull-requests-limit: 10 - - - package-ecosystem: "nuget" - directory: "/" - schedule: - interval: "daily" - time: "09:30" - open-pull-requests-limit: 10 - - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "daily" - time: "10:00" - open-pull-requests-limit: 10 - - - package-ecosystem: "gitsubmodule" - directory: "/" - schedule: - interval: "daily" - time: "10:30" - open-pull-requests-limit: 10 diff --git a/.github/label-actions.yml b/.github/label-actions.yml deleted file mode 100644 index 653cf860..00000000 --- a/.github/label-actions.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -# 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. - -# Configuration for Label Actions - https://github.com/dessant/label-actions - -added: - comment: > - This feature has been added and will be available in the next release. -fixed: - comment: > - This issue has been fixed and will be available in the next release. -invalid:duplicate: - comment: > - :wave: @{issue-author}, this appears to be a duplicate of a pre-existing issue. - close: true - lock: true - unlabel: 'status:awaiting-triage' - --invalid:duplicate: - reopen: true - unlock: true - -invalid:support: - comment: > - :wave: @{issue-author}, we use the issue tracker exclusively for bug reports. - However, this issue appears to be a support request. Please use our - [Support Center](https://app.lizardbyte.dev/support) for support issues. Thanks. - close: true - lock: true - lock-reason: 'off-topic' - unlabel: 'status:awaiting-triage' - --invalid:support: - reopen: true - unlock: true - -invalid:template-incomplete: - issues: - comment: > - :wave: @{issue-author}, please edit your issue to complete the template with - all the required info. Your issue will be automatically closed in 5 days if - the template is not completed. Thanks. - prs: - comment: > - :wave: @{issue-author}, please edit your PR to complete the template with - all the required info. Your PR will be automatically closed in 5 days if - the template is not completed. Thanks. diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml deleted file mode 100644 index 08505387..00000000 --- a/.github/workflows/CI.yml +++ /dev/null @@ -1,1223 +0,0 @@ ---- -name: CI - -on: - pull_request: - branches: [master] - types: [opened, synchronize, reopened] - push: - branches: [master] - workflow_dispatch: - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - github_env: - name: GitHub Env Debug - runs-on: ubuntu-latest - - steps: - - name: Dump github context - run: echo "$GITHUB_CONTEXT" - shell: bash - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - - setup_release: - name: Setup Release - outputs: - publish_release: ${{ steps.setup_release.outputs.publish_release }} - release_body: ${{ steps.setup_release.outputs.release_body }} - release_commit: ${{ steps.setup_release.outputs.release_commit }} - release_generate_release_notes: ${{ steps.setup_release.outputs.release_generate_release_notes }} - release_tag: ${{ steps.setup_release.outputs.release_tag }} - release_version: ${{ steps.setup_release.outputs.release_version }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Release - id: setup_release - uses: LizardByte/setup-release-action@v2024.725.234618 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - setup_flatpak_matrix: - name: Setup Flatpak Matrix - runs-on: ubuntu-latest - steps: - - name: Set release details - id: flatpak_matrix - # https://www.cynkra.com/blog/2020-12-23-dynamic-gha - run: | - # determine which architectures to build - if [[ "${{ github.event_name }}" == "push" ]]; then - matrix=$(( - echo '{ "arch" : ["x86_64", "aarch64"] }' - ) | jq -c .) - else - matrix=$(( - echo '{ "arch" : ["x86_64"] }' - ) | jq -c .) - fi - - echo $matrix - echo $matrix | jq . - echo "matrix=$matrix" >> $GITHUB_OUTPUT - - outputs: - matrix: ${{ steps.flatpak_matrix.outputs.matrix }} - - build_linux_flatpak: - env: - APP_ID: dev.lizardbyte.app.Sunshine - name: Linux Flatpak - runs-on: ubuntu-22.04 - needs: [setup_release, setup_flatpak_matrix] - strategy: - fail-fast: false # false to test all, true to fail entire job if any fail - matrix: ${{fromJson(needs.setup_flatpak_matrix.outputs.matrix)}} - - steps: - - name: Maximize build space - uses: easimon/maximize-build-space@v10 - with: - root-reserve-mb: 10240 - remove-dotnet: 'true' - remove-android: 'true' - remove-haskell: 'true' - remove-codeql: 'true' - remove-docker-images: 'true' - - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Setup Dependencies Linux Flatpak - env: - PLATFORM_VERSION: "22.08" - run: | - sudo apt-get update -y - sudo apt-get install -y \ - cmake \ - flatpak \ - qemu-user-static - - sudo su $(whoami) -c "flatpak --user remote-add --if-not-exists flathub \ - https://flathub.org/repo/flathub.flatpakrepo" - - sudo su $(whoami) -c "flatpak --user install -y flathub \ - org.flatpak.Builder \ - org.freedesktop.Platform/${{ matrix.arch }}/${PLATFORM_VERSION} \ - org.freedesktop.Sdk/${{ matrix.arch }}/${PLATFORM_VERSION} \ - org.freedesktop.Sdk.Extension.node18/${{ matrix.arch }}/${PLATFORM_VERSION} \ - org.freedesktop.Sdk.Extension.vala/${{ matrix.arch }}/${PLATFORM_VERSION} \ - " - - - name: Cache Flatpak build - uses: actions/cache@v4 - with: - path: ./build/.flatpak-builder - key: flatpak-${{ matrix.arch }}-${{ github.sha }} - restore-keys: | - flatpak-${{ matrix.arch }}- - - - name: Configure Flatpak Manifest - run: | - # variables for manifest - branch="${{ github.head_ref }}" - commit=${{ needs.setup_release.outputs.release_commit }} - - # check the branch variable - if [ -z "$branch" ] - then - echo "This is a PUSH event" - branch=${{ github.ref_name }} - build_version=${{ needs.setup_release.outputs.release_tag }} - clone_url=${{ github.event.repository.clone_url }} - else - echo "This is a PR event" - 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} \ - -DBUILD_VERSION=${build_version} \ - -DGITHUB_BRANCH=${branch} \ - -DGITHUB_COMMIT=${commit} \ - -DSUNSHINE_CONFIGURE_FLATPAK_MAN=ON \ - -DSUNSHINE_CONFIGURE_ONLY=ON \ - .. - - - name: Debug Manifest - working-directory: build - run: | - cat ${APP_ID}.yml - - - 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 ${APP_ID}.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 ${APP_ID}.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 ${APP_ID}" - sudo su $(whoami) -c "flatpak build-bundle --runtime --arch=${{ matrix.arch }} ./repo \ - ../artifacts/sunshine_debug_${{ matrix.arch }}.flatpak ${APP_ID}.Debug" - - - name: Lint Flatpak - working-directory: build - run: | - echo "Linting flatpak manifest" - flatpak run --command=flatpak-builder-lint org.flatpak.Builder \ - manifest ${APP_ID}.yml > _flatpak-lint-exceptions_manifest.json || true - - echo "Linting flatpak repo" - # TODO: add arg - # --mirror-screenshots-url=https://dl.flathub.org/media \ - flatpak run --command=flatpak-builder-lint org.flatpak.Builder \ - repo repo > _flatpak-lint-exceptions_repo.json || true - - checks=(manifest repo) - exit_code=0 - - # check if files are equal - for check in "${checks[@]}"; do - echo "Validating $check" - - # load baseline and result files - baseline="${{ github.workspace }}/packaging/linux/flatpak/flatpak-lint-baseline_${check}.json" - result="_flatpak-lint-exceptions_${check}.json" - - # Extract errors from both JSON files - readarray -t result_errors < <(jq -r '.errors[]' "$result") - readarray -t baseline_errors < <(jq -r '.errors[]' "$baseline") - - # Loop through result errors and check against baseline errors - for error in "${result_errors[@]}"; do - if printf '%s\n' "${baseline_errors[@]}" | grep -q -F "$error"; then - echo "::warning:: '$error'" - else - echo "::error:: '$error'" - exit_code=1 - fi - done - done - - # if exit code is not 0, print results - if [ $exit_code -ne 0 ]; then - echo "Manifest lint results:" - cat _flatpak-lint-exceptions_manifest.json - echo "Repo lint results:" - cat _flatpak-lint-exceptions_repo.json - fi - - # exit with the correct code - exit $exit_code - - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: sunshine-linux-flatpak-${{ matrix.arch }} - path: artifacts/ - - - name: Create/Update GitHub Release - if: ${{ needs.setup_release.outputs.publish_release == 'true' }} - uses: LizardByte/create-release-action@v2024.614.221009 - with: - allowUpdates: true - body: ${{ needs.setup_release.outputs.release_body }} - discussionCategory: announcements - generateReleaseNotes: ${{ needs.setup_release.outputs.release_generate_release_notes }} - name: ${{ needs.setup_release.outputs.release_tag }} - prerelease: true - tag: ${{ needs.setup_release.outputs.release_tag }} - token: ${{ secrets.GH_BOT_TOKEN }} - - build_linux: - name: Linux ${{ matrix.type }} - runs-on: ubuntu-${{ matrix.dist }} - needs: [setup_release] - strategy: - fail-fast: false # false to test all, true to fail entire job if any fail - matrix: - include: # package these differently - - type: AppImage - EXTRA_ARGS: '-DSUNSHINE_BUILD_APPIMAGE=ON' - dist: 22.04 - - steps: - - name: Maximize build space - uses: easimon/maximize-build-space@v10 - with: - root-reserve-mb: 30720 - remove-dotnet: 'true' - remove-android: 'true' - remove-haskell: 'true' - remove-codeql: 'true' - remove-docker-images: 'true' - - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install wget - run: | - sudo apt-get update -y - sudo apt-get install -y \ - wget - - - name: Install CUDA - env: - CUDA_VERSION: 11.8.0 - CUDA_BUILD: 520.61.05 - timeout-minutes: 4 - run: | - url_base="https://developer.download.nvidia.com/compute/cuda/${CUDA_VERSION}/local_installers" - url="${url_base}/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux.run" - sudo wget -q -O /root/cuda.run ${url} - sudo chmod a+x /root/cuda.run - sudo /root/cuda.run --silent --toolkit --toolkitpath=/usr/local/cuda --no-opengl-libs --no-man-page --no-drm - sudo rm /root/cuda.run - - - name: Setup Dependencies Linux - timeout-minutes: 5 - run: | - # allow newer gcc - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - - # allow libfuse2 for appimage on 22.04 - sudo add-apt-repository universe - - # libx11-xcb-dev and libxcb-dri3-dev are required for building libva - sudo apt-get install -y \ - build-essential \ - cmake \ - doxygen \ - graphviz \ - gcc-10 \ - g++-10 \ - libayatana-appindicator3-dev \ - libavdevice-dev \ - libcap-dev \ - libcurl4-openssl-dev \ - libdrm-dev \ - libevdev-dev \ - libfuse2 \ - libminiupnpc-dev \ - libnotify-dev \ - libnuma-dev \ - libopus-dev \ - libpulse-dev \ - libssl-dev \ - libvdpau-dev \ - libwayland-dev \ - libx11-dev \ - libx11-xcb-dev \ - libxcb-dri3-dev \ - libxcb-shm0-dev \ - libxcb-xfixes0-dev \ - libxcb1-dev \ - libxfixes-dev \ - libxrandr-dev \ - libxtst-dev \ - python3 \ - python3-venv - - # clean apt cache - sudo apt-get clean - sudo rm -rf /var/lib/apt/lists/* - - # Update gcc alias - # https://stackoverflow.com/a/70653945/11214013 - sudo update-alternatives --install \ - /usr/bin/gcc gcc /usr/bin/gcc-10 100 \ - --slave /usr/bin/g++ g++ /usr/bin/g++-10 \ - --slave /usr/bin/gcov gcov /usr/bin/gcov-10 \ - --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \ - --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10 - - - name: Setup python - id: python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Build latest libva - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - timeout-minutes: 5 - run: | - gh release download --archive=tar.gz --repo=intel/libva - tar xzf libva-*.tar.gz && rm libva-*.tar.gz - cd libva-* - ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu \ - --enable-drm \ - --enable-x11 \ - --enable-glx \ - --enable-wayland \ - --without-legacy # emgd, nvctrl, fglrx - make -j $(nproc) - sudo make install - cd .. && rm -rf libva-* - - - name: Build Linux - env: - BRANCH: ${{ github.head_ref || github.ref_name }} - BUILD_VERSION: ${{ needs.setup_release.outputs.release_tag }} - COMMIT: ${{ needs.setup_release.outputs.release_commit }} - timeout-minutes: 10 - run: | - echo "nproc: $(nproc)" - - mkdir -p build - mkdir -p artifacts - - cd build - cmake \ - -DBUILD_WERROR=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CUDA_COMPILER:PATH=/usr/local/cuda/bin/nvcc \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DSUNSHINE_ASSETS_DIR=share/sunshine \ - -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 $(expr $(nproc) - 1) # use all but one core - - - name: Set AppImage Version - if: | - matrix.type == 'AppImage' - run: | - version=${{ needs.setup_release.outputs.release_tag }} - echo "VERSION=${version}" >> $GITHUB_ENV - - - name: Package Linux - AppImage - if: ${{ matrix.type == 'AppImage' }} - working-directory: build - run: | - # install sunshine to the DESTDIR - make install DESTDIR=AppDir - - # custom AppRun file - cp -f ../packaging/linux/AppImage/AppRun ./AppDir/ - chmod +x ./AppDir/AppRun - - # variables - DESKTOP_FILE="${DESKTOP_FILE:-sunshine.desktop}" - ICON_FILE="${ICON_FILE:-sunshine.png}" - - # AppImage - # https://docs.appimage.org/packaging-guide/index.html - wget -q 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 -q 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 \ - --plugin gtk \ - --executable ./sunshine \ - --icon-file "../$ICON_FILE" \ - --desktop-file "./$DESKTOP_FILE" \ - --output appimage - - # move - mv Sunshine*.AppImage ../artifacts/sunshine.AppImage - - # permissions - chmod +x ../artifacts/sunshine.AppImage - - - name: Delete CUDA - # free up space on the runner - run: | - sudo rm -rf /usr/local/cuda - - - name: Verify AppImage - if: ${{ matrix.type == 'AppImage' }} - run: | - wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage - chmod +x appimagelint-x86_64.AppImage - - ./appimagelint-x86_64.AppImage ./artifacts/sunshine.AppImage - - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: sunshine-linux-${{ matrix.type }}-${{ matrix.dist }} - path: artifacts/ - - - name: Install test deps - run: | - sudo apt-get update -y - sudo apt-get install -y \ - x11-xserver-utils \ - xvfb - - # clean apt cache - sudo apt-get clean - sudo rm -rf /var/lib/apt/lists/* - - - name: Run tests - id: test - working-directory: build/tests - run: | - export DISPLAY=:1 - Xvfb ${DISPLAY} -screen 0 1024x768x24 & - sleep 5 # give Xvfb time to start - - ./test_sunshine --gtest_color=yes - - - name: Generate gcov report - # any except canceled or skipped - if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure') - id: test_report - working-directory: build - run: | - ${{ steps.python.outputs.python-path }} -m pip install gcovr - ${{ steps.python.outputs.python-path }} -m gcovr -r .. \ - --exclude-noncode-lines \ - --exclude-throw-branches \ - --exclude-unreachable-branches \ - --exclude '.*tests/.*' \ - --exclude '.*third-party/.*' \ - --xml-pretty \ - -o coverage.xml - - - name: Upload coverage - # any except canceled or skipped - if: >- - always() && - (steps.test_report.outcome == 'success') && - startsWith(github.repository, 'LizardByte/') - uses: codecov/codecov-action@v4 - with: - disable_search: true - fail_ci_if_error: true - files: ./build/coverage.xml - flags: ${{ runner.os }} - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - - - name: Create/Update GitHub Release - if: ${{ needs.setup_release.outputs.publish_release == 'true' }} - uses: LizardByte/create-release-action@v2024.614.221009 - with: - allowUpdates: true - body: ${{ needs.setup_release.outputs.release_body }} - discussionCategory: announcements - generateReleaseNotes: ${{ needs.setup_release.outputs.release_generate_release_notes }} - name: ${{ needs.setup_release.outputs.release_tag }} - prerelease: true - tag: ${{ needs.setup_release.outputs.release_tag }} - token: ${{ secrets.GH_BOT_TOKEN }} - - build_homebrew: - needs: [setup_release] - strategy: - fail-fast: false # false to test all, true to fail entire job if any fail - matrix: - include: - # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories - # while GitHub has larger macOS runners, they are not available for our repos :( - - os_version: "12" - os_name: "macos" - - os_version: "13" - os_name: "macos" - - os_version: "14" - os_name: "macos" - - os_version: "latest" - os_name: "ubuntu" - - os_version: "latest" # this job will only configure the formula for release, no validation - os_name: "ubuntu" - release: true - name: Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) - runs-on: ${{ matrix.os_name }}-${{ matrix.os_version }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Configure formula - run: | - # variables for formula - branch="${{ github.head_ref }}" - commit=${{ needs.setup_release.outputs.release_commit }} - - # check the branch variable - if [ -z "$branch" ] - then - echo "This is a PUSH event" - build_version=${{ needs.setup_release.outputs.release_tag }} - clone_url=${{ github.event.repository.clone_url }} - branch="${{ github.ref_name }}" - default_branch="${{ github.event.repository.default_branch }}" - - if [ "${{ matrix.release }}" == "true" ]; then - # we will publish the formula with the release tag - tag="${{ needs.setup_release.outputs.release_tag }}" - version="${{ needs.setup_release.outputs.release_version }}" - else - tag="${{ github.ref_name }}" - version="0.0.${{ github.run_number }}" - fi - else - echo "This is a PR event" - build_version="0.0.${{ github.event.number }}" - clone_url=${{ github.event.pull_request.head.repo.clone_url }} - branch="${{ github.event.pull_request.head.ref }}" - default_branch="${{ github.event.pull_request.head.repo.default_branch }}" - tag="${{ github.event.pull_request.head.ref }}" - version="0.0.${{ github.event.number }}" - fi - echo "Branch: ${branch}" - echo "Clone URL: ${clone_url}" - echo "Tag: ${tag}" - - mkdir build - cd build - cmake \ - -DBUILD_VERSION="${build_version}" \ - -DFORMULA_VERSION="${version}" \ - -DGITHUB_BRANCH="${branch}" \ - -DGITHUB_COMMIT="${commit}" \ - -DGITHUB_CLONE_URL="${clone_url}" \ - -DGITHUB_DEFAULT_BRANCH="${default_branch}" \ - -DGITHUB_TAG="${tag}" \ - -DSUNSHINE_CONFIGURE_HOMEBREW=ON \ - -DSUNSHINE_CONFIGURE_ONLY=ON \ - .. - cd .. - - # copy formula to artifacts - mkdir -p homebrew - cp -f ./build/sunshine.rb ./homebrew/sunshine.rb - - # testing - cat ./homebrew/sunshine.rb - - - name: Upload Artifacts - if: ${{ matrix.release }} - uses: actions/upload-artifact@v4 - with: - name: sunshine-homebrew - path: homebrew/ - - - name: Setup Xvfb - if: | - matrix.release != true && - runner.os == 'Linux' - run: | - sudo apt-get update -y - sudo apt-get install -y \ - xvfb - - export DISPLAY=:1 - Xvfb ${DISPLAY} -screen 0 1024x768x24 & - - echo "DISPLAY=${DISPLAY}" >> $GITHUB_ENV - - - name: Validate Homebrew Formula - if: | - matrix.release != true - uses: LizardByte/homebrew-release-action@v2024.612.21058 - with: - formula_file: ${{ github.workspace }}/homebrew/sunshine.rb - git_email: ${{ secrets.GH_BOT_EMAIL }} - git_username: ${{ secrets.GH_BOT_NAME }} - publish: false - token: ${{ secrets.GH_BOT_TOKEN }} - validate: true - - - name: Create/Update GitHub Release - if: >- - matrix.release && - needs.setup_release.outputs.publish_release == 'true' - uses: LizardByte/create-release-action@v2024.614.221009 - with: - allowUpdates: true - artifacts: '${{ github.workspace }}/homebrew/*' - body: ${{ needs.setup_release.outputs.release_body }} - discussionCategory: announcements - generateReleaseNotes: ${{ needs.setup_release.outputs.release_generate_release_notes }} - name: ${{ needs.setup_release.outputs.release_tag }} - prerelease: true - tag: ${{ needs.setup_release.outputs.release_tag }} - token: ${{ secrets.GH_BOT_TOKEN }} - - build_mac_port: - needs: [setup_release] - strategy: - fail-fast: false # false to test all, true to fail entire job if any fail - matrix: - include: - # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories - # while GitHub has larger macOS runners, they are not available for our repos :( - - os_version: "12" - release: true - - os_version: "13" - - os_version: "14" - name: Macports (macOS-${{ matrix.os_version }}) - runs-on: macos-${{ matrix.os_version }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Checkout ports - uses: actions/checkout@v4 - with: - repository: macports/macports-ports - fetch-depth: 64 - path: ports - - - name: Checkout mpbb - uses: actions/checkout@v4 - with: - repository: macports/mpbb - path: mpbb - - - name: Setup Dependencies Macports - run: | - # install dependencies using homebrew - brew install cmake - - - name: Setup python - id: python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Configure Portfile - run: | - # variables for Portfile - branch="${{ github.head_ref }}" - commit=${{ needs.setup_release.outputs.release_commit }} - - # check the branch variable - if [ -z "$branch" ] - then - echo "This is a PUSH event" - branch="${{ github.ref_name }}" - build_version=${{ needs.setup_release.outputs.release_tag }} - clone_url=${{ github.event.repository.clone_url }} - else - echo "This is a PR event" - clone_url=${{ github.event.pull_request.head.repo.clone_url }} - fi - echo "Commit: ${commit}" - echo "Clone URL: ${clone_url}" - - mkdir build - cd build - cmake \ - -DBUILD_VERSION=${build_version} \ - -DGITHUB_BRANCH=${branch} \ - -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 - echo "/opt/local/bin" >> $GITHUB_PATH - echo "/opt/local/sbin" >> $GITHUB_PATH - - - name: Run port lint - run: | - port -q lint "Sunshine" - - - name: Build port - env: - subportlist: ${{ steps.subportlist.outputs.subportlist }} - id: build - run: | - subport="Sunshine" - - workdir="/tmp/mpbb/$subport" - mkdir -p "$workdir/logs" - - echo "::group::Installing dependencies" - sudo mpbb \ - --work-dir "$workdir" \ - install-dependencies \ - "$subport" - echo "::endgroup::" - - echo "::group::Installing ${subport}" - sudo mpbb \ - --work-dir "$workdir" \ - install-port \ - --source \ - "$subport" - echo "::endgroup::" - - - name: Build Logs - if: always() - run: | - logfile="/opt/local/var/macports/logs/_Users_runner_work_Sunshine_Sunshine_ports_multimedia_Sunshine/Sunshine/main.log" - cat "$logfile" - sudo mv "${logfile}" "${logfile}.bak" - - - name: Upload Artifacts - if: ${{ matrix.release }} - uses: actions/upload-artifact@v4 - with: - name: sunshine-macports - path: artifacts/ - - - name: Fix permissions - run: | - # https://apple.stackexchange.com/questions/362865/macos-list-apps-authorized-for-full-disk-access - # https://github.com/actions/runner-images/issues/9529 - # https://github.com/actions/runner-images/pull/9530 - - # function to execute sql query for each value - function execute_sql_query { - local value=$1 - local dbPath=$2 - - echo "Executing SQL query for value: $value" - sudo sqlite3 "$dbPath" "INSERT OR IGNORE INTO access VALUES($value);" - } - - # Find all provisioner paths and store them in an array - readarray -t provisioner_paths < <(sudo find /opt /usr -name provisioner) - echo "Provisioner paths: ${provisioner_paths[@]}" - - # Create an empty array - declare -a values=() - - # Loop through the provisioner paths and add them to the values array - for p_path in "${provisioner_paths[@]}"; do - # Adjust the service name and other parameters as needed - values+=("'kTCCServiceAccessibility','${p_path}',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,NULL,1592919552") - values+=("'kTCCServiceScreenCapture','${p_path}',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159") - done - - echo "Values: ${values[@]}" - - if [[ "${{ matrix.os_version }}" == "14" ]]; then - # TCC access table in Sonoma has extra 4 columns: pid, pid_version, boot_uuid, last_reminded - for i in "${!values[@]}"; do - values[$i]="${values[$i]},NULL,NULL,'UNUSED',${values[$i]##*,}" - done - fi - - # system and user databases - dbPaths=( - "/Library/Application Support/com.apple.TCC/TCC.db" - "$HOME/Library/Application Support/com.apple.TCC/TCC.db" - ) - - for value in "${values[@]}"; do - for dbPath in "${dbPaths[@]}"; do - echo "Column names for $dbPath" - echo "-------------------" - sudo sqlite3 "$dbPath" "PRAGMA table_info(access);" - echo "Current permissions for $dbPath" - echo "-------------------" - sudo sqlite3 "$dbPath" "SELECT * FROM access WHERE service='kTCCServiceScreenCapture';" - execute_sql_query "$value" "$dbPath" - echo "Updated permissions for $dbPath" - echo "-------------------" - sudo sqlite3 "$dbPath" "SELECT * FROM access WHERE service='kTCCServiceScreenCapture';" - done - done - - - name: Run tests - id: test - timeout-minutes: 10 - working-directory: - /opt/local/var/macports/build/_Users_runner_work_Sunshine_Sunshine_ports_multimedia_Sunshine/Sunshine/work/build/tests - run: | - sudo ./test_sunshine --gtest_color=yes - - - name: Generate gcov report - # any except canceled or skipped - if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure') - id: test_report - working-directory: - /opt/local/var/macports/build/_Users_runner_work_Sunshine_Sunshine_ports_multimedia_Sunshine/Sunshine/work - run: | - base_dir=$(pwd) - build_dir=${base_dir}/build - - # get the directory name that starts with Sunshine-* - dir=$(ls -d Sunshine-*) - - cd ${build_dir} - ${{ steps.python.outputs.python-path }} -m pip install gcovr - sudo ${{ steps.python.outputs.python-path }} -m gcovr -r ../${dir} \ - --exclude-noncode-lines \ - --exclude-throw-branches \ - --exclude-unreachable-branches \ - --exclude '.*${dir}/tests/.*' \ - --exclude '.*${dir}/third-party/.*' \ - --gcov-object-directory $(pwd) \ - --verbose \ - --xml-pretty \ - -o ${{ github.workspace }}/build/coverage.xml - - - name: Upload coverage - # any except canceled or skipped - if: >- - always() && - (steps.test_report.outcome == 'success') && - startsWith(github.repository, 'LizardByte/') - uses: codecov/codecov-action@v4 - with: - disable_search: true - fail_ci_if_error: false # todo: re-enable this when action is fixed - files: ./build/coverage.xml - flags: ${{ runner.os }}-${{ matrix.os_version }} - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - - - name: Create/Update GitHub Release - if: ${{ needs.setup_release.outputs.publish_release == 'true' }} - uses: LizardByte/create-release-action@v2024.614.221009 - with: - allowUpdates: true - body: ${{ needs.setup_release.outputs.release_body }} - discussionCategory: announcements - generateReleaseNotes: ${{ needs.setup_release.outputs.release_generate_release_notes }} - name: ${{ needs.setup_release.outputs.release_tag }} - prerelease: true - tag: ${{ needs.setup_release.outputs.release_tag }} - token: ${{ secrets.GH_BOT_TOKEN }} - - build_win: - name: Windows - runs-on: windows-2019 - needs: [setup_release] - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Prepare tests - id: prepare-tests - if: false # todo: DirectX11 is not available, so even software encoder fails - run: | - # function to download and extract a zip file - function DownloadAndExtract { - param ( - [string]$Uri, - [string]$OutFile - ) - - $maxRetries = 5 - $retryCount = 0 - $success = $false - - while (-not $success -and $retryCount -lt $maxRetries) { - $retryCount++ - Write-Host "Downloading $Uri to $OutFile, attempt $retryCount of $maxRetries" - try { - Invoke-WebRequest -Uri $Uri -OutFile $OutFile - $success = $true - } catch { - Write-Host "Attempt $retryCount of $maxRetries failed with error: $($_.Exception.Message). Retrying..." - Start-Sleep -Seconds 5 - } - } - - if (-not $success) { - Write-Host "Failed to download the file after $maxRetries attempts." - exit 1 - } - - # use .NET to get the base name of the file - $baseName = (Get-Item $OutFile).BaseName - - # Extract the zip file - Expand-Archive -Path $OutFile -DestinationPath $baseName - } - - # virtual display driver - DownloadAndExtract ` - -Uri "https://www.amyuni.com/downloads/usbmmidd_v2.zip" ` - -OutFile "usbmmidd_v2.zip" - - # install - Set-Location -Path usbmmidd_v2/usbmmidd_v2 - ./deviceinstaller64 install usbmmidd.inf usbmmidd - - # create the virtual display - ./deviceinstaller64 enableidd 1 - - # move up a directory - Set-Location -Path ../.. - - # install devcon - DownloadAndExtract ` - -Uri "https://github.com/Drawbackz/DevCon-Installer/releases/download/1.4-rc/Devcon.Installer.zip" ` - -OutFile "Devcon.Installer.zip" - Set-Location -Path Devcon.Installer - # hash needs to match OS version - # https://github.com/Drawbackz/DevCon-Installer/blob/master/devcon_sources.json - Start-Process -FilePath "./Devcon Installer.exe" -Wait -ArgumentList ` - 'install', ` - '-hash', '54004C83EE34F6A55380528A8B29F4C400E61FBB947A19E0AB9E5A193D7D961E', ` - '-addpath', ` - '-update', ` - '-dir', 'C:\Windows\System32' - - # disable Hyper-V Video - # https://stackoverflow.com/a/59490940 - C:\Windows\System32\devcon.exe disable "VMBUS\{da0a7802-e377-4aac-8e77-0558eb1073f8}" - - # move up a directory - Set-Location -Path .. - - # multi monitor tool - DownloadAndExtract ` - -Uri "http://www.nirsoft.net/utils/multimonitortool-x64.zip" ` - -OutFile "multimonitortool.zip" - - # enable the virtual display - # http://www.nirsoft.net/utils/multi_monitor_tool.html - Set-Location -Path multimonitortool - - # Original Hyper-V is \\.\DISPLAY1, it will recreate itself as \\.\DISPLAY6 (or something higher than 2) - # USB Mobile Monitor Virtual Display is \\.\DISPLAY2 - - # these don't seem to work if not using runAs - # todo: do they work if not using runAs? - Start-Process powershell -Verb runAs -ArgumentList '-Command ./MultiMonitorTool.exe /enable \\.\DISPLAY2' - Start-Process powershell -Verb runAs -ArgumentList '-Command ./MultiMonitorTool.exe /SetPrimary \\.\DISPLAY2' - - # wait a few seconds - Start-Sleep -s 5 - - # list monitors - ./MultiMonitorTool.exe /stext monitor_list.txt - - # wait a few seconds - Start-Sleep -s 5 - - # print the monitor list - Get-Content -Path monitor_list.txt - - - name: Setup Dependencies Windows - uses: msys2/setup-msys2@v2 - with: - msystem: ucrt64 - update: true - install: >- - wget - - - name: Update Windows dependencies - shell: msys2 {0} - run: | - # download working curl - wget https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-curl-8.8.0-1-any.pkg.tar.zst - - # install dependencies - pacman -U --noconfirm mingw-w64-ucrt-x86_64-curl-8.8.0-1-any.pkg.tar.zst - pacman -Syu --noconfirm \ - --ignore=mingw-w64-ucrt-x86_64-curl \ - git \ - mingw-w64-ucrt-x86_64-boost \ - mingw-w64-ucrt-x86_64-cmake \ - mingw-w64-ucrt-x86_64-cppwinrt \ - mingw-w64-ucrt-x86_64-graphviz \ - mingw-w64-ucrt-x86_64-miniupnpc \ - mingw-w64-ucrt-x86_64-nlohmann-json \ - mingw-w64-ucrt-x86_64-nodejs \ - mingw-w64-ucrt-x86_64-nsis \ - mingw-w64-ucrt-x86_64-onevpl \ - mingw-w64-ucrt-x86_64-openssl \ - mingw-w64-ucrt-x86_64-opus \ - mingw-w64-ucrt-x86_64-toolchain - - - name: Install Doxygen - # GCC compiled doxygen has issues when running graphviz - env: - DOXYGEN_VERSION: "1.11.0" - run: | - # Set version variables - $doxy_ver = $env:DOXYGEN_VERSION - $_doxy_ver = $doxy_ver.Replace(".", "_") - - # Download the Doxygen installer - Invoke-WebRequest -Uri ` - "https://github.com/doxygen/doxygen/releases/download/Release_${_doxy_ver}/doxygen-${doxy_ver}-setup.exe" ` - -OutFile "doxygen-setup.exe" - - # Run the installer - Start-Process ` - -FilePath .\doxygen-setup.exe ` - -ArgumentList ` - '/VERYSILENT' ` - -Wait ` - -NoNewWindow - - # Clean up - Remove-Item -Path doxygen-setup.exe - - - name: Setup python - # use this instead of msys2 python due to known issues using wheels, https://www.msys2.org/docs/python/ - id: setup-python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Python Path - id: python-path - shell: msys2 {0} - run: | - # replace backslashes with double backslashes - python_path=$(echo "${{ steps.setup-python.outputs.python-path }}" | sed 's/\\/\\\\/g') - - # step output - echo "python-path=${python_path}" - echo "python-path=${python_path}" >> $GITHUB_OUTPUT - - - name: Build Windows - shell: msys2 {0} - env: - BRANCH: ${{ github.head_ref || github.ref_name }} - BUILD_VERSION: ${{ needs.setup_release.outputs.release_tag }} - COMMIT: ${{ needs.setup_release.outputs.release_commit }} - run: | - mkdir build - cd build - cmake \ - -DBUILD_WERROR=ON \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DPython_EXECUTABLE='${{ steps.python-path.outputs.python-path }}' \ - -DSUNSHINE_ASSETS_DIR=assets \ - -DTESTS_SOFTWARE_ENCODER_UNAVAILABLE='skip' \ - -G "MinGW Makefiles" \ - .. - mingw32-make -j$(nproc) - - - name: Package Windows - shell: msys2 {0} - run: | - mkdir -p artifacts - cd build - - # package - cpack -G NSIS - cpack -G ZIP - - # move - mv ./cpack_artifacts/Sunshine.exe ../artifacts/sunshine-windows-installer.exe - mv ./cpack_artifacts/Sunshine.zip ../artifacts/sunshine-windows-portable.zip - - - name: Run tests - id: test - shell: msys2 {0} - working-directory: build/tests - run: | - ./test_sunshine.exe --gtest_color=yes - - - name: Generate gcov report - # any except canceled or skipped - if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure') - id: test_report - shell: msys2 {0} - working-directory: build - run: | - ${{ steps.python-path.outputs.python-path }} -m pip install gcovr - ${{ steps.python-path.outputs.python-path }} -m gcovr -r .. \ - --exclude-noncode-lines \ - --exclude-throw-branches \ - --exclude-unreachable-branches \ - --exclude '.*tests/.*' \ - --exclude '.*third-party/.*' \ - --xml-pretty \ - -o coverage.xml - - - name: Upload coverage - # any except canceled or skipped - if: >- - always() && - (steps.test_report.outcome == 'success') && - startsWith(github.repository, 'LizardByte/') - uses: codecov/codecov-action@v4 - with: - disable_search: true - fail_ci_if_error: true - files: ./build/coverage.xml - flags: ${{ runner.os }} - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - - - name: Package Windows Debug Info - working-directory: build - run: | - # use .dbg file extension for binaries to avoid confusion with real packages - Get-ChildItem -File -Recurse | ` - % { Rename-Item -Path $_.PSPath -NewName $_.Name.Replace(".exe",".dbg") } - - # save the binaries with debug info - 7z -r ` - "-xr!CMakeFiles" ` - "-xr!cpack_artifacts" ` - a "../artifacts/sunshine-win32-debuginfo.7z" "*.dbg" - - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: sunshine-windows - path: artifacts/ - - - name: Create/Update GitHub Release - if: ${{ needs.setup_release.outputs.publish_release == 'true' }} - uses: LizardByte/create-release-action@v2024.614.221009 - with: - allowUpdates: true - body: ${{ needs.setup_release.outputs.release_body }} - discussionCategory: announcements - generateReleaseNotes: ${{ needs.setup_release.outputs.release_generate_release_notes }} - name: ${{ needs.setup_release.outputs.release_tag }} - prerelease: true - tag: ${{ needs.setup_release.outputs.release_tag }} - token: ${{ secrets.GH_BOT_TOKEN }} diff --git a/.github/workflows/ci-docker.yml b/.github/workflows/ci-docker.yml deleted file mode 100644 index 8e14b6c2..00000000 --- a/.github/workflows/ci-docker.yml +++ /dev/null @@ -1,385 +0,0 @@ ---- -# 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. - -# This workflow is intended to work with all our organization Docker projects. A readme named `DOCKER_README.md` -# will be used to update the description on Docker hub. - -# custom comments in dockerfiles: - -# `# platforms: ` -# Comma separated list of platforms, i.e. `# platforms: linux/386,linux/amd64`. Docker platforms can alternatively -# be listed in a file named `.docker_platforms`. -# `# platforms_pr: ` -# Comma separated list of platforms to run for PR events, i.e. `# platforms_pr: linux/amd64`. This will take -# precedence over the `# platforms: ` directive. -# `# artifacts: ` -# `true` to build in two steps, stopping at `artifacts` build stage and extracting the image from there to the -# GitHub runner. - -name: CI Docker - -on: - pull_request: - branches: [master] - types: [opened, synchronize, reopened] - push: - branches: [master] - workflow_dispatch: - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - check_dockerfiles: - name: Check Dockerfiles - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Find dockerfiles - id: find - run: | - dockerfiles=$(find . -type f -iname "Dockerfile" -o -iname "*.dockerfile") - - echo "found dockerfiles: ${dockerfiles}" - - # do not quote to keep this as a single line - echo dockerfiles=${dockerfiles} >> $GITHUB_OUTPUT - - MATRIX_COMBINATIONS="" - for FILE in ${dockerfiles}; do - # extract tag from file name - tag=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*\/(Dockerfile)/None/gm') - if [[ $tag == "None" ]]; then - MATRIX_COMBINATIONS="$MATRIX_COMBINATIONS {\"dockerfile\": \"$FILE\"}," - else - tag=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*\/(.+)(\.dockerfile)/-\2/gm') - MATRIX_COMBINATIONS="$MATRIX_COMBINATIONS {\"dockerfile\": \"$FILE\", \"tag\": \"$tag\"}," - fi - done - - # removes the last character (i.e. comma) - MATRIX_COMBINATIONS=${MATRIX_COMBINATIONS::-1} - - # setup matrix for later jobs - matrix=$(( - echo "{ \"include\": [$MATRIX_COMBINATIONS] }" - ) | jq -c .) - - echo $matrix - echo $matrix | jq . - echo "matrix=$matrix" >> $GITHUB_OUTPUT - - - name: Find dotnet solution file - id: find_dotnet - run: | - solution=$(find . -maxdepth 1 -type f -iname "*.sln") - - echo "found solution: ${solution}" - - # do not quote to keep this as a single line - echo solution=${solution} >> $GITHUB_OUTPUT - - if [[ $solution != "" ]]; then - echo "dotnet=true" >> $GITHUB_OUTPUT - else - echo "dotnet=false" >> $GITHUB_OUTPUT - fi - - outputs: - dockerfiles: ${{ steps.find.outputs.dockerfiles }} - matrix: ${{ steps.find.outputs.matrix }} - dotnet: ${{ steps.find_dotnet.outputs.dotnet }} - solution: ${{ steps.find_dotnet.outputs.solution }} - - setup_release: - if: ${{ needs.check_dockerfiles.outputs.dockerfiles }} - name: Setup Release - needs: - - check_dockerfiles - outputs: - publish_release: ${{ steps.setup_release.outputs.publish_release }} - release_body: ${{ steps.setup_release.outputs.release_body }} - release_commit: ${{ steps.setup_release.outputs.release_commit }} - release_generate_release_notes: ${{ steps.setup_release.outputs.release_generate_release_notes }} - release_tag: ${{ steps.setup_release.outputs.release_tag }} - release_version: ${{ steps.setup_release.outputs.release_version }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Release - id: setup_release - uses: LizardByte/setup-release-action@v2024.725.234618 - with: - dotnet: ${{ needs.check_dockerfiles.outputs.dotnet }} - github_token: ${{ secrets.GITHUB_TOKEN }} - - lint_dockerfile: - needs: [check_dockerfiles] - if: ${{ needs.check_dockerfiles.outputs.dockerfiles }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.check_dockerfiles.outputs.matrix) }} - name: Lint Dockerfile${{ matrix.tag }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Hadolint - id: hadolint - uses: hadolint/hadolint-action@v3.1.0 - with: - dockerfile: ${{ matrix.dockerfile }} - ignore: DL3008,DL3013,DL3016,DL3018,DL3028,DL3059 - output-file: ./hadolint.log - verbose: true - - - name: Log - if: failure() - run: | - echo "Hadolint outcome: ${{ steps.hadolint.outcome }}" >> $GITHUB_STEP_SUMMARY - cat "./hadolint.log" >> $GITHUB_STEP_SUMMARY - - docker: - needs: [check_dockerfiles, setup_release] - if: ${{ needs.check_dockerfiles.outputs.dockerfiles }} - runs-on: ubuntu-latest - permissions: - packages: write - contents: write - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.check_dockerfiles.outputs.matrix) }} - name: Docker${{ matrix.tag }} - - steps: - - name: Maximize build space - uses: easimon/maximize-build-space@v10 - with: - root-reserve-mb: 30720 # https://github.com/easimon/maximize-build-space#caveats - remove-dotnet: 'true' - remove-android: 'true' - remove-haskell: 'true' - remove-codeql: 'true' - remove-docker-images: 'true' - - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Prepare - id: prepare - env: - NV: ${{ needs.setup_release.outputs.release_tag }} - run: | - # get branch name - BRANCH=${GITHUB_HEAD_REF} - - RELEASE=${{ needs.setup_release.outputs.publish_release }} - COMMIT=${{ needs.setup_release.outputs.release_commit }} - - if [ -z "$BRANCH" ]; then - echo "This is a PUSH event" - BRANCH=${{ github.ref_name }} - CLONE_URL=${{ github.event.repository.clone_url }} - else - echo "This is a PULL REQUEST event" - CLONE_URL=${{ github.event.pull_request.head.repo.clone_url }} - fi - - # determine to push image to dockerhub and ghcr or not - if [[ $GITHUB_EVENT_NAME == "push" ]]; then - PUSH=true - else - PUSH=false - fi - - # setup the tags - REPOSITORY=${{ github.repository }} - BASE_TAG=$(echo $REPOSITORY | tr '[:upper:]' '[:lower:]') - - TAGS="${BASE_TAG}:${COMMIT:0:7}${{ matrix.tag }},ghcr.io/${BASE_TAG}:${COMMIT:0:7}${{ matrix.tag }}" - - if [[ $GITHUB_REF == refs/heads/master ]]; then - TAGS="${TAGS},${BASE_TAG}:latest${{ matrix.tag }},ghcr.io/${BASE_TAG}:latest${{ matrix.tag }}" - TAGS="${TAGS},${BASE_TAG}:master${{ matrix.tag }},ghcr.io/${BASE_TAG}:master${{ matrix.tag }}" - else - TAGS="${TAGS},${BASE_TAG}:test${{ matrix.tag }},ghcr.io/${BASE_TAG}:test${{ matrix.tag }}" - fi - - if [[ ${NV} != "" ]]; then - TAGS="${TAGS},${BASE_TAG}:${NV}${{ matrix.tag }},ghcr.io/${BASE_TAG}:${NV}${{ matrix.tag }}" - fi - - # parse custom directives out of dockerfile - # try to get the platforms from the dockerfile custom directive, i.e. `# platforms: xxx,yyy` - # directives for PR event, i.e. not push event - if [[ ${RELEASE} == "false" ]]; then - while read -r line; do - if [[ $line == "# platforms_pr: "* && $PLATFORMS == "" ]]; then - # echo the line and use `sed` to remove the custom directive - PLATFORMS=$(echo -e "$line" | sed 's/# platforms_pr: //') - elif [[ $PLATFORMS != "" ]]; then - # break while loop once all custom "PR" event directives are found - break - fi - done <"${{ matrix.dockerfile }}" - fi - # directives for all events... above directives will not be parsed if they were already found - while read -r line; do - if [[ $line == "# platforms: "* && $PLATFORMS == "" ]]; then - # echo the line and use `sed` to remove the custom directive - PLATFORMS=$(echo -e "$line" | sed 's/# platforms: //') - elif [[ $line == "# artifacts: "* && $ARTIFACTS == "" ]]; then - # echo the line and use `sed` to remove the custom directive - ARTIFACTS=$(echo -e "$line" | sed 's/# artifacts: //') - elif [[ $line == "# no-cache-filters: "* && $NO_CACHE_FILTERS == "" ]]; then - # echo the line and use `sed` to remove the custom directive - NO_CACHE_FILTERS=$(echo -e "$line" | sed 's/# no-cache-filters: //') - elif [[ $PLATFORMS != "" && $ARTIFACTS != "" && $NO_CACHE_FILTERS != "" ]]; then - # break while loop once all custom directives are found - break - fi - done <"${{ matrix.dockerfile }}" - # if PLATFORMS is blank, fall back to the legacy method of reading from the `.docker_platforms` file - if [[ $PLATFORMS == "" ]]; then - # read the platforms from `.docker_platforms` - PLATFORMS=$(<.docker_platforms) - fi - # if PLATFORMS is still blank, fall back to `linux/amd64` - if [[ $PLATFORMS == "" ]]; then - PLATFORMS="linux/amd64" - fi - - echo "branch=${BRANCH}" >> $GITHUB_OUTPUT - echo "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT - echo "clone_url=${CLONE_URL}" >> $GITHUB_OUTPUT - echo "artifacts=${ARTIFACTS}" >> $GITHUB_OUTPUT - echo "no_cache_filters=${NO_CACHE_FILTERS}" >> $GITHUB_OUTPUT - echo "platforms=${PLATFORMS}" >> $GITHUB_OUTPUT - echo "tags=${TAGS}" >> $GITHUB_OUTPUT - - - name: Set Up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - id: buildx - - - name: Cache Docker Layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: Docker-buildx${{ matrix.tag }}-${{ github.sha }} - restore-keys: | - Docker-buildx${{ matrix.tag }}- - - - name: Log in to Docker Hub - if: ${{ needs.setup_release.outputs.publish_release == 'true' }} # PRs do not have access to secrets - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Log in to the Container registry - if: ${{ needs.setup_release.outputs.publish_release == 'true' }} # PRs do not have access to secrets - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ secrets.GH_BOT_NAME }} - password: ${{ secrets.GH_BOT_TOKEN }} - - - name: Build artifacts - if: ${{ steps.prepare.outputs.artifacts == 'true' }} - id: build_artifacts - uses: docker/build-push-action@v6 - with: - context: ./ - file: ${{ matrix.dockerfile }} - target: artifacts - outputs: type=local,dest=artifacts - push: false - platforms: ${{ steps.prepare.outputs.platforms }} - build-args: | - BRANCH=${{ steps.prepare.outputs.branch }} - BUILD_DATE=${{ steps.prepare.outputs.build_date }} - BUILD_VERSION=${{ needs.setup_release.outputs.release_tag }} - COMMIT=${{ needs.setup_release.outputs.release_commit }} - CLONE_URL=${{ steps.prepare.outputs.clone_url }} - RELEASE=${{ needs.setup_release.outputs.publish_release }} - tags: ${{ steps.prepare.outputs.tags }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - no-cache-filters: ${{ steps.prepare.outputs.no_cache_filters }} - - - name: Build and push - id: build - uses: docker/build-push-action@v6 - with: - context: ./ - file: ${{ matrix.dockerfile }} - push: ${{ needs.setup_release.outputs.publish_release }} - platforms: ${{ steps.prepare.outputs.platforms }} - build-args: | - BRANCH=${{ steps.prepare.outputs.branch }} - BUILD_DATE=${{ steps.prepare.outputs.build_date }} - BUILD_VERSION=${{ needs.setup_release.outputs.release_tag }} - COMMIT=${{ needs.setup_release.outputs.release_commit }} - CLONE_URL=${{ steps.prepare.outputs.clone_url }} - RELEASE=${{ needs.setup_release.outputs.publish_release }} - tags: ${{ steps.prepare.outputs.tags }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - no-cache-filters: ${{ steps.prepare.outputs.no_cache_filters }} - - - name: Arrange Artifacts - if: ${{ steps.prepare.outputs.artifacts == 'true' }} - working-directory: artifacts - run: | - # artifacts will be in sub directories named after the docker target platform, e.g. `linux_amd64` - # so move files to the artifacts directory - # https://unix.stackexchange.com/a/52816 - find ./ -type f -exec mv -t ./ -n '{}' + - - # remove provenance file - rm -f ./provenance.json - - - name: Upload Artifacts - if: ${{ steps.prepare.outputs.artifacts == 'true' }} - uses: actions/upload-artifact@v4 - with: - name: Docker${{ matrix.tag }} - path: artifacts/ - - - name: Create/Update GitHub Release - if: ${{ needs.setup_release.outputs.publish_release == 'true' && steps.prepare.outputs.artifacts == 'true' }} - uses: LizardByte/create-release-action@v2024.614.221009 - with: - allowUpdates: true - artifacts: "*artifacts/*" - body: ${{ needs.setup_release.outputs.release_body }} - discussionCategory: announcements - generateReleaseNotes: ${{ needs.setup_release.outputs.release_generate_release_notes }} - name: ${{ needs.setup_release.outputs.release_tag }} - prerelease: true - tag: ${{ needs.setup_release.outputs.release_tag }} - token: ${{ secrets.GH_BOT_TOKEN }} - - - name: Update Docker Hub Description - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - uses: peter-evans/dockerhub-description@v4 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_PASSWORD }} # token is not currently supported - repository: ${{ env.BASE_TAG }} - short-description: ${{ github.event.repository.description }} - readme-filepath: ./DOCKER_README.md diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 60dbef1c..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,214 +0,0 @@ ---- -# 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. - -# This workflow will analyze all supported languages in the repository using CodeQL Analysis. - -name: "CodeQL" - -on: - push: - branches: ["master"] - pull_request: - branches: ["master"] - schedule: - - cron: '00 12 * * 0' # every Sunday at 12:00 UTC - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - languages: - name: Get language matrix - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.lang.outputs.result }} - continue: ${{ steps.continue.outputs.result }} - steps: - - name: Get repo languages - uses: actions/github-script@v7 - id: lang - with: - script: | - // CodeQL supports ['cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift'] - // Use only 'java' to analyze code written in Java, Kotlin or both - // Use only 'javascript' to analyze code written in JavaScript, TypeScript or both - // Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - const supported_languages = ['cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift'] - - const remap_languages = { - 'c++': 'cpp', - 'c#': 'csharp', - 'kotlin': 'java', - 'typescript': 'javascript', - } - - const repo = context.repo - const response = await github.rest.repos.listLanguages(repo) - let matrix = { - "include": [] - } - - for (let [key, value] of Object.entries(response.data)) { - // remap language - if (remap_languages[key.toLowerCase()]) { - console.log(`Remapping language: ${key} to ${remap_languages[key.toLowerCase()]}`) - key = remap_languages[key.toLowerCase()] - } - if (supported_languages.includes(key.toLowerCase())) { - console.log(`Found supported language: ${key}`) - let osList = ['ubuntu-latest']; - if (key.toLowerCase() === 'swift') { - osList = ['macos-latest']; - } else if (key.toLowerCase() === 'cpp') { - // TODO: update macos to latest after the below issue is resolved - // https://github.com/github/codeql-action/issues/2266 - osList = ['macos-13', 'ubuntu-latest', 'windows-latest']; - } - for (let os of osList) { - // set name for matrix - if (osList.length == 1) { - name = key.toLowerCase() - } else { - name = `${key.toLowerCase()}, ${os}` - } - - // add to matrix - matrix['include'].push({"language": key.toLowerCase(), "os": os, "name": name}) - } - } - } - - // print languages - console.log(`matrix: ${JSON.stringify(matrix)}`) - - return matrix - - - name: Continue - uses: actions/github-script@v7 - id: continue - with: - script: | - // if matrix['include'] is an empty list return false, otherwise true - const matrix = ${{ steps.lang.outputs.result }} // this is already json encoded - - if (matrix['include'].length == 0) { - return false - } else { - return true - } - - analyze: - name: Analyze (${{ matrix.name }}) - if: ${{ needs.languages.outputs.continue == 'true' }} - defaults: - run: - shell: ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || 'bash' }} - env: - GITHUB_CODEQL_BUILD: true - needs: [languages] - runs-on: ${{ matrix.os || 'ubuntu-latest' }} - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.languages.outputs.matrix) }} - - steps: - - name: Maximize build space - if: >- - runner.os == 'Linux' && - matrix.language == 'cpp' - uses: easimon/maximize-build-space@v10 - with: - root-reserve-mb: 30720 - remove-dotnet: ${{ (matrix.language == 'csharp' && 'false') || 'true' }} - remove-android: 'true' - remove-haskell: 'true' - remove-codeql: 'false' - remove-docker-images: 'true' - - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Setup msys2 - if: >- - runner.os == 'Windows' && - matrix.language == 'cpp' - uses: msys2/setup-msys2@v2 - with: - msystem: ucrt64 - update: true - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # yamllint disable-line rule:line-length - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - config: | - paths-ignore: - - build - - node_modules - - third-party - - # Pre autobuild - # create a file named .codeql-prebuild-${{ matrix.language }}.sh in the root of your repository - # create a file named .codeql-build-${{ matrix.language }}.sh in the root of your repository - - name: Prebuild - id: prebuild - run: | - # check if prebuild script exists - filename=".codeql-prebuild-${{ matrix.language }}-${{ runner.os }}.sh" - if [ -f "./${filename}" ]; then - echo "Running prebuild script: ${filename}" - ./${filename} - fi - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). - - name: Autobuild - if: steps.prebuild.outputs.skip_autobuild != 'true' - uses: github/codeql-action/autobuild@v3 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" - output: sarif-results - upload: failure-only - - - name: filter-sarif - uses: advanced-security/filter-sarif@v1 - with: - input: sarif-results/${{ matrix.language }}.sarif - output: sarif-results/${{ matrix.language }}.sarif - patterns: | - -build/** - -node_modules/** - -third\-party/** - - - name: Upload SARIF - uses: github/codeql-action/upload-sarif@v3 - with: - sarif_file: sarif-results/${{ matrix.language }}.sarif - - - name: Upload loc as a Build Artifact - uses: actions/upload-artifact@v4 - with: - name: sarif-results-${{ matrix.language }}-${{ runner.os }} - path: sarif-results - retention-days: 1 diff --git a/.github/workflows/cpp-lint.yml b/.github/workflows/cpp-lint.yml deleted file mode 100644 index 5d0df5ad..00000000 --- a/.github/workflows/cpp-lint.yml +++ /dev/null @@ -1,120 +0,0 @@ ---- -# 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. - -# Lint c++ source files and cmake files. - -name: C++ Lint - -on: - pull_request: - branches: [master] - types: [opened, synchronize, reopened] - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - clang-format: - name: Clang Format Lint - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Find cpp files - id: find_files - run: | - # find files - found_files=$(find . -type f -iname "*.cpp" -o -iname "*.h" -o -iname "*.m" -o -iname "*.mm") - ignore_files=$(find . -type f -iname ".clang-format-ignore") - - # Loop through each C++ file - for file in $found_files; do - for ignore_file in $ignore_files; do - ignore_directory=$(dirname "$ignore_file") - # if directory of ignore_file is beginning of file - if [[ "$file" == "$ignore_directory"* ]]; then - echo "ignoring file: ${file}" - found_files="${found_files//${file}/}" - break 1 - fi - done - done - - # remove empty lines - found_files=$(echo "$found_files" | sed '/^\s*$/d') - - echo "found cpp files: ${found_files}" - - # do not quote to keep this as a single line - echo found_files=${found_files} >> $GITHUB_OUTPUT - - - name: Clang format lint - if: ${{ steps.find_files.outputs.found_files }} - uses: DoozyX/clang-format-lint-action@v0.17 - with: - source: ${{ steps.find_files.outputs.found_files }} - extensions: 'cpp,h,m,mm' - clangFormatVersion: 16 - style: file - inplace: false - - - name: Upload Artifacts - if: failure() - uses: actions/upload-artifact@v4 - with: - name: clang-format-fixes - path: ${{ steps.find_files.outputs.found_files }} - - cmake-lint: - name: CMake Lint - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip setuptools cmakelang - - - name: Find cmake files - id: find_files - run: | - # find files - found_files=$(find . -type f -iname "CMakeLists.txt" -o -iname "*.cmake") - ignore_files=$(find . -type f -iname ".cmake-lint-ignore") - - # Loop through each C++ file - for file in $found_files; do - for ignore_file in $ignore_files; do - ignore_directory=$(dirname "$ignore_file") - # if directory of ignore_file is beginning of file - if [[ "$file" == "$ignore_directory"* ]]; then - echo "ignoring file: ${file}" - found_files="${found_files//${file}/}" - break 1 - fi - done - done - - # remove empty lines - found_files=$(echo "$found_files" | sed '/^\s*$/d') - - echo "found cmake files: ${found_files}" - - # do not quote to keep this as a single line - echo found_files=${found_files} >> $GITHUB_OUTPUT - - - name: Test with cmake-lint - run: | - cmake-lint --line-width 120 --tab-size 4 ${{ steps.find_files.outputs.found_files }} diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml deleted file mode 100644 index aec6006c..00000000 --- a/.github/workflows/issues.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# 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. - -# Label and un-label actions using `../label-actions.yml`. - -name: Issues - -on: - issues: - types: [labeled, unlabeled] - discussion: - types: [labeled, unlabeled] - -jobs: - label: - name: Label Actions - if: startsWith(github.repository, 'LizardByte/') - runs-on: ubuntu-latest - steps: - - name: Label Actions - uses: dessant/label-actions@v4 - with: - github-token: ${{ secrets.GH_BOT_TOKEN }} diff --git a/.github/workflows/localize.yml b/.github/workflows/localize.yml deleted file mode 100644 index da0997a3..00000000 --- a/.github/workflows/localize.yml +++ /dev/null @@ -1,98 +0,0 @@ ---- -name: localize - -on: - push: - branches: [master] - paths: # prevents workflow from running unless these files change - - '.github/workflows/localize.yml' - - 'src/**' - - 'locale/sunshine.po' - workflow_dispatch: - -env: - file: ./locale/sunshine.po - -jobs: - localize: - name: Update Localization - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Python 3.9 - uses: actions/setup-python@v5 # 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 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 - - # 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 - - # print the git diff - git diff 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 - 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@v6 - 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: master - title: New Babel Updates - body: | - Update report - - Updated ${{ steps.date.outputs.date }} - - Auto-generated by [create-pull-request][1] - - [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 deleted file mode 100644 index 61e23f74..00000000 --- a/.github/workflows/python-flake8.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -# 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. - -# Lint python files with flake8. - -name: flake8 - -on: - pull_request: - branches: [master] - types: [opened, synchronize, reopened] - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - flake8: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 # https://github.com/actions/setup-python - with: - python-version: '3.10' - - - name: Install dependencies - run: | - # pin flake8 before v6.0.0 due to removal of support for type comments (required for Python 2.7 type hints) - python -m pip install --upgrade pip setuptools "flake8<6" - - - name: Test with flake8 - run: | - python -m flake8 --verbose diff --git a/.github/workflows/release-notifier-moonlight.yml b/.github/workflows/release-notifier-moonlight.yml deleted file mode 100644 index 9369a7fa..00000000 --- a/.github/workflows/release-notifier-moonlight.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Release Notifications (Moonlight) - -on: - release: - types: - - released # this triggers when a release is published, but does not include prereleases or drafts - -jobs: - discord: - if: >- - startsWith(github.repository, 'LizardByte/') && - !github.event.release.prerelease && - !github.event.release.draft - 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 diff --git a/.github/workflows/release-notifier.yml b/.github/workflows/release-notifier.yml deleted file mode 100644 index 2d1e632d..00000000 --- a/.github/workflows/release-notifier.yml +++ /dev/null @@ -1,127 +0,0 @@ ---- -# 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. - -# Send release notification to various platforms. - -name: Release Notifications - -on: - release: - types: - - released # this triggers when a release is published, but does not include pre-releases or drafts - -jobs: - simplified_changelog: - if: >- - startsWith(github.repository, 'LizardByte/') && - !github.event.release.prerelease && - !github.event.release.draft - outputs: - SIMPLIFIED_BODY: ${{ steps.output.outputs.SIMPLIFIED_BODY }} - runs-on: ubuntu-latest - steps: - - name: remove contributors section - env: - RELEASE_BODY: ${{ github.event.release.body }} - id: output - run: | - echo "${RELEASE_BODY}" > ./release_body.md - modified_body=$(sed '/^---$/d; /^## Contributors$/,/<\/a>/d' ./release_body.md) - echo "modified_body: ${modified_body}" - - # use a heredoc to ensure the output is multiline - echo "SIMPLIFIED_BODY<> $GITHUB_OUTPUT - echo "${modified_body}" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - discord: - if: >- - startsWith(github.repository, 'LizardByte/') && - !github.event.release.prerelease && - !github.event.release.draft - needs: simplified_changelog - runs-on: ubuntu-latest - steps: - - name: discord - uses: sarisia/actions-status-discord@v1 - with: - avatar_url: ${{ secrets.ORG_LOGO_URL }} - color: 0x00ff00 - description: ${{ needs.simplified_changelog.outputs.SIMPLIFIED_BODY }} - nodetail: true - nofail: false - title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released - url: ${{ github.event.release.html_url }} - username: ${{ secrets.DISCORD_USERNAME }} - webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }} - - facebook_group: - if: >- - startsWith(github.repository, 'LizardByte/') && - !github.event.release.prerelease && - !github.event.release.draft - runs-on: ubuntu-latest - steps: - - name: facebook-post-action - uses: ReenigneArcher/facebook-post-action@v1 - with: - page_id: ${{ secrets.FACEBOOK_GROUP_ID }} - access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }} - message: | - ${{ github.event.repository.name }} ${{ github.ref_name }} Released - url: ${{ github.event.release.html_url }} - - facebook_page: - if: >- - startsWith(github.repository, 'LizardByte/') && - !github.event.release.prerelease && - !github.event.release.draft - runs-on: ubuntu-latest - steps: - - name: facebook-post-action - uses: ReenigneArcher/facebook-post-action@v1 - with: - page_id: ${{ secrets.FACEBOOK_PAGE_ID }} - access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }} - message: | - ${{ github.event.repository.name }} ${{ github.ref_name }} Released - url: ${{ github.event.release.html_url }} - - reddit: - if: >- - startsWith(github.repository, 'LizardByte/') && - !github.event.release.prerelease && - !github.event.release.draft - needs: simplified_changelog - runs-on: ubuntu-latest - steps: - - name: reddit - uses: bluwy/release-for-reddit-action@v2 - with: - username: ${{ secrets.REDDIT_USERNAME }} - password: ${{ secrets.REDDIT_PASSWORD }} - app-id: ${{ secrets.REDDIT_CLIENT_ID }} - app-secret: ${{ secrets.REDDIT_CLIENT_SECRET }} - subreddit: ${{ secrets.REDDIT_SUBREDDIT }} - title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released - url: ${{ github.event.release.html_url }} - flair-id: ${{ secrets.REDDIT_FLAIR_ID }} # https://www.reddit.com/r/>/api/link_flair.json - comment: ${{ needs.simplified_changelog.outputs.SIMPLIFIED_BODY }} - - x: - if: >- - startsWith(github.repository, 'LizardByte/') && - !github.event.release.prerelease && - !github.event.release.draft - runs-on: ubuntu-latest - steps: - - name: x - uses: nearform-actions/github-action-notify-twitter@v1 - with: - message: ${{ github.event.release.html_url }} - twitter-app-key: ${{ secrets.X_APP_KEY }} - twitter-app-secret: ${{ secrets.X_APP_SECRET }} - twitter-access-token: ${{ secrets.X_ACCESS_TOKEN }} - twitter-access-token-secret: ${{ secrets.X_ACCESS_TOKEN_SECRET }} diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml deleted file mode 100644 index 99d2793e..00000000 --- a/.github/workflows/update-changelog.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -# 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. - -# Update changelog on release events. - -name: Update changelog - -on: - release: - types: [created, edited, deleted] - workflow_dispatch: - -concurrency: - group: "${{ github.workflow }}" - cancel-in-progress: true - -jobs: - update-changelog: - if: >- - github.event_name == 'workflow_dispatch' || - (!github.event.release.prerelease && !github.event.release.draft) - runs-on: ubuntu-latest - steps: - - name: Update Changelog - uses: LizardByte/update-changelog-action@v2024.609.4705 - with: - changelogBranch: changelog - changelogFile: CHANGELOG.md - token: ${{ secrets.GH_BOT_TOKEN }} diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml deleted file mode 100644 index d1212f65..00000000 --- a/.github/workflows/update-docs.yml +++ /dev/null @@ -1,89 +0,0 @@ ---- -# 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. - -# Use the `rtd` repository label to identify repositories that should trigger have this workflow. -# If the project slug is not the repository name, add a repository variable named `READTHEDOCS_SLUG` with the value of -# the ReadTheDocs project slug. - -# Update readthedocs on release events. - -name: Update docs - -on: - release: - types: [created, edited, deleted] - -concurrency: - group: "${{ github.workflow }}-${{ github.event.release.tag_name }}" - cancel-in-progress: true - -jobs: - update-docs: - env: - RTD_SLUG: ${{ vars.READTHEDOCS_SLUG }} - RTD_TOKEN: ${{ secrets.READTHEDOCS_TOKEN }} - TAG: ${{ github.event.release.tag_name }} - if: >- - !github.event.release.draft - runs-on: ubuntu-latest - steps: - - name: Get RTD_SLUG - run: | - # if the RTD_SLUG is not set, use the repository name in lowercase - if [ -z "${RTD_SLUG}" ]; then - RTD_SLUG=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]') - fi - echo "RTD_SLUG=${RTD_SLUG}" >> $GITHUB_ENV - - - name: Deactivate deleted release - if: >- - github.event_name == 'release' && - github.event.action == 'deleted' - run: | - json_body=$(jq -n \ - --arg active "false" \ - --arg hidden "false" \ - --arg privacy_level "public" \ - '{active: $active, hidden: $hidden, privacy_level: $privacy_level}') - - curl \ - -X PATCH \ - -H "Authorization: Token ${RTD_TOKEN}" \ - https://readthedocs.org/api/v3/projects/${RTD_SLUG}/versions/${TAG}/ \ - -H "Content-Type: application/json" \ - -d "$json_body" - - - name: Check if edited release is latest GitHub release - id: check - if: >- - github.event_name == 'release' && - github.event.action == 'edited' - uses: actions/github-script@v7 - with: - script: | - const latestRelease = await github.rest.repos.getLatestRelease({ - owner: context.repo.owner, - repo: context.repo.repo - }); - - core.setOutput('isLatestRelease', latestRelease.data.tag_name === context.payload.release.tag_name); - - - name: Update RTD project - # changing the default branch in readthedocs makes "latest" point to that branch/tag - # we can also update other properties like description, etc. - if: >- - steps.check.outputs.isLatestRelease == 'true' - run: | - json_body=$(jq -n \ - --arg default_branch "${TAG}" \ - --arg description "${{ github.event.repository.description }}" \ - '{default_branch: $default_branch}') - - curl \ - -X PATCH \ - -H "Authorization: Token ${RTD_TOKEN}" \ - https://readthedocs.org/api/v3/projects/${RTD_SLUG}/ \ - -H "Content-Type: application/json" \ - -d "$json_body" diff --git a/.github/workflows/update-homebrew-release.yml b/.github/workflows/update-homebrew-release.yml deleted file mode 100644 index 1ab0e16a..00000000 --- a/.github/workflows/update-homebrew-release.yml +++ /dev/null @@ -1,71 +0,0 @@ ---- -# This action is a candidate to centrally manage in https://github.com//.github/ -# If more Homebrew applications are developed, consider moving this action to the organization's .github repository, -# using the `homebrew-pkg` repository label to identify repositories that should trigger this workflow. - -# Update Homebrew on release events. - -name: Update Homebrew release - -on: - release: - types: [created, edited] - -concurrency: - group: "${{ github.workflow }}-${{ github.event.release.tag_name }}" - cancel-in-progress: true - -jobs: - update-homebrew-release: - if: >- - github.repository_owner == 'LizardByte' && - !github.event.release.draft && !github.event.release.prerelease - runs-on: ubuntu-latest - steps: - - name: Check if Homebrew repo - env: - TOPIC: homebrew-pkg - id: check - uses: actions/github-script@v7 - with: - script: | - const topic = process.env.TOPIC; - console.log(`Checking if repo has topic: ${topic}`); - - const repoTopics = await github.rest.repos.getAllTopics({ - owner: context.repo.owner, - repo: context.repo.repo - }); - console.log(`Repo topics: ${repoTopics.data.names}`); - - const hasTopic = repoTopics.data.names.includes(topic); - console.log(`Has topic: ${hasTopic}`); - - core.setOutput('hasTopic', hasTopic); - - - name: Download release asset - id: download - if: >- - steps.check.outputs.hasTopic == 'true' - uses: robinraju/release-downloader@v1.11 - with: - repository: "${{ github.repository }}" - tag: "${{ github.event.release.tag_name }}" - fileName: "*.rb" - tarBall: false - zipBall: false - out-file-path: "release_downloads" - extract: false - - - name: Publish Homebrew Formula - if: >- - steps.check.outputs.hasTopic == 'true' && - fromJson(steps.download.outputs.downloaded_files)[0] - uses: LizardByte/homebrew-release-action@v2024.612.21058 - with: - formula_file: ${{ fromJson(steps.download.outputs.downloaded_files)[0] }} - git_email: ${{ secrets.GH_BOT_EMAIL }} - git_username: ${{ secrets.GH_BOT_NAME }} - publish: true - token: ${{ secrets.GH_BOT_TOKEN }} - validate: false diff --git a/.github/workflows/update-pacman-repo.yml b/.github/workflows/update-pacman-repo.yml deleted file mode 100644 index 328833a8..00000000 --- a/.github/workflows/update-pacman-repo.yml +++ /dev/null @@ -1,110 +0,0 @@ ---- -# This action is a candidate to centrally manage in https://github.com//.github/ -# If more pacman packages are developed, consider moving this action to the organization's .github repository, -# using the `pacman-pkg` repository label to identify repositories that should trigger have this workflow. - -# Update pacman repo on release events. - -name: Update pacman repo - -on: - release: - types: [created, edited] - -concurrency: - group: "${{ github.workflow }}-${{ github.event.release.tag_name }}" - cancel-in-progress: true - -jobs: - update-homebrew-release: - if: >- - github.repository_owner == 'LizardByte' && - !github.event.release.draft && !github.event.release.prerelease - runs-on: ubuntu-latest - steps: - - name: Check if pacman repo - env: - TOPIC: pacman-pkg - id: check - uses: actions/github-script@v7 - with: - script: | - const topic = process.env.TOPIC; - console.log(`Checking if repo has topic: ${topic}`); - - const repoTopics = await github.rest.repos.getAllTopics({ - owner: context.repo.owner, - repo: context.repo.repo - }); - console.log(`Repo topics: ${repoTopics.data.names}`); - - const hasTopic = repoTopics.data.names.includes(topic); - console.log(`Has topic: ${hasTopic}`); - - core.setOutput('hasTopic', hasTopic); - - - name: Check if edited release is latest GitHub release - id: check - if: >- - github.event_name == 'release' && - github.event.action == 'edited' - uses: actions/github-script@v7 - with: - script: | - const latestRelease = await github.rest.repos.getLatestRelease({ - owner: context.repo.owner, - repo: context.repo.repo - }); - - core.setOutput('isLatestRelease', latestRelease.data.tag_name === context.payload.release.tag_name); - - - name: Checkout pacman-repo - if: >- - steps.check.outputs.hasTopic == 'true' && - steps.check.outputs.isLatestRelease == 'true' - uses: actions/checkout@v4 - with: - repository: ${{ github.repository_owner }}/pacman-repo - - - name: Prep - id: prep - if: >- - steps.check.outputs.hasTopic == 'true' && - steps.check.outputs.isLatestRelease == 'true' - run: | - echo "pkg_name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT - - - name: Download release asset - id: download - if: >- - steps.check.outputs.hasTopic == 'true' && - steps.check.outputs.isLatestRelease == 'true' - uses: robinraju/release-downloader@v1.11 - with: - repository: "${{ github.repository }}" - tag: "${{ github.event.release.tag_name }}" - fileName: "*.pkg.tar.gz" - tarBall: false - zipBall: false - out-file-path: "pkgbuilds/${{ steps.prep.outputs.pkg_name }}" - extract: true - - - name: Create/Update Pull Request - if: >- - steps.check.outputs.hasTopic == 'true'&& - steps.check.outputs.isLatestRelease == 'true' && - fromJson(steps.download.outputs.downloaded_files)[0] - uses: peter-evans/create-pull-request@v6 - with: - add-paths: | - pkgbuilds/* - token: ${{ secrets.GH_BOT_TOKEN }} - commit-message: Update ${{ github.repository }} to ${{ github.event.release.tag_name }} - branch: bot/bump-${{ github.repository }}-${{ github.event.release.tag_name }} - delete-branch: true - base: master - title: Update ${{ github.repository }} to ${{ github.event.release.tag_name }} - body: ${{ github.event.release.body }} - labels: | - auto-approve - auto-merge diff --git a/.github/workflows/update-pages.yml b/.github/workflows/update-pages.yml deleted file mode 100644 index 5db0f94d..00000000 --- a/.github/workflows/update-pages.yml +++ /dev/null @@ -1,62 +0,0 @@ ---- -name: Build GH-Pages - -on: - pull_request: - branches: [master] - types: [opened, synchronize, reopened] - push: - branches: [master] - workflow_dispatch: - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - update_pages: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Checkout gh-pages - uses: actions/checkout@v4 - with: - ref: gh-pages - path: gh-pages - persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of the personal token - fetch-depth: 0 # otherwise, will fail to push refs to dest repo - - - name: Prepare gh-pages - run: | - # empty contents - rm -f -r ./gh-pages/* - - # copy template back to pages - cp -f -r ./gh-pages-template/. ./gh-pages/ - - - name: Upload Artifacts - if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} - uses: actions/upload-artifact@v4 - with: - name: gh-pages - if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - path: | - ${{ github.workspace }}/gh-pages - !**/*.git - - - name: Deploy to gh-pages - if: >- - (github.event_name == 'push' && github.ref == 'refs/heads/master') || - (github.event_name == 'workflow_dispatch') - uses: actions-js/push@v1.5 - with: - github_token: ${{ secrets.GH_BOT_TOKEN }} - author_email: ${{ secrets.GH_BOT_EMAIL }} - author_name: ${{ secrets.GH_BOT_NAME }} - directory: gh-pages - branch: gh-pages - force: false - message: sync gh-pages to ${{ github.sha }} diff --git a/.github/workflows/update-winget-release.yml b/.github/workflows/update-winget-release.yml deleted file mode 100644 index 9e3278ec..00000000 --- a/.github/workflows/update-winget-release.yml +++ /dev/null @@ -1,69 +0,0 @@ ---- -# This action is a candidate to centrally manage in https://github.com//.github/ -# If more Winget applications are developed, consider moving this action to the organization's .github repository, -# using the `winget-pkg` repository label to identify repositories that should trigger this workflow. - -# Update Winget on release events. - -name: Update Winget release - -on: - release: - types: [created, edited] - -concurrency: - group: "${{ github.workflow }}-${{ github.event.release.tag_name }}" - cancel-in-progress: true - -jobs: - update-winget-release: - if: >- - github.repository_owner == 'LizardByte' && - !github.event.release.draft && !github.event.release.prerelease - runs-on: ubuntu-latest - steps: - - name: Check if Winget repo - env: - TOPIC: winget-pkg - id: check - uses: actions/github-script@v7 - with: - script: | - const topic = process.env.TOPIC; - console.log(`Checking if repo has topic: ${topic}`); - - const repoTopics = await github.rest.repos.getAllTopics({ - owner: context.repo.owner, - repo: context.repo.repo - }); - console.log(`Repo topics: ${repoTopics.data.names}`); - - const hasTopic = repoTopics.data.names.includes(topic); - console.log(`Has topic: ${hasTopic}`); - - core.setOutput('hasTopic', hasTopic); - - - name: Download release asset - id: download - if: >- - steps.check.outputs.hasTopic == 'true' - uses: robinraju/release-downloader@v1.11 - with: - repository: "${{ github.repository }}" - tag: "${{ github.event.release.tag_name }}" - fileName: "*.exe" - tarBall: false - zipBall: false - out-file-path: "release_downloads" - extract: false - - - name: Release to WinGet - if: >- - steps.check.outputs.hasTopic == 'true' && - fromJson(steps.download.outputs.downloaded_files)[0] - uses: vedantmgoyal2009/winget-releaser@v2 - with: - identifier: "${{ github.repository_owner }}.${{ github.event.repository.name }}" - release-tag: ${{ github.event.release.tag_name }} - installers-regex: '\.exe$' - token: ${{ secrets.GH_BOT_TOKEN }} diff --git a/.github/workflows/yaml-lint.yml b/.github/workflows/yaml-lint.yml deleted file mode 100644 index 023b836c..00000000 --- a/.github/workflows/yaml-lint.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -# 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. - -# Lint yaml files. - -name: yaml lint - -on: - pull_request: - branches: [master] - types: [opened, synchronize, reopened] - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - yaml-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - 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 - with: - # https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration - config_data: | - extends: default - rules: - comments: - level: error - line-length: - max: 120 - truthy: - # 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: warning - file_or_dir: . ${{ steps.find-files.outputs.found }} - - - name: Log - run: | - cat "${{ steps.yaml-lint.outputs.logfile }}" >> $GITHUB_STEP_SUMMARY