-
Notifications
You must be signed in to change notification settings - Fork 97
165 lines (159 loc) · 4.57 KB
/
PR-check-cmake.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
name: Build Check
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
branches:
- dev
- master
- experimental
- staged
jobs:
job_ubuntu_build_check:
name: ubuntu Build and analyze
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential ninja-build \
libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev \
libxtst-dev liblzo2-dev libbz2-dev \
libavutil-dev libavformat-dev libeb16-dev \
libzstd-dev libxkbcommon-dev \
libxapian-dev libzim-dev libopencc-dev \
qt6-5compat-dev \
qt6-base-dev \
qt6-multimedia-dev \
qt6-speech-dev \
qt6-svg-dev \
qt6-tools-dev \
qt6-tools-dev-tools \
qt6-webchannel-dev \
qt6-webengine-dev
- uses: actions/checkout@v4
with:
submodules: false
- name: Run build
run: |
mkdir build_dir
cmake -S . \
-B ./build_dir \
-G Ninja
cmake --build ./build_dir
job_macos_build_check:
name: macos Build and analyze
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Update brew
run: |
brew update
- name: Install dependencies
run: |
brew install \
ninja \
opencc \
ffmpeg \
libao \
libiconv \
bzip2 \
lzip \
libvorbis \
hunspell \
xapian \
libzim \
qt
- name: Install eb
run: |
wget https://github.com/mistydemeo/eb/releases/download/v4.4.3/eb-4.4.3.tar.bz2
tar xvjf eb-4.4.3.tar.bz2
cd eb-4.4.3 && ./configure && make -j 8 && sudo make install && cd ..
- name: Run build
run: |
mkdir build_dir
cmake -S . \
-B ./build_dir \
-G Ninja
cmake --build ./build_dir
job_window_build_check:
name: windows Build and analyze
runs-on: windows-latest
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.7.3
arch: win64_msvc2019_64
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech
setup-python: 'false'
- uses: actions/checkout@v4
with:
submodules: true
- name: Run build
run: |
# Launch-VsDevShell also provides Ninja
& 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1' `
-SkipAutomaticLocation -Arch amd64 -HostArch amd64
New-Item -Path './build_dir' -ItemType Directory
cmake -S . -B "./build_dir" `
-G Ninja `
-DWITH_VCPKG_BREAKPAD=ON `
-DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" `
-DWITH_FFMPEG_PLAYER=OFF
cmake --build "./build_dir"
job_archlinux_build_check:
name: archlinux Build and analyze
runs-on: ubuntu-24.04
container:
image: ghcr.io/archlinux/archlinux:base-devel
steps:
- name: Print Version
run: |
if [[ -f /etc/os-release ]]; then
cat /etc/os-release
fi
- name: Install dependencies
run: |
# https://github.com/archlinux/archlinux-docker
# base-devel is already included in the `base-devel` image
pacman --noconfirm -Syuu \
cmake \
ffmpeg \
fmt \
hunspell \
libvorbis \
libxtst \
libzim \
lzo \
ninja \
opencc \
qt6-5compat \
qt6-base \
qt6-multimedia \
qt6-speech \
qt6-svg \
qt6-tools \
qt6-webengine \
tomlplusplus \
xapian-core
- uses: actions/checkout@v4
with:
submodules: false
- name: Run build
run: |
mkdir build_dir
# eb is only available in AUR, so it is disabled
cmake -S . \
-B ./build_dir \
-G Ninja \
-DWITH_EPWING_SUPPORT=OFF \
-DWITH_FFMPEG_PLAYER=ON \
-DWITH_TTS=ON \
-DUSE_SYSTEM_FMT=ON \
-DUSE_SYSTEM_TOML=ON
cmake --build ./build_dir