Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge staged into dev #1658

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 87 additions & 104 deletions .github/workflows/PR-check-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
steps:
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Qt
uses: jurplel/install-qt-action@v3
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
run: |
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:
# 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
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: false
- name: Run build
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
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: Run build-wrapper
- name: Install dependencies
run: |
cmake .
cmake --build .
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'
steps:
- 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
# Launch-VsDevShell also provides Ninja
& 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1' `
-SkipAutomaticLocation -Arch amd64 -HostArch amd64

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 .

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 changes: 3 additions & 3 deletions .github/workflows/release-macos-homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-windows-vcpkg-cmake.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Windows Vcpkg CMake
name: Release Windows CMake
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -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}}

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: Windows-PR-check
name: Windows-qmake-PR-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/**"
- "website/**"
# pull_request:
# branches:
# - dev
# - master
# - experimental
# - staged
# paths-ignore:
# - 'docs/**'
# # - ".github/**"
# - "howto/**"
# - "*.md"
# - "locale/**"
# - "website/**"

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down Expand Up @@ -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
Expand Down
Loading