goldendict-ng/.github/workflows/cmake build test.yml

130 lines
4.4 KiB
YAML
Raw Normal View History

2022-12-06 01:45:58 +00:00
name: CMake Test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
# push:
# branches:
# - dev
# pull_request:
# types: [opened, synchronize, reopened]
jobs:
job1:
2022-12-14 08:07:03 +00:00
name: ubuntu Build and analyze
2022-12-06 01:45:58 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
2023-03-20 23:41:26 +00:00
version: 6.4.3
2022-12-06 01:45:58 +00:00
arch: gcc_64
cached: 'false'
#serialport linuxdeploy need serialport to work.
2023-03-26 03:39:51 +00:00
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech qtserialport
2022-12-06 01:45:58 +00:00
setup-python: 'false'
- name: ubuntu install thirdparty dependencies
run: |
sudo apt-get install git pkg-config build-essential
sudo apt-get install libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev
sudo apt-get install libxtst-dev liblzo2-dev libbz2-dev
sudo apt-get install libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev
sudo apt-get install doxygen libzstd-dev libxkbcommon-dev libgstreamer-plugins-base1.0-0 libgstreamer-gl1.0-0
sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld
#build opencc
git clone https://github.com/BYVoid/OpenCC
cd OpenCC/
make PREFIX=/usr -j$(nproc)
sudo make install
cd ..
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
- name: Run build-wrapper
run: |
cmake .
cmake --build .
job2:
2022-12-14 08:07:03 +00:00
name: windows Build and analyze
2022-12-06 01:45:58 +00:00
runs-on: windows-2019
steps:
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
2023-03-20 23:41:26 +00:00
version: 6.4.3
2022-12-14 08:07:03 +00:00
arch: win64_msvc2019_64
2022-12-06 01:45:58 +00:00
cached: 'false'
#serialport linuxdeploy need serialport to work.
2023-03-26 03:39:51 +00:00
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech qtserialport
2022-12-06 01:45:58 +00:00
setup-python: 'false'
- uses: ilammy/msvc-dev-cmd@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
- name: Run build-wrapper
run: |
cmake -S . -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
2022-12-06 01:45:58 +00:00
job3:
2022-12-14 08:07:03 +00:00
name: macos Build and analyze
2022-12-06 01:45:58 +00:00
runs-on: macos-12
steps:
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
2023-03-20 23:41:26 +00:00
version: 6.4.3
2022-12-14 08:07:03 +00:00
arch: clang_64
2022-12-06 01:45:58 +00:00
cached: 'false'
#serialport linuxdeploy need serialport to work.
2023-03-26 03:39:51 +00:00
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech qtserialport
2022-12-06 01:45:58 +00:00
setup-python: 'false'
- uses: ilammy/msvc-dev-cmd@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
- name: install dependencies
run: |
brew install pcre2 harfbuzz freetype
brew install cmake ninja python
brew install automake
brew install autoconf
brew install libtool
brew install opencc
brew install ffmpeg@5
#brew reinstall $(brew deps ffmpeg) ffmpeg
brew install libao
brew install libiconv
brew install lzo bzip2
brew install libogg
brew install zstd lzip
brew install libtiff
brew install libvorbis --force
brew install hunspell
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 ..
#brew install qt # or use official offline installer
brew install xz lzo
brew install pkg-config
2022-12-06 01:45:58 +00:00
- name: Run build-wrapper
run: |
cmake .
cmake --build .