sunshine-sdk/.github/workflows/CI.yml
pigeatgarlic d1cea1266a update CI
2025-01-11 13:11:40 +00:00

110 lines
2.8 KiB
YAML

---
name: CI
on:
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) }}
build_win:
name: Windows
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Dependencies Windows
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: >-
wget
- name: Update Windows dependencies
shell: msys2 {0}
run: |
# download working curl
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-curl-8.8.0-1-any.pkg.tar.zst
# install dependencies
pacman -U --noconfirm mingw-w64-x86_64-curl-8.8.0-1-any.pkg.tar.zst
pacman -Syu --noconfirm \
--ignore=mingw-w64-x86_64-curl \
git \
mingw-w64-x86_64-boost \
mingw-w64-x86_64-cmake \
mingw-w64-x86_64-cppwinrt \
mingw-w64-x86_64-graphviz \
mingw-w64-x86_64-miniupnpc \
mingw-w64-x86_64-nlohmann-json \
mingw-w64-x86_64-nodejs \
mingw-w64-x86_64-nsis \
mingw-w64-x86_64-onevpl \
mingw-w64-x86_64-openssl \
mingw-w64-x86_64-opus \
mingw-w64-x86_64-toolchain
- name: Build Windows
shell: msys2 {0}
run: |
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-G "Ninja" \
..
ninja
- name: Package Windows
shell: msys2 {0}
run: |
mkdir -p artifacts
cd build
# move
mv ./sunshine.exe ../artifacts/shmsunshine.exe
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: sunshine-windows
path: artifacts/
# release-winget:
# name: Release to WinGet
# needs: [setup_release, build_win]
# if: |
# (github.repository_owner == 'LizardByte' &&
# needs.setup_release.outputs.create_release == 'true' &&
# github.ref == 'refs/heads/master')
# runs-on: ubuntu-latest
# steps:
# - name: Release to WinGet
# uses: vedantmgoyal2009/winget-releaser@v2
# with:
# identifier: LizardByte.Sunshine
# release-tag: ${{ needs.setup_release.outputs.release_tag }}
# installers-regex: '\.exe$' # only .exe files
# token: ${{ secrets.GH_BOT_TOKEN }}