forked from AlbrechtL/welle.io
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (106 loc) · 4.27 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Linux build
on:
push:
branches:
- master
- next
- 'next*'
jobs:
qtbuild:
name: Build with Qt
runs-on: ubuntu-22.04
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.8.0'
modules: 'qtcharts qtmultimedia qt5compat qtshadertools'
- name: Checkout
uses: actions/checkout@v4
- run: git fetch --prune --unshallow --tags
- name: Set environment variables
run: |
echo "DATE=`date +%Y%m%d`" >> $GITHUB_ENV
echo "GIT_HASH=`git rev-parse --short HEAD`" >> $GITHUB_ENV
#echo "QTDIR=$QT_ROOT_DIR" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Display environment variables
run: env | sort
- name: Install build dependencies
run: |
set -x
# Install build dependencies
sudo apt-get -y install build-essential libfaad-dev libmpg123-dev libfftw3-dev \
librtlsdr-dev libusb-1.0-0-dev mesa-common-dev libglu1-mesa-dev libpulse-dev \
libsoapysdr-dev libairspy-dev libmp3lame-dev libflac++-dev libegl-dev
# Install sharun dependencies
sudo apt install file binutils patchelf findutils grep sed coreutils strace
# Install virtual graphic display to run welle.io without an display
sudo apt install xvfb
- name: Build
id: build
run: |
mkdir build
cd build
qmake PREFIX=/usr ..
make -j4
cd ..
echo $PWD
- name: Prepare welle-io AppImage
id: prepare_app_image
run: |
find build/
mkdir -p ./appdir/usr/share/applications
cp welle-io.desktop ./appdir/usr/share/applications
cp welle-io.desktop ./appdir
mkdir -p ./appdir/usr/bin
cp build/src/welle-gui/welle-io ./appdir/usr/bin
mkdir -p ./appdir/usr/lib
mkdir -p ./appdir/usr/share/icons/hicolor/256x256/apps/
cp src/welle-gui/icons/icon.png ./appdir/usr/share/icons/hicolor/256x256/apps/welle-io.png
cp src/welle-gui/icons/icon.png ./appdir/welle-io.png
find appdir/
- name: Create AppImage
id: create_appimage
run: |
ARCH="$(uname -m)"
UPINFO="gh-releases-zsync|$(echo "$GITHUB_REPOSITORY" | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
# Get appimagetool
wget -c "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$ARCH.AppImage" -O ./appimagetool
#wget https://welle-io-nightlies.albrechtloh.de/appimagetool-843-x86_64.AppImage # just for testing
chmod +x appimagetool
mv ./appdir/usr ./appdir/shared
ln -s ./shared ./appdir/usr
( cd ./appdir
# Get lib4bin (sharun)
wget https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin -O ./lib4bin
chmod +x ./lib4bin
# Dummy run welle in a virtual display to collect graphic libraries with sharun
xvfb-run -- ./lib4bin -p -v -r -s -e -k ./shared/bin/welle-io
ln ./sharun ./AppRun
./sharun -g
)
find appdir/
# Create AppImage
./appimagetool --comp zstd \
--mksquashfs-opt -Xcompression-level --mksquashfs-opt 22 \
-n -u "$UPINFO" "$PWD"/appdir "$PWD"/"$DATE"_"$GIT_HASH"_Linux_welle-io-x86_64.AppImage
# Preapre publish
mkdir publish
mv *.AppImage* publish/
- name: Archive artifacts (welle.io AppImage)
if: always() && steps.create_appimage.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: welle.io AppImage
path: publish/*welle-io-x86_64.AppImage*
if-no-files-found: error
- name: Upload to nightly server
if: always() && steps.create_appimage.outcome == 'success'
uses: dennisameling/ftp-upload-action@v1
with:
server: a2f24.netcup.net # welle-io-nightlies.albrechtloh.de is redirected to here
secure: true
username: ${{ secrets.SFTP_USER }}
password: ${{ secrets.SFTP_PASSWORD }}
local_dir: publish/