-
Notifications
You must be signed in to change notification settings - Fork 784
219 lines (198 loc) · 7.24 KB
/
build-check.yaml
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
name: Build Check
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-ubuntu:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu 20.04 / Qt 5",
os: ubuntu-20.04,
qt_packages: "libqt5x11extras5-dev qt5-default qtwebengine5-dev",
configurePreset: "ninja-multi",
buildPreset: "ninja-multi-release"
}
- {
name: "Ubuntu 20.04 / Qt 5 / Portable",
os: ubuntu-20.04,
qt_packages: "libqt5x11extras5-dev qt5-default qtwebengine5-dev",
configurePreset: "ninja-multi-portable",
buildPreset: "ninja-multi-portable-release"
}
- {
name: "Ubuntu 22.04 / Qt 6",
os: ubuntu-22.04,
qt_packages: "libgl1-mesa-dev libqt6opengl6-dev qt6-base-private-dev qt6-webengine-dev qt6-webengine-dev-tools",
configurePreset: "ninja-multi",
buildPreset: "ninja-multi-release"
}
- {
name: "Ubuntu 22.04 / Qt 6 / Portable",
os: ubuntu-22.04,
qt_packages: "libgl1-mesa-dev libqt6opengl6-dev qt6-base-private-dev qt6-webengine-dev qt6-webengine-dev-tools",
configurePreset: "ninja-multi-portable",
buildPreset: "ninja-multi-portable-release"
}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Dependencies
run: |
sudo apt-get -y -qq update
sudo apt-get -y -qq --no-install-recommends install \
cmake \
extra-cmake-modules \
libarchive-dev \
libsqlite3-dev \
libxcb-keysyms1-dev \
ninja-build \
${{ matrix.config.qt_packages }}
- name: Configure & Build
uses: lukka/run-cmake@v10
with:
configurePreset: ${{ matrix.config.configurePreset }}
buildPreset: ${{ matrix.config.buildPreset }}
build-windows:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows Server 2019 / Qt 5",
os: windows-2019,
qt_modules: "qtwebengine",
qt_version: "5.15.2",
configurePreset: "ninja-multi-vcpkg",
buildPreset: "ninja-multi-vcpkg-release",
publishArtifacts: false
}
- {
name: "Windows Server 2019 / Qt 5 / Portable",
os: windows-2019,
qt_modules: "qtwebengine",
qt_version: "5.15.2",
configurePreset: ninja-multi-vcpkg-portable,
buildPreset: ninja-multi-vcpkg-portable-release,
publishArtifacts: false
}
- {
name: "Windows Server 2022 / Qt 6",
os: windows-2022,
qt_modules: "qtwebengine qtwebchannel qtpositioning",
qt_version: "6.5.0",
configurePreset: ninja-multi-vcpkg,
buildPreset: ninja-multi-vcpkg-release,
publishArtifacts: true
}
- {
name: "Windows Server 2022 / Qt 6 / Portable",
os: windows-2022,
qt_modules: "qtwebengine qtwebchannel qtpositioning",
qt_version: "6.5.0",
configurePreset: ninja-multi-vcpkg-portable,
buildPreset: ninja-multi-vcpkg-portable-release,
publishArtifacts: true
}
env:
VCPKG_DEFAULT_TRIPLET: x64-windows-release
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: ${{ runner.workspace }}/vcpkg
vcpkgGitCommitId: 5b1214315250939257ef5d62ecdcbca18cf4fb1c # For vcpkg-tool 2023-03-29.
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
arch: win64_msvc2019_64
modules: ${{ matrix.config.qt_modules }}
version: ${{ matrix.config.qt_version }}
cache: true
extra: --external 7z
- name: Configure & Build
uses: lukka/run-cmake@v10
with:
configurePreset: ${{ matrix.config.configurePreset }}
buildPreset: ${{ matrix.config.buildPreset }}
- name: Retrieve Application Version
run: |
$zeal_version = Get-Content build/${{ matrix.config.configurePreset }}/zeal_version
Write-Output "Zeal Version: $zeal_version"
"ZEAL_VERSION=$zeal_version" >> $env:GITHUB_ENV
- name: Package
if: matrix.config.publishArtifacts
run: cmake --build build --preset ${{ matrix.config.buildPreset }} --target package
- name: Sign Artifacts
if: matrix.config.publishArtifacts && github.repository == 'zealdocs/zeal' && github.event_name == 'push'
uses: dlemstra/code-sign-action@v1
with:
certificate: '${{ secrets.CODESIGN_CERTIFICATE }}'
password: '${{ secrets.CODESIGN_PASSWORD }}'
files: |
build/${{ matrix.config.configurePreset }}/bin/RelWithDebInfo/zeal.exe
build/${{ matrix.config.configurePreset }}/bin/RelWithDebInfo/archive.dll
build/${{ matrix.config.configurePreset }}/bin/RelWithDebInfo/sqlite3.dll
build/${{ matrix.config.configurePreset }}/bin/RelWithDebInfo/zlib1.dll
- name: Upload Artifacts
if: matrix.config.publishArtifacts
uses: actions/upload-artifact@v3
with:
name: zeal-${{ env.ZEAL_VERSION }}${{ matrix.config.configurePreset == 'ninja-multi-vcpkg-portable' && '-portable' || '' }}-windows-x64
path: |
build/${{ matrix.config.configurePreset }}/bin/RelWithDebInfo
!**/*.idl
!**/*.ilk
!**/*.pdb
build-appimage:
name: AppImage
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build AppImage
uses: ./.github/workflows/appimage/
with:
recipe: pkg/appimage/appimage-amd64.yaml
apt_dependencies: >-
build-essential
cmake extra-cmake-modules
libappindicator-dev
libarchive-dev
libqt5x11extras5-dev
libsqlite3-dev
libxcb-keysyms1-dev
ninja-build
qtbase5-dev
qtwebengine5-dev
- name: Upload AppImage
uses: actions/upload-artifact@v3
with:
name: zeal-dev-x86_64.AppImage # TODO: Provide real version.
path: zeal-*.AppImage
# TODO: Enable for releases.
- name: Upload AppImage.zsync
if: github.event_name == 'create' && github.event.ref_type == 'tag' && startsWith(github.ref, 'v')
uses: actions/upload-artifact@v3
with:
name: zeal-dev-x86_64.AppImage.zsync
path: zeal-*.AppImage.zsync