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

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

84 lines
2.8 KiB
YAML
Raw Normal View History

2022-04-24 01:18:19 +00:00
name: Ubuntu-PR-check
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2022-04-24 01:18:19 +00:00
on:
workflow_dispatch:
pull_request:
branches:
- dev
- master
- staged
paths-ignore:
- 'docs/**'
# - ".github/**"
2022-04-24 01:18:19 +00:00
- "howto/**"
- "*.md"
- "locale/**"
- "website/**"
2022-04-24 01:18:19 +00:00
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
feat!: add libzim dependency (#725) * feat!: add libzim dependency * 🎨 apply clang-format changes * action: add libzim dependency to action * feat!: change dependency folder * action: add zim support * feat!: add libzim support * action: fix sonarcloud check * doc: add libzim readme * action: cmake build * action: cmake check * fix: code smell * action: cmake check * action: cmake on Macos * action: cmake on Macos * feat: use libzim to read title and description * 🎨 apply clang-format changes * feat: split zim file support * feat: loadArticle refactor * 🎨 apply clang-format changes * 🎨 apply clang-format changes * feat: update library and goldendict.pro * 🎨 apply clang-format changes * fix:word count * 🎨 apply clang-format changes * fix: video src url subsititue * 🎨 apply clang-format changes * zim: headword is not usually a valid it is from title and url. * fix: remove nested try catch * zim: fix resource loading issue. * 🎨 apply clang-format changes * action: remove libao * zim: process url some old zim dictionary url does not contain namespace such as /C/url make the old and new zim dictionary's url consistent without the leading ../C/ etc. * 🎨 apply clang-format changes * zim: process url remove leading dot and slash such as ../-/assets ,remove ../ * 🎨 apply clang-format changes * zim: remove resourceIndex creation use libzim to read the resource directly. * zim: only iterate all the articles * 🎨 apply clang-format changes * fix: code smell * 🎨 apply clang-format changes * zim: refactor method to convert url to wstring * 🎨 apply clang-format changes * fix:code smell * 🎨 apply clang-format changes * zim: update windows dependencies * zim: add mutex lock * 🎨 apply clang-format changes * fix: code smell * 🎨 apply clang-format changes --------- Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-27 04:12:16 +00:00
os: [ubuntu-latest]
qt_ver: [5.15.2,6.6.0]
2022-04-24 01:18:19 +00:00
qt_arch: [gcc_64]
2022-08-23 11:38:23 +00:00
2022-04-24 01:18:19 +00:00
steps:
- name: Install Qt
if: ${{ matrix.qt_ver == '5.15.2' }}
uses: jurplel/install-qt-action@v3
2022-04-24 01:18:19 +00:00
with:
version: ${{ matrix.qt_ver }}
2022-04-24 01:18:19 +00:00
modules: qtwebengine
2022-04-24 01:18:19 +00:00
- name: Install Qt
if: ${{ matrix.qt_ver != '5.15.2' }}
uses: jurplel/install-qt-action@v3
2022-04-24 01:18:19 +00:00
with:
version: ${{ matrix.qt_ver }}
arch: ${{ matrix.qt_arch }}
2023-03-26 03:39:51 +00:00
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech
2022-04-24 01:18:19 +00:00
- name: ubuntu install thirdparty dependencies
run: |
sudo apt-get install git pkg-config build-essential qt5-qmake
sudo apt-get install libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev
sudo apt-get install qtdeclarative5-dev libxtst-dev liblzo2-dev libbz2-dev
feat!: add libzim dependency (#725) * feat!: add libzim dependency * 🎨 apply clang-format changes * action: add libzim dependency to action * feat!: change dependency folder * action: add zim support * feat!: add libzim support * action: fix sonarcloud check * doc: add libzim readme * action: cmake build * action: cmake check * fix: code smell * action: cmake check * action: cmake on Macos * action: cmake on Macos * feat: use libzim to read title and description * 🎨 apply clang-format changes * feat: split zim file support * feat: loadArticle refactor * 🎨 apply clang-format changes * 🎨 apply clang-format changes * feat: update library and goldendict.pro * 🎨 apply clang-format changes * fix:word count * 🎨 apply clang-format changes * fix: video src url subsititue * 🎨 apply clang-format changes * zim: headword is not usually a valid it is from title and url. * fix: remove nested try catch * zim: fix resource loading issue. * 🎨 apply clang-format changes * action: remove libao * zim: process url some old zim dictionary url does not contain namespace such as /C/url make the old and new zim dictionary's url consistent without the leading ../C/ etc. * 🎨 apply clang-format changes * zim: process url remove leading dot and slash such as ../-/assets ,remove ../ * 🎨 apply clang-format changes * zim: remove resourceIndex creation use libzim to read the resource directly. * zim: only iterate all the articles * 🎨 apply clang-format changes * fix: code smell * 🎨 apply clang-format changes * zim: refactor method to convert url to wstring * 🎨 apply clang-format changes * fix:code smell * 🎨 apply clang-format changes * zim: update windows dependencies * zim: add mutex lock * 🎨 apply clang-format changes * fix: code smell * 🎨 apply clang-format changes --------- Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-27 04:12:16 +00:00
sudo apt-get install libavutil-dev libavformat-dev libeb16-dev
2022-04-24 01:18:19 +00:00
sudo apt-get install libqt5webkit5-dev libqt5svg5-dev libqt5x11extras5-dev qttools5-dev
sudo apt-get install qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins doxygen libzstd-dev #libopencc-dev
2023-02-01 15:23:23 +00:00
sudo apt-get install libxkbcommon-dev libc6-dev
2022-04-24 01:18:19 +00:00
sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld
git clone https://github.com/BYVoid/OpenCC
pwd
cd OpenCC/
make PREFIX=/usr -j$(nproc)
sudo make install
cd ..
sudo apt install libxapian-dev
feat!: add libzim dependency (#725) * feat!: add libzim dependency * 🎨 apply clang-format changes * action: add libzim dependency to action * feat!: change dependency folder * action: add zim support * feat!: add libzim support * action: fix sonarcloud check * doc: add libzim readme * action: cmake build * action: cmake check * fix: code smell * action: cmake check * action: cmake on Macos * action: cmake on Macos * feat: use libzim to read title and description * 🎨 apply clang-format changes * feat: split zim file support * feat: loadArticle refactor * 🎨 apply clang-format changes * 🎨 apply clang-format changes * feat: update library and goldendict.pro * 🎨 apply clang-format changes * fix:word count * 🎨 apply clang-format changes * fix: video src url subsititue * 🎨 apply clang-format changes * zim: headword is not usually a valid it is from title and url. * fix: remove nested try catch * zim: fix resource loading issue. * 🎨 apply clang-format changes * action: remove libao * zim: process url some old zim dictionary url does not contain namespace such as /C/url make the old and new zim dictionary's url consistent without the leading ../C/ etc. * 🎨 apply clang-format changes * zim: process url remove leading dot and slash such as ../-/assets ,remove ../ * 🎨 apply clang-format changes * zim: remove resourceIndex creation use libzim to read the resource directly. * zim: only iterate all the articles * 🎨 apply clang-format changes * fix: code smell * 🎨 apply clang-format changes * zim: refactor method to convert url to wstring * 🎨 apply clang-format changes * fix:code smell * 🎨 apply clang-format changes * zim: update windows dependencies * zim: add mutex lock * 🎨 apply clang-format changes * fix: code smell * 🎨 apply clang-format changes --------- Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-27 04:12:16 +00:00
sudo apt-get install libzim-dev
2022-04-24 01:18:19 +00:00
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true
2022-04-24 01:18:19 +00:00
- name: build goldendict
run: |
qmake CONFIG+=release PREFIX=/usr CONFIG+=zim_support CONFIG+=chinese_conversion_support CONFIG+=use_iconv CONFIG+=use_xapian
2022-04-24 01:18:19 +00:00
make INSTALL_ROOT=appdir -j`nproc` install; find appdir/
#copy missing shared dll to appdir.
mkdir -p appdir/usr/lib
cp $(ldd appdir/usr/bin/goldendict | grep -o '\W/[^ ]*' |grep gobject ) appdir/usr/lib
cp $(ldd appdir/usr/bin/goldendict | grep -o '\W/[^ ]*' |grep libpango ) appdir/usr/lib