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
82 changes: 39 additions & 43 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
---
name: CI
permissions:
contents: read

on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
branches:
- master
types:
- opened
- synchronize
- reopened
push:
branches: [master]
branches:
- master
workflow_dispatch:

concurrency:
Expand All @@ -17,7 +24,6 @@ jobs:
github_env:
name: GitHub Env Debug
runs-on: ubuntu-latest

steps:
- name: Dump github context
run: echo "$GITHUB_CONTEXT"
Expand Down Expand Up @@ -46,12 +52,12 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}

build_linux_flatpak:
name: Linux Flatpak
env:
APP_ID: dev.lizardbyte.app.Sunshine
NODE_VERSION: "20"
PLATFORM_VERSION: "23.08"
name: Linux Flatpak
needs: [setup_release]
needs: setup_release
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false # false to test all, true to fail entire job if any fail
Expand All @@ -61,7 +67,6 @@ jobs:
runner: ubuntu-22.04
- arch: aarch64
runner: ubuntu-22.04-arm

steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v10
Expand All @@ -85,12 +90,10 @@ jobs:
node-version: ${{ env.NODE_VERSION }}

- name: Install npm dependencies
run: |
npm install --package-lock-only
run: npm install --package-lock-only

- name: Debug package-lock.json
run: |
cat package-lock.json
run: cat package-lock.json

- name: Setup python
id: python
Expand Down Expand Up @@ -121,12 +124,10 @@ jobs:

- name: flatpak node generator
# https://github.com/flatpak/flatpak-builder-tools/blob/master/node/README.md
run: |
flatpak-node-generator npm package-lock.json
run: flatpak-node-generator npm package-lock.json

- name: Debug generated-sources.json
run: |
cat generated-sources.json
run: cat generated-sources.json

- name: Cache Flatpak build
uses: actions/cache@v4
Expand Down Expand Up @@ -171,8 +172,7 @@ jobs:

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

- name: Build Linux Flatpak
working-directory: build
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:

- name: Package Flathub repo archive
# copy files required to generate the Flathub repo
if: ${{ matrix.arch == 'x86_64' }}
if: matrix.arch == 'x86_64'
run: |
mkdir -p flathub/modules
cp ./build/generated-sources.json ./flathub/
Expand All @@ -245,9 +245,10 @@ jobs:
with:
name: sunshine-linux-flatpak-${{ matrix.arch }}
path: artifacts/
if-no-files-found: error

- name: Create/Update GitHub Release
if: ${{ needs.setup_release.outputs.publish_release == 'true' }}
if: needs.setup_release.outputs.publish_release == 'true'
uses: LizardByte/create-release-action@v2025.102.13208
with:
allowUpdates: true
Expand All @@ -261,15 +262,14 @@ jobs:
build_linux:
name: Linux ${{ matrix.type }}
runs-on: ubuntu-${{ matrix.dist }}
needs: [setup_release]
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: '--appimage-build'
dist: 22.04

steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v10
Expand Down Expand Up @@ -344,14 +344,13 @@ jobs:
--ubuntu-test-repo ${{ matrix.EXTRA_ARGS }}

- name: Set AppImage Version
if: |
matrix.type == 'AppImage'
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' }}
if: matrix.type == 'AppImage'
working-directory: build
run: |
# install sunshine to the DESTDIR
Expand Down Expand Up @@ -396,7 +395,7 @@ jobs:
rm -rf ./build/cuda

- name: Verify AppImage
if: ${{ matrix.type == '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
Expand All @@ -408,6 +407,7 @@ jobs:
with:
name: sunshine-linux-${{ matrix.type }}-${{ matrix.dist }}
path: artifacts/
if-no-files-found: error

- name: Install test deps
run: |
Expand All @@ -431,9 +431,9 @@ jobs:
./test_sunshine --gtest_color=yes

- name: Generate gcov report
id: test_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
Expand Down Expand Up @@ -461,7 +461,7 @@ jobs:
verbose: true

- name: Create/Update GitHub Release
if: ${{ needs.setup_release.outputs.publish_release == 'true' }}
if: needs.setup_release.outputs.publish_release == 'true'
uses: LizardByte/create-release-action@v2025.102.13208
with:
allowUpdates: true
Expand All @@ -473,7 +473,8 @@ jobs:
token: ${{ secrets.GH_BOT_TOKEN }}

build_homebrew:
needs: [setup_release]
name: Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }})
needs: setup_release
strategy:
fail-fast: false # false to test all, true to fail entire job if any fail
matrix:
Expand All @@ -489,9 +490,7 @@ jobs:
- 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
Expand Down Expand Up @@ -579,16 +578,15 @@ jobs:
cat ./homebrew/sunshine.rb

- name: Upload Artifacts
if: ${{ matrix.release }}
if: matrix.release
uses: actions/upload-artifact@v4
with:
name: sunshine-homebrew
path: homebrew/
if-no-files-found: error

- name: Setup Xvfb
if: |
matrix.release != true &&
runner.os == 'Linux'
if: matrix.release != true && runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -y \
Expand All @@ -601,8 +599,7 @@ jobs:

- name: Validate Homebrew Formula
id: test
if: |
matrix.release != true
if: matrix.release != true
uses: LizardByte/homebrew-release-action@v2024.1115.14934
with:
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
Expand All @@ -613,6 +610,7 @@ jobs:
validate: true

- name: Generate gcov report
id: test_report
# any except canceled or skipped
# TODO: fix coverage, no .gcno files are being created
# TODO: .gcno files are supposed to be created next to .o files
Expand All @@ -621,7 +619,6 @@ jobs:
# always() &&
# matrix.release != true &&
# (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
id: test_report
run: |
# if linux
if [ "${{ runner.os }}" == "Linux" ]; then
Expand Down Expand Up @@ -680,8 +677,7 @@ jobs:
- name: Patch homebrew formula
# create beta version of the formula
# don't run this on macOS, as the sed command fails
if: >-
matrix.release
if: matrix.release
run: |
# variables
formula_file="homebrew/sunshine-beta.rb"
Expand Down Expand Up @@ -713,9 +709,8 @@ jobs:

build_win:
name: Windows
needs: setup_release
runs-on: windows-2019
needs: [setup_release]

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -931,9 +926,9 @@ jobs:
./test_sunshine.exe --gtest_color=yes

- name: Generate gcov report
id: test_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: |
Expand Down Expand Up @@ -979,9 +974,10 @@ jobs:
with:
name: sunshine-windows
path: artifacts/
if-no-files-found: error

- name: Create/Update GitHub Release
if: ${{ needs.setup_release.outputs.publish_release == 'true' }}
if: needs.setup_release.outputs.publish_release == 'true'
uses: LizardByte/create-release-action@v2025.102.13208
with:
allowUpdates: true
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-copr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
name: CI Copr
permissions:
contents: read

on:
pull_request:
Expand Down
Loading
Loading