-
Notifications
You must be signed in to change notification settings - Fork 20
129 lines (109 loc) · 4.13 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
#-------------------------------------------------------------------------------
# Workflow configuration
#-------------------------------------------------------------------------------
name: AppImage
on:
push: # Run on push
paths-ignore: # File patterns to ignore
- '**.md' # Ignore changes to *.md files
pull_request: # Run on pull-request
paths-ignore: # File-patterns to ignore
- '**.md' # Ignore changes to *.md files
#-------------------------------------------------------------------------------
# Define application name & version
#-------------------------------------------------------------------------------
env:
VERSION: "2.0-beta1"
QT_VERSION_LINUX: 6.8.1
QT_VERSION_MACOS: 6.8.1
QT_VERSION_WINDOWS: 6.8.1
EXECUTABLE: "kraft"
APPLICATION: "kraft"
UNIXNAME: "kraft"
QML_DIR: ""
PUBLISHER: "Klaas Freitag"
DESCRIPTION: "Documents for the small business"
QT_MODULES: ""
# QT_MODULES: qt3d qtgraphs qtquick3d qtlocation qtdatavis3d qtserialport qtshadertools qtpositioning qtconnectivity
#-------------------------------------------------------------------------------
# Workflow jobs (GNU/Linux, macOS & Windows)
#-------------------------------------------------------------------------------
jobs:
#
# Linux build
#
build-linux-x86_64:
runs-on: ubuntu-22.04
name: '🐧 Linux (x86_64)'
steps:
- name: '🧰 Checkout'
uses: actions/checkout@v4
- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION_LINUX}}
modules: ${{env.QT_MODULES}}
cache: true
install-deps: 'true'
- name: '⚙ Install KF6 Snap'
run: |
sudo snap install kde-qt6-core22-sdk
- name: '⚙️ Install dependencies'
run: |
sudo apt-get update
sudo apt-get install -y \
libcups2-dev \
libgl1-mesa-dev \
libxkbcommon-x11-0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-render-util0 \
libxcb-xinerama0 \
libzstd-dev \
libxcb-image0-dev \
libxcb-util0-dev \
libxcb-cursor-dev \
libssl-dev \
libudev-dev \
rpm \
libfuse2 \
fakeroot \
libctemplate-dev
- name: '⚙️ Install CMake'
uses: lukka/get-cmake@latest
with:
useLocalCache: true
- name: '⚙️ Install Intel Compiler'
uses: fortran-lang/setup-fortran@v1
with:
compiler: intel
version: 2024.1
- name: '🚧 Configure with CMake'
run: |
mkdir build
cd build
cmake ../ -DCMAKE_CXX_COMPILER=icpx -DCMAKE_C_COMPILER=icx -DPRODUCTION_OPTIMIZATION=ON -DCMAKE_BUILD_TYPE=Release
- name: '🚧 Build application'
run: |
cd build
cmake --build . --config Release -j 16
- name: '📦 Create AppImage'
run: |
cd "build/app"
wget https://github.com/dantti/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/dantti/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
export QML_SOURCES_PATHS="${{env.QML_DIR}}"
export QMAKE=/home/runner/work/${{env.EXECUTABLE}}/Qt/${{env.QT_VERSION_LINUX}}/gcc_64/bin/qmake
export PATH=/home/runner/work/${{env.EXECUTABLE}}/Qt/${{env.QT_VERSION_LINUX}}/gcc_64/libexec:$PATH
./linuxdeploy-x86_64.AppImage --appdir AppDir -e ${{env.UNIXNAME}} -i ../../app/deploy/linux/${{env.UNIXNAME}}.png -d ../../app/deploy/linux/${{env.UNIXNAME}}.desktop --plugin qt --output appimage
rm linuxdeploy-x86_64.AppImage
rm linuxdeploy-plugin-qt-x86_64.AppImage
mv *.AppImage ../../${{env.EXECUTABLE}}-${{env.VERSION}}-Linux-x86_64.AppImage
- name: '📤 Upload artifact: AppImage'
uses: actions/upload-artifact@v4
with:
name: ${{env.EXECUTABLE}}-${{env.VERSION}}-Linux-x86_64.AppImage
path: ${{env.EXECUTABLE}}-${{env.VERSION}}-Linux-x86_64.AppImage