feat: testing out CI building for new packages
This commit is contained in:
54
.github/workflows/CI.yml
vendored
54
.github/workflows/CI.yml
vendored
@@ -147,43 +147,29 @@ jobs:
|
|||||||
name: Linux
|
name: Linux
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: check_changelog
|
needs: check_changelog
|
||||||
strategy:
|
|
||||||
fail-fast: true # false to test all, true to fail entire job if any fail
|
|
||||||
matrix:
|
|
||||||
distro: [ debian, ubuntu_18_04, ubuntu_20_04, ubuntu_21_10 ]
|
|
||||||
package: [ -p ]
|
|
||||||
extension: [ deb ]
|
|
||||||
include: # package these differently
|
|
||||||
- distro: fedora_35
|
|
||||||
package: '-p'
|
|
||||||
extension: rpm
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup Container
|
- name: Build DEB and RPM
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p build
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
|
cd build
|
||||||
|
|
||||||
cd scripts
|
cmake -DCMAKE_BUILD_TYPE=Release -DSUNSHINE_CONFIG_DIR="." ../
|
||||||
sudo ./build-container.sh -c build -f Dockerfile-${{ matrix.distro }} -n sunshine-${{ matrix.distro }}
|
cpack -G DEB
|
||||||
- name: Build Linux
|
cpack -G RPM
|
||||||
run: |
|
|
||||||
cd scripts
|
cp Sunshine__.rpm ../artifacts/
|
||||||
sudo ./build-sunshine.sh ${{ matrix.package }} -e ${{ matrix.extension }} -u -n sunshine-${{ matrix.distro }} -s ..
|
cp Sunshine__.deb ../artifacts/
|
||||||
- name: Package Linux
|
|
||||||
if: ${{ matrix.package != '' }}
|
|
||||||
run: |
|
|
||||||
cd scripts
|
|
||||||
sudo mv ./sunshine-${{ matrix.distro }}-build/sunshine-${{ matrix.distro }}.${{ matrix.extension }} ../artifacts/
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
if: ${{ matrix.package == '-p' && ( github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ) }}
|
if: ${{ matrix.package == '-p' && ( github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ) }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: sunshine-${{ matrix.distro }}
|
name: sunshine-linux
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
if: ${{ matrix.package == '-p' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
if: ${{ matrix.package == '-p' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||||
@@ -218,6 +204,7 @@ jobs:
|
|||||||
mingw-w64-x86_64-opus
|
mingw-w64-x86_64-opus
|
||||||
mingw-w64-x86_64-x265
|
mingw-w64-x86_64-x265
|
||||||
mingw-w64-x86_64-boost
|
mingw-w64-x86_64-boost
|
||||||
|
mingw-w64-x86_64-nsis
|
||||||
git
|
git
|
||||||
yasm
|
yasm
|
||||||
nasm
|
nasm
|
||||||
@@ -226,23 +213,14 @@ jobs:
|
|||||||
- name: Build Windows
|
- name: Build Windows
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
|
mkdir artifacts
|
||||||
|
|
||||||
mkdir sunshine-windows-build && cd sunshine-windows-build
|
mkdir sunshine-windows-build && cd sunshine-windows-build
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DSUNSHINE_ASSETS_DIR=assets -G "MinGW Makefiles" ..
|
cmake -DCMAKE_BUILD_TYPE=Release -DSUNSHINE_ASSETS_DIR=assets -G "MinGW Makefiles" ..
|
||||||
mingw32-make -j2
|
mingw32-make -j2
|
||||||
- name: Package Windows
|
cpack
|
||||||
run: |
|
|
||||||
cd sunshine-windows-build
|
cp Sunshine__.exe ../artifacts
|
||||||
del ..\assets\apps_linux.json
|
|
||||||
7z a sunshine-windows.zip ..\assets
|
|
||||||
7z a sunshine-windows.zip sunshine.exe
|
|
||||||
7z a sunshine-windows.zip tools\dxgi-info.exe
|
|
||||||
7z a sunshine-windows.zip tools\audio-info.exe
|
|
||||||
7z a sunshine-windows.zip tools\sunshinesvc.exe
|
|
||||||
7z a sunshine-windows.zip ..\tools\install-service.bat
|
|
||||||
7z a sunshine-windows.zip ..\tools\uninstall-service.bat
|
|
||||||
cd ..
|
|
||||||
mkdir artifacts
|
|
||||||
move "sunshine-windows-build\sunshine-windows.zip" "artifacts"
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
|
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user