mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
commit
a84febafcc
189
.github/workflows/PR-check-cmake.yml
vendored
189
.github/workflows/PR-check-cmake.yml
vendored
|
@ -11,132 +11,115 @@ on:
|
|||
- experimental
|
||||
- staged
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
# - ".github/**"
|
||||
- "howto/**"
|
||||
- "docs/**"
|
||||
- "*.md"
|
||||
- "locale/**"
|
||||
- "website/**"
|
||||
jobs:
|
||||
job1:
|
||||
job_ubuntu_build_check:
|
||||
name: ubuntu Build and analyze
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
# Qt6.4 for testing ubuntu LTS
|
||||
version: 6.4.3
|
||||
arch: gcc_64
|
||||
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech
|
||||
setup-python: 'false'
|
||||
|
||||
- name: ubuntu install thirdparty dependencies
|
||||
- name: Install 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 libavutil-dev libavformat-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
|
||||
sudo apt install libxapian-dev
|
||||
|
||||
#build opencc
|
||||
git clone https://github.com/BYVoid/OpenCC
|
||||
cd OpenCC/
|
||||
make PREFIX=/usr -j$(nproc)
|
||||
sudo make install
|
||||
cd ..
|
||||
sudo apt-get install libzim-dev
|
||||
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:
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
submodules: false
|
||||
|
||||
- name: Run build-wrapper
|
||||
- name: Run build
|
||||
run: |
|
||||
cmake .
|
||||
cmake --build .
|
||||
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-12
|
||||
steps:
|
||||
- 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 \
|
||||
opencc \
|
||||
ffmpeg \
|
||||
libao \
|
||||
libiconv \
|
||||
bzip2 \
|
||||
lzip \
|
||||
libvorbis \
|
||||
hunspell \
|
||||
xapian \
|
||||
libzim \
|
||||
qt
|
||||
|
||||
job2:
|
||||
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:
|
||||
name: windows Build and analyze
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: 6.5.1
|
||||
version: 6.7.2
|
||||
arch: win64_msvc2019_64
|
||||
|
||||
#serialport linuxdeploy need serialport to work.
|
||||
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech qtserialport
|
||||
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 Build and analyze
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- uses: actions/setup-python@v3
|
||||
- name: Setup vcpkg github caches variables
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: 6.5.1
|
||||
arch: clang_64
|
||||
|
||||
#serialport linuxdeploy need serialport to work.
|
||||
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech qtserialport
|
||||
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: false
|
||||
- name: install dependencies
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
- name: Run build
|
||||
id: build
|
||||
env:
|
||||
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
||||
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 speex
|
||||
brew tap homebrew-ffmpeg/ffmpeg
|
||||
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-speex
|
||||
brew install libao
|
||||
brew install libiconv
|
||||
brew install lzo bzip2
|
||||
brew install libogg
|
||||
brew install zstd lzip
|
||||
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
|
||||
brew install xapian
|
||||
brew install libzim
|
||||
brew install icu4c
|
||||
- name: Run build-wrapper
|
||||
run: |
|
||||
cmake .
|
||||
cmake --build .
|
||||
# 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 `
|
||||
-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"
|
||||
|
|
6
.github/workflows/release-macos-homebrew.yml
vendored
6
.github/workflows/release-macos-homebrew.yml
vendored
|
@ -157,14 +157,14 @@ jobs:
|
|||
file_glob: true
|
||||
tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.sha_short }}
|
||||
overwrite: true
|
||||
release_name: GoldenDict-ng-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }}
|
||||
release_name: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }}
|
||||
prerelease: ${{env.prerelease}}
|
||||
body: |
|
||||
[Install instructions for Windows, macOS and Linux](https://xiaoyifang.github.io/goldendict-ng/install/).
|
||||
|
||||
Filaname pattern: GoldenDict-[version]-[Qt version]-[system name]-...
|
||||
Filename pattern: GoldenDict-ng-[version]-[Qt version]-[system name]-...
|
||||
|
||||
For Linux, released vesion is on Flathub -> [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng).
|
||||
For Linux, the released version is on Flathub → [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng).
|
||||
|
||||
Based on branch: ${{github.ref_name}}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name: Release Windows Vcpkg CMake
|
||||
name: Release Windows CMake
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
@ -147,9 +147,9 @@ jobs:
|
|||
$changeNotes = "
|
||||
[Install instructions for Windows, macOS and Linux](https://xiaoyifang.github.io/goldendict-ng/install/).
|
||||
|
||||
Filaname pattern: GoldenDict-[version]-[Qt version]-[system name]-...
|
||||
Filename pattern: GoldenDict-ng-[version]-[Qt version]-[system name]-...
|
||||
|
||||
For Linux, released vesion is on Flathub -> [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng).
|
||||
For Linux, the released version is on Flathub → [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng).
|
||||
|
||||
Based on branch: ${{github.ref_name}}
|
||||
|
||||
|
@ -169,7 +169,7 @@ jobs:
|
|||
|
||||
# file name after # is display label
|
||||
|
||||
$namePrefix="GoldenDict-${{env.version}}-Qt${{matrix.qt_ver}}"
|
||||
$namePrefix="GoldenDict-ng-${{env.version}}-Qt${{matrix.qt_ver}}"
|
||||
|
||||
cd './build_dir'
|
||||
gh release upload "${tagName}" "${namePrefix}.7z#${namePrefix}-Windows.7z" --clobber
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name: Windows-PR-check
|
||||
name: Windows-qmake-PR-check
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
@ -6,19 +6,19 @@ on:
|
|||
|
||||
workflow_dispatch:
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
- master
|
||||
- experimental
|
||||
- staged
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
# - ".github/**"
|
||||
- "howto/**"
|
||||
- "*.md"
|
||||
- "locale/**"
|
||||
- "website/**"
|
||||
# pull_request:
|
||||
# branches:
|
||||
# - dev
|
||||
# - master
|
||||
# - experimental
|
||||
# - staged
|
||||
# paths-ignore:
|
||||
# - 'docs/**'
|
||||
# # - ".github/**"
|
||||
# - "howto/**"
|
||||
# - "*.md"
|
||||
# - "locale/**"
|
||||
# - "website/**"
|
||||
|
||||
jobs:
|
||||
build:
|
|
@ -270,7 +270,7 @@ if (APPLE)
|
|||
--volicon ${CMAKE_SOURCE_DIR}/icons/macicon.icns \
|
||||
--icon \"${App_Name}\" 100 100
|
||||
--app-drop-link 300 100 \
|
||||
\"GoldenDict-${CMAKE_PROJECT_VERSION}-Qt${Qt6_VERSION}-macOS-${CMAKE_SYSTEM_PROCESSOR}.dmg\" \
|
||||
\"GoldenDict-ng-${CMAKE_PROJECT_VERSION}-Qt${Qt6_VERSION}-macOS-${CMAKE_SYSTEM_PROCESSOR}.dmg\" \
|
||||
\"${Assembling_Dir}\")"
|
||||
)
|
||||
else ()
|
||||
|
@ -353,7 +353,7 @@ if (WIN32)
|
|||
PATTERN "*.ilk" EXCLUDE)
|
||||
|
||||
|
||||
set(CPACK_PACKAGE_FILE_NAME "GoldenDict-${PROJECT_VERSION}-Qt${Qt6Widgets_VERSION}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "GoldenDict-ng-${PROJECT_VERSION}-Qt${Qt6Widgets_VERSION}")
|
||||
set(CPACK_GENERATOR "7Z;NSIS64")
|
||||
|
||||
# override the default install path, which is $PROGRAMFILES64\${project-name} ${project-version} in NSIS
|
||||
|
|
Loading…
Reference in a new issue