goldendict-ng/.github/workflows/PR-check-cmake.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

163 lines
4.4 KiB
YAML
Raw Normal View History

2024-06-21 06:45:44 +00:00
name: Build Check
2022-12-06 01:45:58 +00:00
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
branches:
- dev
- master
- experimental
- staged
2022-12-06 01:45:58 +00:00
jobs:
2024-07-09 03:12:43 +00:00
job_ubuntu_build_check:
2022-12-14 08:07:03 +00:00
name: ubuntu Build and analyze
2024-07-09 03:12:43 +00:00
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
2024-07-09 03:12:43 +00:00
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
2022-12-06 01:45:58 +00:00
with:
2024-07-09 03:12:43 +00:00
submodules: false
- name: Run build
2022-12-06 01:45:58 +00:00
run: |
2024-07-09 03:12:43 +00:00
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
2024-07-09 03:12:43 +00:00
steps:
- uses: actions/checkout@v4
2022-12-06 01:45:58 +00:00
with:
submodules: false
2024-07-09 03:12:43 +00:00
- name: Install dependencies
2022-12-06 01:45:58 +00:00
run: |
2024-07-09 03:12:43 +00:00
brew install \
ninja \
opencc \
ffmpeg \
libao \
libiconv \
bzip2 \
lzip \
libvorbis \
hunspell \
xapian \
libzim \
qt
2022-12-06 01:45:58 +00:00
2024-07-09 03:12:43 +00:00
wget ftp://ftp.sra.co.jp/pub/misc/eb/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:
2022-12-14 08:07:03 +00:00
name: windows Build and analyze
2024-06-19 15:11:19 +00:00
runs-on: windows-latest
2024-07-09 03:12:43 +00:00
steps:
2022-12-06 01:45:58 +00:00
- name: Install Qt
2024-07-09 03:12:43 +00:00
uses: jurplel/install-qt-action@v4
2022-12-06 01:45:58 +00:00
with:
2024-09-30 04:20:12 +00:00
version: 6.7.3
2022-12-14 08:07:03 +00:00
arch: win64_msvc2019_64
2024-07-09 03:12:43 +00:00
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech
2022-12-06 01:45:58 +00:00
setup-python: 'false'
- uses: actions/checkout@v4
2022-12-06 01:45:58 +00:00
with:
submodules: true
2024-07-09 03:12:43 +00:00
- name: Run build
2022-12-06 01:45:58 +00:00
run: |
2024-07-09 03:12:43 +00:00
# Launch-VsDevShell also provides Ninja
& 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1' `
-SkipAutomaticLocation -Arch amd64 -HostArch amd64
2023-05-17 23:47:28 +00:00
2024-07-09 03:12:43 +00:00
New-Item -Path './build_dir' -ItemType Directory
cmake -S . -B "./build_dir" `
-G Ninja `
-DWITH_VCPKG_BREAKPAD=ON `
2024-07-09 03:12:43 +00:00
-DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" `
-DWITH_FFMPEG_PLAYER=OFF
2024-07-09 03:12:43 +00:00
cmake --build "./build_dir"
2024-10-16 16:55:26 +00:00
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