-
Notifications
You must be signed in to change notification settings - Fork 76
176 lines (154 loc) · 7.66 KB
/
Copy pathappimage.yml
File metadata and controls
176 lines (154 loc) · 7.66 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: AppImage
on:
push:
tags: ['v*']
workflow_dispatch:
permissions:
contents: write
jobs:
build-appimage:
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-22.04
arch: x86_64
use_aqt: true
- runner: ubuntu-24.04-arm
arch: aarch64
use_aqt: false
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build pkg-config \
libgl1-mesa-dev libxkbcommon-dev libxkbcommon-x11-0 \
libxcb-cursor0 libxcb-icccm4 libxcb-keysyms1 libxcb-shape0 \
libxcb-render-util0 libxcb-xinerama0 libxcb-randr0 libxcb-xfixes0 \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-pulseaudio gstreamer1.0-gl \
libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 \
libfuse2 file desktop-file-utils imagemagick \
python3-pip autoconf automake libtool libasound2-dev \
libfftw3-dev libhidapi-dev portaudio19-dev
- name: Install system Qt (ARM only)
if: matrix.use_aqt == false
run: |
sudo apt-get install -y qt6-base-dev qt6-multimedia-dev \
qt6-websockets-dev qt6-serialport-dev qt6-base-private-dev \
qt6-shader-baker qt6-shadertools-dev \
libhidapi-dev portaudio19-dev libfftw3-dev
- name: Install Qt 6.8 LTS via aqtinstall (x86_64)
if: matrix.use_aqt == true
run: |
pip3 install aqtinstall
aqt install-qt linux desktop 6.8.3 linux_gcc_64 \
-m qtmultimedia qtwebsockets qtserialport qtshadertools \
--outputdir ${{ github.workspace }}/Qt
echo "Qt6_DIR=${{ github.workspace }}/Qt/6.8.3/gcc_64/lib/cmake/Qt6" >> $GITHUB_ENV
echo "CMAKE_PREFIX_PATH=${{ github.workspace }}/Qt/6.8.3/gcc_64" >> $GITHUB_ENV
echo "PATH=${{ github.workspace }}/Qt/6.8.3/gcc_64/bin:$PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${{ github.workspace }}/Qt/6.8.3/gcc_64/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Cache DeepFilterNet3
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
id: cache-deepfilter
with:
path: third_party/deepfilter
key: deepfilter-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/setup/setup-deepfilter.sh') }}
- name: Setup DeepFilterNet3 (DFNR)
if: steps.cache-deepfilter.outputs.cache-hit != 'true'
run: bash scripts/setup/setup-deepfilter.sh
- name: Setup qtkeychain (SmartLink credential persistence)
# Builds qtkeychain from source against the active Qt and stages it in
# third_party/qtkeychain so find_package(Qt6Keychain) succeeds. Without
# this the AppImage shipped without credential persistence (#3639). The
# pure Qt-D-Bus backend talks to KDE Wallet / GNOME Keyring at runtime.
run: bash scripts/setup/setup-qtkeychain.sh
- name: Configure
run: |
CMAKE_EXTRA=""
if [ "${{ matrix.use_aqt }}" = "true" ]; then
CMAKE_EXTRA="-DCMAKE_PREFIX_PATH=${{ github.workspace }}/Qt/6.8.3/gcc_64"
fi
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DREQUIRE_SERIALPORT=ON \
-DREQUIRE_KEYCHAIN=ON \
-DMQTT_TLS=OFF \
-DENABLE_NVIDIA_AFX=ON \
$CMAKE_EXTRA
- name: Build Opus (RADE dependency)
run: cmake --build build --target build_opus -j$(nproc)
- name: Build
run: cmake --build build -j$(nproc)
- name: Install to AppDir
run: |
DESTDIR=${{ github.workspace }}/AppDir cmake --install build
# Resize icon to 256x256 (source is 768x768)
convert AppDir/usr/share/icons/hicolor/256x256/apps/aethersdr.png \
-resize 256x256 AppDir/usr/share/icons/hicolor/256x256/apps/aethersdr.png
# Bundle DeepFilterNet3 model for DFNR
if [ -f third_party/deepfilter/models/DeepFilterNet3_onnx.tar.gz ]; then
cp third_party/deepfilter/models/DeepFilterNet3_onnx.tar.gz \
AppDir/usr/bin/
fi
# Bundle Qt6 multimedia backend plugin
if [ "${{ matrix.use_aqt }}" = "true" ]; then
QT_PLUGIN_PATH=${{ github.workspace }}/Qt/6.8.3/gcc_64/plugins
else
QT_PLUGIN_PATH=$(qmake6 -query QT_INSTALL_PLUGINS 2>/dev/null || echo "/usr/lib/$(uname -m)-linux-gnu/qt6/plugins")
fi
mkdir -p AppDir/usr/plugins/multimedia
cp -v "$QT_PLUGIN_PATH"/multimedia/* AppDir/usr/plugins/multimedia/ 2>/dev/null || true
# Bundle essential GStreamer plugins for audio
GST_PATH=$(pkg-config --variable=pluginsdir gstreamer-1.0 2>/dev/null || echo "/usr/lib/$(uname -m)-linux-gnu/gstreamer-1.0")
mkdir -p AppDir/usr/lib/gstreamer-1.0
for p in libgstpulseaudio.so libgstpipewiresrc.so libgstalsa.so libgstaudioconvert.so \
libgstaudioresample.so libgstautodetect.so libgstcoreelements.so libgsttypefindfunctions.so; do
cp -v "$GST_PATH/$p" AppDir/usr/lib/gstreamer-1.0/ 2>/dev/null || true
done
- name: Download linuxdeploy + Qt plugin
run: |
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${{ matrix.arch }}.AppImage
wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-${{ matrix.arch }}.AppImage
chmod +x linuxdeploy-${{ matrix.arch }}.AppImage linuxdeploy-plugin-qt-${{ matrix.arch }}.AppImage
- name: Build AppImage
env:
QT_SELECT: qt6
EXTRA_QT_PLUGINS: multimedia
run: |
# Sanitize the ref for the output filename: a workflow_dispatch on a
# branch like "ci/appimage-qtkeychain" puts a '/' in github.ref_name,
# which breaks mksquashfs ("Could not create destination file"). Tag
# pushes (v26.6.x) are already slash-free; this mirrors the
# sanitization windows-installer.yml already applies.
SAFE_REF="${GITHUB_REF_NAME//[^A-Za-z0-9._-]/_}"
export LDAI_OUTPUT="AetherSDR-${SAFE_REF}-${{ matrix.arch }}.AppImage"
if [ "${{ matrix.use_aqt }}" = "true" ]; then
export QMAKE=${{ github.workspace }}/Qt/6.8.3/gcc_64/bin/qmake
else
export QMAKE=$(which qmake6 2>/dev/null || which qmake)
fi
# Let linuxdeploy resolve + bundle libqt6keychain.so (NEEDED by the
# binary, staged outside the standard search path). Qt6 DBus, which
# the keychain backend needs at runtime, is pulled in transitively.
export LD_LIBRARY_PATH="${{ github.workspace }}/third_party/qtkeychain/lib:${LD_LIBRARY_PATH:-}"
./linuxdeploy-${{ matrix.arch }}.AppImage \
--appdir AppDir \
--plugin qt \
--desktop-file AppDir/usr/share/applications/AetherSDR.desktop \
--icon-file AppDir/usr/share/icons/hicolor/256x256/apps/aethersdr.png \
--output appimage
- name: Upload artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: AppImage-${{ matrix.arch }}
path: AetherSDR-*.AppImage
- name: Attach to release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b
with:
files: AetherSDR-*.AppImage