Skip to content

Commit a15751e

Browse files
committed
appimage: add test build
Signed-off-by: Patrizio Bekerle <[email protected]>
1 parent 35c5dcb commit a15751e

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: 📣 Build AppImage
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches-ignore:
7+
- release
8+
tags-ignore:
9+
- "*"
10+
11+
defaults:
12+
run:
13+
working-directory: src
14+
15+
#--------------------------------------------------------------------------------
16+
# Define application name & version
17+
#--------------------------------------------------------------------------------
18+
19+
env:
20+
EXECUTABLE: "QOwnNotes"
21+
APPLICATION: "QOwnNotes"
22+
UNIXNAME: "QOwnNotes"
23+
QMAKE_PROJECT: "QOwnNotes.pro"
24+
PUBLISHER: "Patrizio Bekerle"
25+
REPO_DIR: "/home/runner/work/QOwnNotes"
26+
QT_MODULES: ""
27+
QT6_MODULES: "qtwebsockets"
28+
QMAKE: qmake
29+
CORES: 16
30+
31+
jobs:
32+
#--------------------------------------------------------------------------------
33+
# Workflow jobs (GNU/Linux, macOS & Windows)
34+
#--------------------------------------------------------------------------------
35+
36+
#
37+
# AppImage build
38+
#
39+
build-appimage:
40+
runs-on: ubuntu-22.04
41+
env:
42+
QT_VERSION: 5.15.2
43+
BUILD_DIR: build
44+
name: "🐧 AppImage Qt 5.15.2"
45+
steps:
46+
- name: "🧰 Checkout"
47+
uses: actions/checkout@v4
48+
with:
49+
submodules: recursive
50+
51+
- name: "⚙️ Install Qt"
52+
uses: jurplel/install-qt-action@v4
53+
with:
54+
version: ${{env.QT_VERSION}}
55+
modules: ${{env.QT_MODULES}}
56+
aqtversion: "==2.0.0"
57+
setup-python: false
58+
cache: true
59+
60+
- name: "⚙️ Install dependencies"
61+
run: |
62+
sudo apt-get update
63+
sudo apt install desktop-file-utils libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-composite0 libxcb-cursor0 libxcb-damage0 libxcb-dpms0 libxcb-dri2-0 libxcb-dri3-0 libxcb-ewmh2 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-record0 libxcb-render0 libxcb-res0 libxcb-screensaver0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-util1 libxkbcommon-x11-0
64+
- name: "🚧 Compile application"
65+
run: |
66+
echo "#define RELEASE \"AppImage\"" > release.h
67+
${{env.QMAKE}} ${{env.QMAKE_PROJECT}} CONFIG+=release PREFIX=/usr
68+
lrelease QOwnNotes.pro
69+
make -j${{env.CORES}}
70+
- name: "⚙️ Install linuxdeploy"
71+
run: |
72+
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
73+
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
74+
chmod +x linuxdeploy-x86_64.AppImage
75+
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
76+
- name: "📦 Create AppImage"
77+
run: |
78+
export QMAKE=${{env.REPO_DIR}}/Qt/${{env.QT_VERSION}}/gcc_64/bin/${{env.QMAKE}}
79+
export PATH=${{env.REPO_DIR}}/Qt/${{env.QT_VERSION}}/gcc_64/libexec:$PATH
80+
export EXTRA_QT_PLUGINS="svg;"
81+
cp ../icons/icon.png QOwnNotes.png
82+
./linuxdeploy-x86_64.AppImage --appdir ${{env.BUILD_DIR}} -e ${{env.UNIXNAME}} -i ${{env.UNIXNAME}}.png -d PBE.QOwnNotes.desktop --plugin qt
83+
mkdir -p ${{env.BUILD_DIR}}/usr/languages && cp -r languages/*.qm ${{env.BUILD_DIR}}/usr/languages
84+
find ${{env.BUILD_DIR}}
85+
./linuxdeploy-x86_64.AppImage --appdir ${{env.BUILD_DIR}} --output appimage
86+
rm linuxdeploy-x86_64.AppImage
87+
rm linuxdeploy-plugin-qt-x86_64.AppImage
88+
ls -hal *.AppImage
89+
find -iname "*.AppImage"
90+
mv *.AppImage ${{env.EXECUTABLE}}-x86_64.AppImage || true
91+
sha256sum ${{env.EXECUTABLE}}-x86_64.AppImage > ${{env.EXECUTABLE}}-x86_64.AppImage.sha256sum
92+
ls -hal *.AppImage
93+
find -iname "*.AppImage"
94+
pwd
95+
96+
- name: "📤 Upload artifact: AppImage"
97+
uses: actions/upload-artifact@v3
98+
with:
99+
name: ${{env.EXECUTABLE}}-x86_64.AppImage
100+
path: src/${{env.EXECUTABLE}}-x86_64.AppImage
101+
- name: "📤 Upload artifact: AppImage sha256sum"
102+
uses: actions/upload-artifact@v3
103+
with:
104+
name: ${{env.EXECUTABLE}}-x86_64.AppImage.sha256sum
105+
path: src/${{env.EXECUTABLE}}-x86_64.AppImage.sha256sum

0 commit comments

Comments
 (0)