-
Notifications
You must be signed in to change notification settings - Fork 9
182 lines (157 loc) · 5.54 KB
/
package-ubuntu-20.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
name: "Package for Ubuntu 20.04"
on:
push:
tags:
- "v*"
workflow_dispatch:
env:
MUPDF_VERSION: 1.25.2
MUPDF_SHA256SUM: dd42045ba511453031b6dd86421fc6f32d316650bcba44a27822b2382e2fe451
jobs:
package:
name: Package
runs-on: ubuntu-20.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
lunzip
zlib1g-dev
libmupdf-dev
libgumbo-dev
libfreetype-dev
freeglut3-dev
libharfbuzz-dev
libjpeg-dev
libopenjp2-7-dev
libjbig2dec0-dev
libqt5svg5-dev
qtmultimedia5-dev
qttools5-dev
libpoppler-qt5-dev
- name: Configure with Qt5 + Poppler
run: >
cmake
-B build_qt5_poppler
-DUBUNTU_VERSION=20.04
-DUSE_MUPDF=OFF
-DUSE_POPPLER=ON
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=OFF
-DLINK_GUMBO=OFF
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=5
-DQT_VERSION_MINOR=12
-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-focal-x86_64.deb
- name: Archive package with Qt5 + Poppler
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-poppler-qt5-focal-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-poppler-qt5-focal-x86_64.deb
- name: Configure with Qt5 + MuPDF
run: >
cmake
-B build_qt5_mupdf
-DUBUNTU_VERSION=20.04
-DUSE_MUPDF=ON
-DUSE_POPPLER=OFF
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=OFF
-DLINK_GUMBO=OFF
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=5
-DQT_VERSION_MINOR=12
-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-focal-x86_64.deb
- name: Archive package with Qt5 + MuPDF
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-mupdf-qt5-focal-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-mupdf-qt5-focal-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=20.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=12
-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-focal-x86_64.deb
- name: Archive package with Qt5 + small MuPDF
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-mupdf-small-qt5-focal-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-mupdf-small-qt5-focal-x86_64.deb
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
beamerpresenter-mupdf-small-qt5-focal-x86_64.deb
beamerpresenter-mupdf-qt5-focal-x86_64.deb
beamerpresenter-poppler-qt5-focal-x86_64.deb
draft: true
token: ${{ secrets.GITHUB_TOKEN }}