-
Notifications
You must be signed in to change notification settings - Fork 9
303 lines (263 loc) · 9.48 KB
/
package-ubuntu-24.04.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
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
name: "Package for Ubuntu 24.04"
on:
push:
tags:
- "v*"
workflow_dispatch:
env:
MUPDF_VERSION: 1.24.9
MUPDF_SHA256SUM: d87da097ae943ad0113003190ed370d39bde817383c59dc753dce23c7ba2b710
jobs:
package:
name: Package
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Dependencies
run: >
sudo apt-get update -y;
sudo apt-get install -y --no-install-recommends
cmake
g++
lunzip
zlib1g-dev
libmupdf-dev
libmujs-dev
libgumbo-dev
libfreetype-dev
freeglut3-dev
libharfbuzz-dev
libjpeg-dev
libopenjp2-7-dev
libjbig2dec0-dev
libqt6svg6-dev
qt6-multimedia-dev
qt6-tools-dev
libpoppler-qt6-dev
libqt5svg5-dev
qtmultimedia5-dev
qttools5-dev
libpoppler-qt5-dev
- name: Configure with Qt5 + Poppler
run: >
cmake
-B build_qt5_poppler
-DUBUNTU_VERSION=24.04
-DUSE_MUPDF=OFF
-DUSE_POPPLER=ON
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=ON
-DLINK_GUMBO=ON
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=5
-DQT_VERSION_MINOR=15
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build with Qt5 + Poppler
run: cmake --build build_qt5_poppler
- name: Package with Qt5 + Poppler
run: |
cpack --config build_qt5_poppler/CPackConfig.cmake
mv beamerpresenter-poppler-qt5-x86_64.deb beamerpresenter-poppler-qt5-noble-x86_64.deb
- name: Archive package with Qt5 + Poppler
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-poppler-qt5-noble-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-poppler-qt5-noble-x86_64.deb
- name: Configure with Qt6 + Poppler
run: >
cmake
-B build_qt6_poppler
-DUBUNTU_VERSION=24.04
-DUSE_MUPDF=OFF
-DUSE_POPPLER=ON
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=ON
-DLINK_GUMBO=ON
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=6
-DQT_VERSION_MINOR=4
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build with Qt6 + Poppler
run: cmake --build build_qt6_poppler
- name: Package with Qt6 + Poppler
run: |
cpack --config build_qt6_poppler/CPackConfig.cmake
mv beamerpresenter-poppler-qt6-x86_64.deb beamerpresenter-poppler-qt6-noble-x86_64.deb
- name: Archive package with Qt6 + Poppler
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-poppler-qt6-noble-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-poppler-qt6-noble-x86_64.deb
- name: Configure with Qt5 + MuPDF
run: >
cmake
-B build_qt5_mupdf
-DUBUNTU_VERSION=24.04
-DUSE_MUPDF=ON
-DUSE_POPPLER=OFF
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=ON
-DLINK_GUMBO=ON
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=5
-DQT_VERSION_MINOR=15
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build with Qt5 + MuPDF
run: cmake --build build_qt5_mupdf
- name: Package with Qt5 + MuPDF
run: |
cpack --config build_qt5_mupdf/CPackConfig.cmake
mv beamerpresenter-mupdf-qt5-x86_64.deb beamerpresenter-mupdf-qt5-noble-x86_64.deb
- name: Archive package with Qt5 + MuPDF
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-mupdf-qt5-noble-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-mupdf-qt5-noble-x86_64.deb
- name: Configure with Qt6 + MuPDF
run: >
cmake
-B build_qt6_mupdf
-DUBUNTU_VERSION=24.04
-DUSE_MUPDF=ON
-DUSE_POPPLER=OFF
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=ON
-DLINK_GUMBO=ON
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=6
-DQT_VERSION_MINOR=4
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build with Qt6 + MuPDF
run: cmake --build build_qt6_mupdf
- name: Package with Qt6 + MuPDF
run: |
cpack --config build_qt6_mupdf/CPackConfig.cmake
mv beamerpresenter-mupdf-qt6-x86_64.deb beamerpresenter-mupdf-qt6-noble-x86_64.deb
- name: Archive package with Qt6 + MuPDF
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-mupdf-qt6-noble-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-mupdf-qt6-noble-x86_64.deb
- name: Download and unpack MuPDF
run: |
wget -q https://mupdf.com/downloads/archive/mupdf-${{ env.MUPDF_VERSION }}-source.tar.lz
sha256sum -c - <<< "${{ env.MUPDF_SHA256SUM }} mupdf-${{ env.MUPDF_VERSION }}-source.tar.lz"
tar -xf "mupdf-${{ env.MUPDF_VERSION }}-source.tar.lz"
- name: Build MuPDF
run : |
cd "mupdf-${{ env.MUPDF_VERSION }}-source"
rm -rf thirdparty/{freeglut,freetype,harfbuzz,jbig2dec,libjpeg,openjpeg,zlib}
CFLAGS+=' -fPIC -ffat-lto-objects'
CXXFLAGS+=' -fPIC'
USE_SYSTEM_LIBS='yes'
XCFLAGS+=' -DTOFU -DTOFU_CJK -DTOFU_SIL -DFZ_ENABLE_JS=0'
export CFLAGS CXXFLAGS USE_SYSTEM_LIBS XCFLAGS
make build=release libs
- name: Configure with Qt5 + small MuPDF
run: >
cmake
-B build_qt5_mupdf_small
-DUBUNTU_VERSION=24.04
-DUSE_MUPDF=ON
-DUSE_POPPLER=OFF
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=OFF
-DLINK_GUMBO=ON
-DMUPDF_LIB_PATH="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/build/release/libmupdf.a"
-DMUPDF_THIRD_LIB_PATH="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/build/release/libmupdf-third.a"
-DMUPDF_INCLUDE_DIR="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/include"
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=5
-DQT_VERSION_MINOR=15
-DMARK_AS_SMALL=ON
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build with Qt5 + small MuPDF
run: cmake --build build_qt5_mupdf_small
- name: Package with Qt5 + small MuPDF
run: |
cpack --config build_qt5_mupdf_small/CPackConfig.cmake
mv beamerpresenter-mupdf-small-qt5-x86_64.deb beamerpresenter-mupdf-small-qt5-noble-x86_64.deb
- name: Archive package with Qt5 + small MuPDF
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-mupdf-small-qt5-noble-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-mupdf-small-qt5-noble-x86_64.deb
- name: Configure with Qt6 + small MuPDF
run: >
cmake
-B build_qt6_mupdf_small
-DUBUNTU_VERSION=24.04
-DUSE_MUPDF=ON
-DUSE_POPPLER=OFF
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=OFF
-DLINK_GUMBO=ON
-DMUPDF_LIB_PATH="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/build/release/libmupdf.a"
-DMUPDF_THIRD_LIB_PATH="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/build/release/libmupdf-third.a"
-DMUPDF_INCLUDE_DIR="$(pwd)/mupdf-${{ env.MUPDF_VERSION }}-source/include"
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=6
-DQT_VERSION_MINOR=4
-DMARK_AS_SMALL=ON
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build with Qt6 + small MuPDF
run: cmake --build build_qt6_mupdf_small
- name: Package with Qt6 + small MuPDF
run: |
cpack --config build_qt6_mupdf_small/CPackConfig.cmake
mv beamerpresenter-mupdf-small-qt6-x86_64.deb beamerpresenter-mupdf-small-qt6-noble-x86_64.deb
- name: Archive package with Qt6 + small MuPDF
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-mupdf-small-qt6-noble-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-mupdf-small-qt6-noble-x86_64.deb
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
beamerpresenter-mupdf-small-qt5-noble-x86_64.deb
beamerpresenter-mupdf-small-qt6-noble-x86_64.deb
beamerpresenter-mupdf-qt5-noble-x86_64.deb
beamerpresenter-mupdf-qt6-noble-x86_64.deb
beamerpresenter-poppler-qt5-noble-x86_64.deb
beamerpresenter-poppler-qt6-noble-x86_64.deb
draft: true
token: ${{ secrets.GITHUB_TOKEN }}