Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling nightly into master #2459

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9288775
feat(macos/capture): support for capture display other than main disp…
TimmyOVO Apr 22, 2024
7fb8c76
Use C++20. (#2322)
tez011 Apr 26, 2024
9d5ee2f
fix(macos/input): incorrect mouse input for non-main display (#2461)
TimmyOVO May 2, 2024
c6fc12a
webui: Update resolution automation example text with auto refresh ra…
cgarst May 7, 2024
26e0ff8
build(archlinux): bump gcc from 12 to 13 (#2519)
ReenigneArcher May 10, 2024
b4c12cb
ci: fix code coverage (#2512)
ReenigneArcher May 11, 2024
4e49db9
build(linux)!: add fedora 40 and remove fedora 38 (#2525)
ReenigneArcher May 12, 2024
6674090
Unify asset building and use find_program to find NPM (#2522)
chewi May 12, 2024
659a426
fix(file_handler): avoid writing extra newline character (#2335)
ReenigneArcher May 12, 2024
0a595dc
fix(linux): add frame processing latency and logging improvements (#2…
gschintgen May 12, 2024
a5bbf36
AppImage: add needed VA-API libraries (Intel & AMD) (#2429)
gschintgen May 13, 2024
9c5239c
build(deps): bump LizardByte/homebrew-release-action from 2024.417.22…
dependabot[bot] May 13, 2024
81c2ecf
build(macos): skip link of nonexistent directories (#2526)
ReenigneArcher May 13, 2024
4b6ff37
refactor(ui): break down config.html into smaller pieces (#2491)
Hazer May 13, 2024
d8e73cc
build(deps): bump furo from 2024.1.29 to 2024.5.6 (#2511)
dependabot[bot] May 13, 2024
542cc71
build(deps): bump packaging/linux/flatpak/deps/org.flatpak.Builder.Ba…
dependabot[bot] May 13, 2024
2cadb81
Allow a custom FFmpeg build to be provided using CMake variables (#1970)
chewi May 13, 2024
9ee6811
build(deps): bump third-party/tray from `4d8b798` to `cb33552` (#2528)
dependabot[bot] May 14, 2024
786a9ac
build(deps): bump packaging/linux/flatpak/deps/shared-modules from `e…
dependabot[bot] May 14, 2024
b87fd42
build(deps): bump babel from 2.14.0 to 2.15.0 (#2504)
dependabot[bot] May 14, 2024
c5d8e1b
build(deps): bump vue from 3.4.23 to 3.4.27 (#2509)
dependabot[bot] May 14, 2024
ff54ab2
fix(macos): fix broken streaming on MacOS (#2485)
Hazer May 14, 2024
d70a17a
ci(codeql): fix codeql builds (#2475)
ReenigneArcher May 14, 2024
80d1d94
docs: packet loss and linux controller (#2514)
skryvel May 15, 2024
f4f343b
build(deps): bump vue-i18n from 9.13.0 to 9.13.1 (#2455)
dependabot[bot] May 15, 2024
1e59e28
build(deps): bump third-party/nvapi-open-source-sdk from `c0f5f7b` to…
dependabot[bot] May 16, 2024
aff3b56
build(deps): bump third-party/Simple-Web-Server from `27b41f5` to `4a…
dependabot[bot] May 16, 2024
2a1cb25
build(deps): bump third-party/wayland-protocols from `08d1c72` to `24…
dependabot[bot] May 16, 2024
3adb934
New Crowdin updates (#2454)
ReenigneArcher May 16, 2024
e6e4dcf
build(deps): bump third-party/moonlight-common-c from `cbd0ec1` to `e…
dependabot[bot] May 16, 2024
890b6fd
build(deps): bump LizardByte/homebrew-release-action from 2024.511.16…
dependabot[bot] May 17, 2024
373390e
build(deps): bump third-party/build-deps from `efd3a38` to `a326d43` …
dependabot[bot] May 19, 2024
fdb443a
Fix log message for Periodic Ping (#2538)
c3m3gyanesh May 19, 2024
26ceec5
chore: update global workflows (#2547)
LizardByte-bot May 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 24 additions & 11 deletions .codeql-prebuild-cpp-Linux.sh
@@ -1,7 +1,23 @@
# install dependencies for C++ analysis
set -e

CUDA_VERSION=11.8.0
CUDA_BUILD=520.61.05

# install wget and cuda first
sudo apt-get update -y
sudo apt-get install -y \
wget

# Install CUDA
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

# Install dependencies
sudo apt-get install -y \
build-essential \
gcc-10 \
Expand Down Expand Up @@ -32,8 +48,7 @@ sudo apt-get install -y \
libxcb1-dev \
libxfixes-dev \
libxrandr-dev \
libxtst-dev \
wget
libxtst-dev

# clean apt cache
sudo apt-get clean
Expand All @@ -48,19 +63,17 @@ sudo update-alternatives --install \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10

# Install CUDA
sudo wget \
https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_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

# build
mkdir -p build
cd build || exit 1
cmake -G "Unix Makefiles" ..
cmake \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
-G "Unix Makefiles" \
..
make -j"$(nproc)"

# Delete CUDA
sudo rm -rf /usr/local/cuda

# skip autobuild
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"
50 changes: 43 additions & 7 deletions .github/workflows/CI.yml
Expand Up @@ -280,7 +280,7 @@ jobs:
include: # package these differently
- type: AppImage
EXTRA_ARGS: '-DSUNSHINE_BUILD_APPIMAGE=ON'
dist: 20.04
dist: 22.04

steps:
- name: Maximize build space
Expand Down Expand Up @@ -323,6 +323,10 @@ jobs:
# 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 \
Expand All @@ -338,17 +342,19 @@ jobs:
libcurl4-openssl-dev \
libdrm-dev \
libevdev-dev \
libfuse2 \
libminiupnpc-dev \
libmfx-dev \
libnotify-dev \
libnuma-dev \
libopus-dev \
libpulse-dev \
libssl-dev \
libva-dev \
libvdpau-dev \
libwayland-dev \
libx11-dev \
libx11-xcb-dev \
libxcb-dri3-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
libxcb1-dev \
Expand Down Expand Up @@ -376,12 +382,30 @@ jobs:
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.check_changelog.outputs.next_version }}
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
timeout-minutes: 5
timeout-minutes: 10
run: |
echo "nproc: $(nproc)"

Expand Down Expand Up @@ -452,7 +476,7 @@ jobs:
# permissions
chmod +x ../artifacts/sunshine.AppImage

- name: Delete cuda
- name: Delete CUDA
# free up space on the runner
run: |
sudo rm -rf /usr/local/cuda
Expand Down Expand Up @@ -502,8 +526,11 @@ jobs:
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 '.*tests/.*' \
--exclude '.*third-party/.*' \
--xml-pretty \
-o coverage.xml

Expand All @@ -520,6 +547,7 @@ jobs:
files: ./build/coverage.xml
flags: ${{ runner.os }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

- name: Create/Update GitHub Release
if: ${{ needs.setup_release.outputs.create_release == 'true' }}
Expand Down Expand Up @@ -626,7 +654,7 @@ jobs:
echo "publish=${PUBLISH}" >> $GITHUB_OUTPUT

- name: Validate and Publish Homebrew Formula
uses: LizardByte/homebrew-release-action@v2024.417.220943
uses: LizardByte/homebrew-release-action@v2024.516.191449
with:
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
git_email: ${{ secrets.GH_BOT_EMAIL }}
Expand Down Expand Up @@ -838,6 +866,9 @@ jobs:
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) \
Expand All @@ -858,6 +889,7 @@ jobs:
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.create_release == 'true' && matrix.release }}
Expand Down Expand Up @@ -1082,8 +1114,11 @@ jobs:
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 '.*tests/.*' \
--exclude '.*third-party/.*' \
--xml-pretty \
-o coverage.xml

Expand All @@ -1100,6 +1135,7 @@ jobs:
files: ./build/coverage.xml
flags: ${{ runner.os }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

- name: Package Windows Debug Info
working-directory: build
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/codeql.yml
Expand Up @@ -63,7 +63,9 @@ jobs:
if (key.toLowerCase() === 'swift') {
osList = ['macos-latest'];
} else if (key.toLowerCase() === 'cpp') {
osList = ['macos-latest', 'ubuntu-latest', 'windows-latest'];
// 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
Expand Down Expand Up @@ -120,10 +122,12 @@ jobs:

steps:
- name: Maximize build space
if: runner.os == 'Linux'
uses: easimon/maximize-build-space@v8
if: >-
runner.os == 'Linux' &&
matrix.language == 'cpp'
uses: easimon/maximize-build-space@v10
with:
root-reserve-mb: 20480
root-reserve-mb: 30720
remove-dotnet: ${{ (matrix.language == 'csharp' && 'false') || 'true' }}
remove-android: 'true'
remove-haskell: 'true'
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/update-changelog.yml
@@ -0,0 +1,31 @@
---
# This action is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

# 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.520.183314
with:
changelogBranch: changelog
changelogFile: CHANGELOG.md
token: ${{ secrets.GH_BOT_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -48,3 +48,6 @@ package-lock.json
# Translations
*.mo
*.pot

# Dummy macOS files
.DS_Store
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -29,7 +29,7 @@ System Requirements
"OS", "Windows: 10+ (Windows Server does not support virtual gamepads)"
"", "macOS: 12+"
"", "Linux/Debian: 11 (bullseye)"
"", "Linux/Fedora: 38+"
"", "Linux/Fedora: 39+"
"", "Linux/Ubuntu: 22.04+ (jammy)"
"Network", "Host: 5GHz, 802.11ac"
"", "Client: 5GHz, 802.11ac"
Expand Down
2 changes: 1 addition & 1 deletion cmake/compile_definitions/common.cmake
Expand Up @@ -55,7 +55,7 @@ set(SUNSHINE_TARGET_FILES
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Rtsp.h"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/RtspParser.c"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Video.h"
"${CMAKE_SOURCE_DIR}/third-party/tray/tray.h"
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray.h"
"${CMAKE_SOURCE_DIR}/src/upnp.cpp"
"${CMAKE_SOURCE_DIR}/src/upnp.h"
"${CMAKE_SOURCE_DIR}/src/cbs.cpp"
Expand Down
3 changes: 1 addition & 2 deletions cmake/compile_definitions/linux.cmake
Expand Up @@ -218,7 +218,7 @@ if(${SUNSHINE_ENABLE_TRAY})
include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS} ${LIBNOTIFY_INCLUDE_DIRS})
link_directories(${APPINDICATOR_LIBRARY_DIRS} ${LIBNOTIFY_LIBRARY_DIRS})

list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/tray/tray_linux.c")
list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_linux.c")
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APPINDICATOR_LIBRARIES} ${LIBNOTIFY_LIBRARIES})
endif()
else()
Expand Down Expand Up @@ -248,7 +248,6 @@ list(APPEND PLATFORM_TARGET_FILES
list(APPEND PLATFORM_LIBRARIES
Boost::dynamic_linking
dl
numa
pulse
pulse-simple)

Expand Down
21 changes: 15 additions & 6 deletions cmake/compile_definitions/macos.cmake
Expand Up @@ -2,18 +2,27 @@

add_compile_definitions(SUNSHINE_PLATFORM="macos")

link_directories(/opt/local/lib)
link_directories(/usr/local/lib)
link_directories(/opt/homebrew/lib)
set(MACOS_LINK_DIRECTORIES
/opt/homebrew/lib
/opt/local/lib
/usr/local/lib)

foreach(dir ${MACOS_LINK_DIRECTORIES})
if(EXISTS ${dir})
link_directories(${dir})
endif()
endforeach()

ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)

list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${APP_KIT_LIBRARY}
${APP_SERVICES_LIBRARY}
${AV_FOUNDATION_LIBRARY}
${CORE_MEDIA_LIBRARY}
${CORE_VIDEO_LIBRARY}
${VIDEO_TOOLBOX_LIBRARY}
${FOUNDATION_LIBRARY})
${FOUNDATION_LIBRARY}
${VIDEO_TOOLBOX_LIBRARY})

set(PLATFORM_INCLUDE_DIRS
${Boost_INCLUDE_DIR})
Expand Down Expand Up @@ -45,5 +54,5 @@ if(SUNSHINE_ENABLE_TRAY)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${COCOA})
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/third-party/tray/tray_darwin.m")
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_darwin.m")
endif()
2 changes: 1 addition & 1 deletion cmake/compile_definitions/windows.cmake
Expand Up @@ -79,5 +79,5 @@ list(PREPEND PLATFORM_LIBRARIES

if(SUNSHINE_ENABLE_TRAY)
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/third-party/tray/tray_windows.c")
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_windows.c")
endif()