73
73
74
74
steps :
75
75
- name : Checkout
76
- uses : actions/checkout@v2
76
+ uses : actions/checkout@v3
77
77
78
78
- name : Setup Dependencies Linux AUR
79
79
run : |
@@ -106,7 +106,6 @@ jobs:
106
106
107
107
echo "aur_publish=true" >> $GITHUB_ENV
108
108
elif [[ ${{ github.ref == 'refs/heads/nightly' }} ]]; then
109
- aur_pkg=sunshine-git
110
109
sub_version=".r${commit}"
111
110
112
111
echo "aur_publish=true" >> $GITHUB_ENV
@@ -158,7 +157,7 @@ jobs:
158
157
159
158
- name : Publish AUR package
160
159
if : ${{ env.aur_publish == 'true' }}
161
- uses : KSXGitHub/github-actions-deploy-aur@v2.4.1
160
+ uses : KSXGitHub/github-actions-deploy-aur@v2.5.0
162
161
with :
163
162
pkgname : ${{ env.aur_pkg }}
164
163
pkgbuild : ./artifacts/PKGBUILD
@@ -172,8 +171,15 @@ jobs:
172
171
173
172
build_linux_flatpak :
174
173
name : Linux Flatpak
175
- runs-on : ubuntu-latest
174
+ runs-on : ubuntu-22.04
176
175
needs : check_changelog
176
+ strategy :
177
+ fail-fast : false # false to test all, true to fail entire job if any fail
178
+ matrix :
179
+ arch : ['x86_64', 'aarch64']
180
+ exclude :
181
+ # exclude `aarch64` on anything except a release triggering event
182
+ - arch : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) && '' || 'aarch64' }}
177
183
178
184
steps :
179
185
- name : Checkout
@@ -184,11 +190,22 @@ jobs:
184
190
sudo apt-get update -y
185
191
sudo apt-get install -y \
186
192
cmake \
193
+ qemu-user-static \
187
194
flatpak
188
- sudo su $(whoami) -c 'flatpak remote-add -- user --if-not-exists flathub \
195
+ sudo su $(whoami) -c 'flatpak -- user remote-add --if-not-exists flathub \
189
196
https://flathub.org/repo/flathub.flatpakrepo'
190
- sudo su $(whoami) -c 'flatpak install --user flathub \
191
- org.flatpak.Builder org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08 -y'
197
+ sudo su $(whoami) -c 'flatpak --user install -y flathub \
198
+ org.flatpak.Builder \
199
+ org.freedesktop.Platform/${{ matrix.arch }}/21.08 \
200
+ org.freedesktop.Sdk/${{ matrix.arch }}/21.08'
201
+
202
+ - name : Cache Flatpak build
203
+ uses : actions/cache@v3
204
+ with :
205
+ path : ./build/.flatpak-builder
206
+ key : flatpak-${{ matrix.arch }}-${{ github.sha }}
207
+ restore-keys : |
208
+ flatpak-${{ matrix.arch }}-
192
209
193
210
- name : Configure Flatpak Manifest
194
211
run : |
@@ -218,21 +235,29 @@ jobs:
218
235
cmake -DGITHUB_CLONE_URL=${clone_url} \
219
236
-DGITHUB_BRANCH=${branch} \
220
237
-DGITHUB_COMMIT=${commit} \
221
- -DSUNSHINE_CONFIGURE_FLATPAK =ON \
238
+ -DSUNSHINE_CONFIGURE_FLATPAK_MAN =ON \
222
239
-DSUNSHINE_CONFIGURE_ONLY=ON \
223
240
..
224
241
225
242
- name : Build Linux Flatpak
226
243
working-directory : build
227
244
run : |
228
- sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --repo=repo --force-clean build-sunshine \
229
- dev.lizardbyte.sunshine.yml'
230
- sudo su $(whoami) -c 'flatpak build-bundle ./repo ../artifacts/sunshine.flatpak dev.lizardbyte.sunshine'
245
+ sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --arch=${{ matrix.arch }} --repo=repo --force-clean \
246
+ --stop-at=cuda build-sunshine dev.lizardbyte.sunshine.yml'
247
+ cp -r .flatpak-builder copy-of-flatpak-builder
248
+ sudo su $(whoami) -c 'flatpak run org.flatpak.Builder --arch=${{ matrix.arch }} --repo=repo --force-clean \
249
+ build-sunshine dev.lizardbyte.sunshine.yml'
250
+ rm -rf .flatpak-builder
251
+ mv copy-of-flatpak-builder .flatpak-builder
252
+ sudo su $(whoami) -c 'flatpak build-bundle --arch=${{ matrix.arch }} ./repo \
253
+ ../artifacts/sunshine_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine'
254
+ sudo su $(whoami) -c 'flatpak build-bundle --runtime --arch=${{ matrix.arch }} ./repo \
255
+ ../artifacts/sunshine_debug_${{ matrix.arch }}.flatpak dev.lizardbyte.sunshine.Debug'
231
256
232
257
- name : Upload Artifacts
233
258
uses : actions/upload-artifact@v3
234
259
with :
235
- name : sunshine-linux-flatpak
260
+ name : sunshine-linux-flatpak-${{ matrix.arch }}
236
261
path : artifacts/
237
262
238
263
- name : Create Release
@@ -253,14 +278,8 @@ jobs:
253
278
matrix :
254
279
include : # package these differently
255
280
- type : cpack
256
- CMAKE_INSTALL_PREFIX : ' /usr'
257
- SUNSHINE_ASSETS_DIR : ' local/sunshine/assets'
258
- SUNSHINE_CONFIG_DIR : ' local/sunshine/config'
259
281
EXTRA_ARGS : ' '
260
282
- type : appimage
261
- CMAKE_INSTALL_PREFIX : ' /usr'
262
- SUNSHINE_ASSETS_DIR : ' sunshine.AppImage.config'
263
- SUNSHINE_CONFIG_DIR : ' sunshine.AppImage.home'
264
283
EXTRA_ARGS : ' -DSUNSHINE_CONFIGURE_APPIMAGE=ON'
265
284
266
285
steps :
@@ -280,7 +299,6 @@ jobs:
280
299
build-essential \
281
300
cmake \
282
301
gcc-10 \
283
- git \
284
302
g++-10 \
285
303
libavdevice-dev \
286
304
libboost-filesystem-dev \
@@ -343,9 +361,8 @@ jobs:
343
361
344
362
cd build
345
363
cmake -DCMAKE_BUILD_TYPE=Release \
346
- -DCMAKE_INSTALL_PREFIX=${{ matrix.CMAKE_INSTALL_PREFIX }} \
347
- -DSUNSHINE_ASSETS_DIR=${{ matrix.SUNSHINE_ASSETS_DIR }} \
348
- -DSUNSHINE_CONFIG_DIR=${{ matrix.SUNSHINE_CONFIG_DIR }} \
364
+ -DCMAKE_INSTALL_PREFIX=/usr \
365
+ -DSUNSHINE_ASSETS_DIR=share/sunshine \
349
366
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
350
367
-DSUNSHINE_ENABLE_WAYLAND=ON \
351
368
-DSUNSHINE_ENABLE_X11=ON \
@@ -380,12 +397,9 @@ jobs:
380
397
# install sunshine to the DESTDIR
381
398
make install DESTDIR=AppDir
382
399
383
- # portable home and config
384
- # todo - this is ugly... we should use a custom AppRun script to take care of this
385
- mv ./AppDir${{ matrix.CMAKE_INSTALL_PREFIX }}/sunshine.AppImage.* ../artifacts/
386
- mkdir -p ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/.config/sunshine/${{ matrix.SUNSHINE_CONFIG_DIR }}
387
- cp ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/apps.json \
388
- ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/.config/sunshine/${{ matrix.SUNSHINE_CONFIG_DIR }}/
400
+ # custom AppRun file
401
+ cp -f ../packaging/linux/AppImage/AppRun ./AppDir/
402
+ chmod +x ./AppDir/AppRun
389
403
390
404
# variables
391
405
DESKTOP_FILE="${DESKTOP_FILE:-sunshine.desktop}"
@@ -396,12 +410,6 @@ jobs:
396
410
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
397
411
chmod +x linuxdeploy-x86_64.AppImage
398
412
399
- # # https://github.com/linuxdeploy/linuxdeploy-plugin-gtk
400
- # sudo apt-get install libgtk-3-dev librsvg2-dev -y
401
- # wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
402
- # chmod +x linuxdeploy-plugin-gtk.sh
403
- # export DEPLOY_GTK_VERSION=3
404
-
405
413
./linuxdeploy-x86_64.AppImage \
406
414
--appdir ./AppDir \
407
415
--executable ./sunshine \
@@ -411,8 +419,6 @@ jobs:
411
419
--library /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 \
412
420
--library /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 \
413
421
--output appimage
414
- # # add this argument back if using gtk plugin
415
- # --plugin gtk \
416
422
417
423
# move
418
424
mv Sunshine*.AppImage ../artifacts/sunshine.AppImage
@@ -430,14 +436,6 @@ jobs:
430
436
431
437
./appimagelint-x86_64.AppImage ./artifacts/sunshine.AppImage
432
438
433
- - name : Archive AppImage
434
- if : ${{ matrix.type == 'appimage' }}
435
- working-directory : artifacts
436
- run : |
437
- chmod +x ./sunshine.AppImage
438
-
439
- zip --recurse-paths --move --test ./sunshine-appimage.zip ./*
440
-
441
439
- name : Upload Artifacts
442
440
uses : actions/upload-artifact@v3
443
441
with :
@@ -479,7 +477,7 @@ jobs:
479
477
cmake -DCMAKE_BUILD_TYPE=Release \
480
478
-DCMAKE_INSTALL_PREFIX=/usr \
481
479
-DSUNSHINE_ASSETS_DIR=local/sunshine/assets \
482
- -DSUNSHINE_CONFIG_DIR=local/sunshine/config \
480
+ -DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
483
481
..
484
482
make -j ${nproc}
485
483
@@ -619,7 +617,7 @@ jobs:
619
617
echo "$subport"
620
618
subportlist="$subportlist $subport"
621
619
done
622
- echo "::set-output name= subportlist:: ${subportlist}"
620
+ echo "subportlist= ${subportlist}" >> $GITHUB_OUTPUT
623
621
624
622
- name : Run port lint for all subports
625
623
run : |
@@ -770,7 +768,6 @@ jobs:
770
768
cd build
771
769
cmake -DCMAKE_BUILD_TYPE=Release \
772
770
-DSUNSHINE_ASSETS_DIR=assets \
773
- -DSUNSHINE_CONFIG_DIR=config \
774
771
-G "MinGW Makefiles" \
775
772
..
776
773
mingw32-make -j2
0 commit comments