-
-
Notifications
You must be signed in to change notification settings - Fork 1
143 lines (115 loc) · 4.72 KB
/
appimage.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: AppImage
on: [push]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
VSCP_ROOT: ${{github.workspace}}/vscp
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
#continue-on-error: true
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v4
with:
submodules: recursive
- name: test
run: |
aqt list-qt linux desktop --arch 6.5.3
aqt list-qt linux desktop --modules 6.5.3 linux_gcc_64
# https://github.com/marketplace/actions/install-qt
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.5.3
host: 'linux'
target: 'desktop'
arch: 'linux_gcc_64'
modules: 'qtcharts qtconnectivity qtserialbus qtserialport qtwebsockets'
- name: Checkout vscp repo
uses: actions/checkout@v4
with:
repository: grodansparadis/vscp
path: vscp
ref: development
submodules: recursive
- name: Checkout eclipse paho repo
uses: actions/checkout@v4
with:
repository: eclipse/paho.mqtt.c
path: paho
- name: Update before installing packages
run: sudo apt-get update
- name: Install libmosquitto-dev manually
run: sudo apt-get install libmosquitto-dev
- name: Install libexpat-dev manually
run: sudo apt-get install libexpat-dev
- name: Install libssl-dev manually
run: sudo apt-get install libssl-dev
- name: Install paho manually
run: cd paho && mkdir build && cd build && sudo cmake -DPAHO_WITH_SSL=true .. && sudo make install
- name: Install curl manually
run: sudo apt-get install libcurl4-openssl-dev
- name: Install libwebsockets-dev
run: sudo apt install libwebsockets-dev
- name: Install FUSE manually
run: sudo apt install libfuse2
# https://forum.qt.io/topic/151452/what-qt-specific-files-exactly-do-i-need-to-add-when-deploying/34
- name: Install mysql client
run: sudo apt install libmysqlclient-dev
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
- name: Create Build Environment
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DVSCP_ROOT=${{github.workspace}}/vscp2/ -DVSCP_PATH=${{github.workspace}}/vscp/ ..
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
make -j$(nproc)
make install DESTDIR=AppDir
- name: get linuxdeploy
working-directory: ${{github.workspace}}/build
shell: bash
# Install files
run: wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
- name: get qt plugin
working-directory: ${{github.workspace}}/build
shell: bash
# Install files
run: wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
- name: Make appimage files executable
working-directory: ${{github.workspace}}/build
shell: bash
# Install files
run: chmod +x linuxdeploy*.AppImage
- name: prepare AppRun
working-directory: ${{github.workspace}}/build
shell: bash
# Prepare content not installed by cmake (AppRun)
run: |
cp ../install/AppRun AppDir
chmod a+x AppDir/AppRun
cp ../install/vscp-works-qt.desktop AppDir
cp ../icons/vscpworks.png AppDir
- name: prepare desktop/icon
working-directory: ${{github.workspace}}/build
shell: bash
# Prepare content not installed by cmake (desktop/icon)
run: cp ../install/vscp-works-qt.desktop ./AppDir/ && cp ../icons/vscpworks.png ./AppDir/
- name: build appimage
working-directory: ${{github.workspace}}/build
shell: bash
# initialize AppDir, bundle shared libraries for QtQuickApp, use Qt plugin to bundle additional resources, and build AppImage, all in one single command
# https://forum.qt.io/topic/154845/libmimerapi-so-not-found/4
run: ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage
- uses: actions/upload-artifact@v4
with:
name: vscp-works-qt
path: ${{github.workspace}}/build/vscpworks*.AppImage