Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# ensure dockerfiles are checked out with LF line endings
# ensure Linux specific files are checked out with LF line endings
Dockerfile text eol=lf
*.dockerfile text eol=lf

# ensure flatpak lint json files are checked out with LF line endings
*flatpak-lint-*.json text eol=lf
*.sh text eol=lf
17 changes: 17 additions & 0 deletions .github/matchers/copr-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "copr-ci-gcc",
"pattern": [
{
"regexp": "^/?(?:[^/]+/){5}([^:]+):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
17 changes: 17 additions & 0 deletions .github/matchers/docker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "docker-gcc",
"pattern": [
{
"regexp": "^(?:#\\d+\\s+\\d+\\.\\d+\\s+)?/?(?:[^/]+/){2}([^:]+):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
17 changes: 17 additions & 0 deletions .github/matchers/gcc-strip3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "gcc-strip3",
"pattern": [
{
"regexp": "^/?(?:[^/]+/){3}([^:]+):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
29 changes: 29 additions & 0 deletions .github/matchers/gcc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"problemMatcher": [
{
"owner": "gcc",
"pattern": [
{
"regexp": "^(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
},
{
"owner": "doxygen",
"pattern": [
{
"regexp": "^.*?([A-Za-z]:[\\\\/][^:]+|[\\\\/][^:]+):(\\d+): ([a-zA-Z]+): (.+)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
]
}
]
}
4 changes: 4 additions & 0 deletions .github/workflows/ci-copr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
required: false
COPR_CLI_CONFIG:
required: false
GH_BOT_TOKEN:
required: false
VIRUSTOTAL_API_KEY:
required: false

concurrency:
group: "_${{ github.workflow }}-${{ github.ref }}"
Expand Down
41 changes: 23 additions & 18 deletions .github/workflows/ci-flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,16 @@ jobs:
cmake \
flatpak

sudo su $(whoami) -c "flatpak --user remote-add --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo"
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 \
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.node${NODE_VERSION}/${{ matrix.arch }}/${PLATFORM_VERSION} \
"
"

flatpak run org.flatpak.Builder --version

Expand All @@ -101,9 +102,11 @@ jobs:
flatpak-${{ matrix.arch }}-

- name: Configure Flatpak Manifest
env:
BRANCH: ${{ github.head_ref }}
run: |
# variables for manifest
branch="${{ github.head_ref }}"
branch="${{ env.BRANCH }}"
build_version=${{ inputs.release_version }}
commit=${{ inputs.release_commit }}

Expand Down Expand Up @@ -137,35 +140,37 @@ jobs:

- name: Debug Manifest
working-directory: build
run: cat ${APP_ID}.yml
run: cat "${APP_ID}.yml"

- name: Build Linux Flatpak
working-directory: build
run: |
sudo su $(whoami) -c "flatpak run org.flatpak.Builder \
echo "::add-matcher::.github/matchers/gcc-strip3.json"
sudo su "$(whoami)" -c "flatpak run org.flatpak.Builder \
--arch=${{ matrix.arch }} \
--force-clean \
--repo=repo \
--sandbox \
--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 \
sudo su "$(whoami)" -c "flatpak run org.flatpak.Builder \
--arch=${{ matrix.arch }} \
--force-clean \
--repo=repo \
--sandbox \
build-sunshine ${APP_ID}.yml"
rm -rf .flatpak-builder
mv copy-of-flatpak-builder .flatpak-builder
sudo su $(whoami) -c "flatpak build-bundle \
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 \
sudo su "$(whoami)" -c "flatpak build-bundle \
--runtime \
--arch=${{ matrix.arch }} \
./repo \
../artifacts/sunshine_debug_${{ matrix.arch }}.flatpak ${APP_ID}.Debug"
echo "::remove-matcher owner=gcc-strip3::"

- name: Lint Flatpak
working-directory: build
Expand All @@ -177,7 +182,7 @@ jobs:
--exceptions \
--user-exceptions "${exceptions_file}" \
manifest \
${APP_ID}.yml
"${APP_ID}.yml"

echo "Linting flatpak repo"
# TODO: add arg
Expand All @@ -193,13 +198,13 @@ jobs:
if: matrix.arch == 'x86_64'
run: |
mkdir -p flathub/modules
cp ./build/generated-sources.json ./flathub/
cp ./build/package-lock.json ./flathub/
cp ./build/${APP_ID}.yml ./flathub/
cp ./build/${APP_ID}.metainfo.xml ./flathub/
cp ./packaging/linux/flatpak/README.md ./flathub/
cp ./packaging/linux/flatpak/flathub.json ./flathub/
cp -r ./packaging/linux/flatpak/modules/. ./flathub/modules/
cp "./build/generated-sources.json" "./flathub/"
cp "./build/package-lock.json" "./flathub/"
cp "./build/${APP_ID}.yml" "./flathub/"
cp "./build/${APP_ID}.metainfo.xml" "./flathub/"
cp "./packaging/linux/flatpak/README.md" "./flathub/"
cp "./packaging/linux/flatpak/flathub.json" "./flathub/"
cp -r "./packaging/linux/flatpak/modules/." "./flathub/modules/"
# submodules will need to be handled in the workflow that creates the PR

# create the archive
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/ci-homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,13 @@ jobs:
brew install python3

- name: Configure formula
env:
HEAD_REF: ${{ github.head_ref }}
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
PR_DEFAULT_BRANCH: ${{ github.event.pull_request.head.repo.default_branch }}
run: |
# variables for formula
branch="${{ github.head_ref }}"
branch="${{ env.HEAD_REF }}"
build_version=${{ inputs.release_version }}
commit=${{ inputs.release_commit }}

Expand All @@ -96,9 +100,9 @@ jobs:
else
echo "This is a PR event"
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 }}"
branch="${{ env.PR_HEAD_REF }}"
default_branch="${{ env.PR_DEFAULT_BRANCH }}"
tag="${{ env.PR_HEAD_REF }}"
fi
echo "Branch: ${branch}"
echo "Clone URL: ${clone_url}"
Expand Down Expand Up @@ -143,8 +147,9 @@ jobs:
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &

echo "DISPLAY=${DISPLAY}" >> $GITHUB_ENV
echo "DISPLAY=${DISPLAY}" >> "${GITHUB_ENV}"

- run: echo "::add-matcher::.github/matchers/gcc-strip3.json"
- name: Validate Homebrew Formula
id: test
if: matrix.release != true
Expand All @@ -156,6 +161,7 @@ jobs:
publish: false
token: ${{ secrets.GH_TOKEN }}
validate: true
- run: echo "::remove-matcher owner=gcc-strip3::"

- name: Setup python
id: python
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ jobs:
--enable-x11 \
--enable-glx \
--enable-wayland \
--without-legacy # emgd, nvctrl, fglrx
make -j $(nproc)
--without-legacy
make -j "$(nproc)"
sudo make install
cd .. && rm -rf libva-*

Expand All @@ -91,19 +91,21 @@ jobs:
COMMIT: ${{ inputs.release_commit }}
run: |
chmod +x ./scripts/linux_build.sh
echo "::add-matcher::.github/matchers/gcc.json"
./scripts/linux_build.sh \
--publisher-name='${{ github.repository_owner }}' \
--publisher-website='https://app.lizardbyte.dev' \
--publisher-issue-url='https://app.lizardbyte.dev/support' \
--skip-cleanup \
--skip-package \
--ubuntu-test-repo ${{ matrix.EXTRA_ARGS }}
echo "::remove-matcher owner=gcc::"

- name: Set AppImage Version
if: matrix.name == 'AppImage'
run: |
version=${{ inputs.release_version }}
echo "VERSION=${version}" >> $GITHUB_ENV
echo "VERSION=${version}" >> "${GITHUB_ENV}"

- name: Package Linux - AppImage
if: matrix.name == 'AppImage'
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ jobs:
ignore_list=$(IFS=,; echo "${ignore_packages[*]}")

# install pinned dependencies
if [ -n "$tarballs" ]; then
pacman -U --noconfirm ${tarballs}
if [ -n "${tarballs}" ]; then
pacman -U --noconfirm "${tarballs}"
fi

# Only add --ignore if we have packages to ignore
if [ -n "$ignore_list" ]; then
if [ -n "${ignore_list}" ]; then
pacman -Syu --noconfirm --ignore="${ignore_list}" "${dependencies[@]}"
else
pacman -Syu --noconfirm "${dependencies[@]}"
Expand Down Expand Up @@ -251,7 +251,7 @@ jobs:

# step output
echo "python-path=${python_path}"
echo "python-path=${python_path}" >> $GITHUB_OUTPUT
echo "python-path=${python_path}" >> "${GITHUB_OUTPUT}"

- name: Build Windows
shell: msys2 {0}
Expand All @@ -272,7 +272,9 @@ jobs:
-DSUNSHINE_PUBLISHER_NAME='${{ github.repository_owner }}' \
-DSUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev' \
-DSUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support'
echo "::add-matcher::.github/matchers/gcc.json"
ninja -C build
echo "::remove-matcher owner=gcc::"

- name: Package Windows
shell: msys2 {0}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/localize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
if [ -f "${{ env.file }}" ];
then
rm ${{ env.file }}
echo "new_file=false" >> $GITHUB_ENV
echo "new_file=false" >> "${GITHUB_ENV}"
else
echo "new_file=true" >> $GITHUB_ENV
echo "new_file=true" >> "${GITHUB_ENV}"
fi

# extract the new strings
Expand All @@ -67,7 +67,7 @@ jobs:

# 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
echo "git_diff=${OUTPUT}" >> "${GITHUB_ENV}"

- name: git reset
# only run if a single line changed (date/time) and file already existed
Expand All @@ -79,7 +79,7 @@ jobs:

- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
run: echo "date=$(date +'%Y-%m-%d')" >> "${GITHUB_OUTPUT}"

- name: Create/Update Pull Request
uses: peter-evans/create-pull-request@v7
Expand Down
8 changes: 4 additions & 4 deletions cmake/prep/build_version.cmake
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Set build variables if env variables are defined
# These are used in configured files such as manifests for different packages
if(DEFINED ENV{BRANCH}) # cmake-lint: disable=W0106
if(DEFINED ENV{BRANCH})
set(GITHUB_BRANCH $ENV{BRANCH})
endif()
if(DEFINED ENV{BUILD_VERSION}) # cmake-lint: disable=W0106
set(BUILD_VERSION $ENV{BUILD_VERSION})
endif()
if(DEFINED ENV{CLONE_URL}) # cmake-lint: disable=W0106
if(DEFINED ENV{CLONE_URL})
set(GITHUB_CLONE_URL $ENV{CLONE_URL})
endif()
if(DEFINED ENV{COMMIT}) # cmake-lint: disable=W0106
if(DEFINED ENV{COMMIT})
set(GITHUB_COMMIT $ENV{COMMIT})
endif()
if(DEFINED ENV{TAG}) # cmake-lint: disable=W0106
if(DEFINED ENV{TAG})
set(GITHUB_TAG $ENV{TAG})
endif()

Expand Down
2 changes: 1 addition & 1 deletion docker/archlinux.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ ENV CLONE_URL=${CLONE_URL}

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=SC2016
RUN <<_SETUP
#!/bin/bash
set -e
Expand All @@ -42,6 +41,7 @@ useradd -m builder
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers

# patch the build flags
# shellcheck disable=SC2016
sed -i 's,#MAKEFLAGS="-j2",MAKEFLAGS="-j$(nproc)",g' /etc/makepkg.conf

# install dependencies
Expand Down
Loading
Loading