Skip to content

actions: revise github workflows #133

actions: revise github workflows

actions: revise github workflows #133

Workflow file for this run

name: Build Check
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
branches:
- dev
- master
- experimental
- staged
paths-ignore:
- 'docs/**'
# - ".github/**"
- "howto/**"
- "*.md"
- "locale/**"
jobs:
job1:
name: Ubuntu
runs-on: ubuntu-latest
steps:
- name: ubuntu install thirdparty dependencies
run: |
sudo apt-get install build-essential \
libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev \
libxtst-dev liblzo2-dev libbz2-dev \
libavutil-dev libavformat-dev libeb16-dev \
doxygen libzstd-dev libxkbcommon-dev libgstreamer-plugins-base1.0-0 libgstreamer-gl1.0-0 \
libxapian-dev libzim-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 \
libopencc-dev \
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: false
- name: Run build-wrapper
run: |
cmake .
cmake --build .
job2:
name: Windows (winlibs)
runs-on: windows-latest
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.5.1
arch: win64_msvc2019_64
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech
setup-python: 'false'
- uses: ilammy/msvc-dev-cmd@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
- name: Run build-wrapper
run: |
cmake -S . -DWITH_FFMPEG_PLAYER=OFF
cmake --build . --config Release
job3:
name: macOS
runs-on: macos-12
steps:
- uses: ilammy/msvc-dev-cmd@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: false
- name: install dependencies
run: |
brew install \
ninja \
automake \
autoconf \
libtool \
opencc \
ffmpeg \
libao \
libiconv \
lzo bzip2 \
libogg \
zstd lzip \
libvorbis \
hunspell \
xz lzo \
pkg-config \
xapian \
libzim \
icu4c \
qt
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-wrapper
run: |
cmake .
cmake --build .
job4:
name: Windows (vcpkg)
runs-on: windows-latest
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.7.2
arch: win64_msvc2019_64
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech
setup-python: 'false'
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
- name: setup vcpkg github caches variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Build binaries
id: build
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
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
# RelWithDebInfo + msvc's = .pdb file beside program file.
cmake -S . -B "./build_dir" `
-G Ninja `
-DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" `
-DWITH_FFMPEG_PLAYER=OFF `
-DUSE_VCPKG=ON `
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" `
-DWITH_VCPKG_BREAKPAD=ON
cmake --build "./build_dir"