Skip to content

Commit

Permalink
Merge pull request #1773 from xiaoyifang/staged
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlebantongying authored Sep 13, 2024
2 parents ecd1138 + 15abc89 commit 316ec90
Show file tree
Hide file tree
Showing 390 changed files with 71,421 additions and 108,672 deletions.
19 changes: 13 additions & 6 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
# https://clang.llvm.org/extra/clang-tidy/
---
Checks: >
-*
-*,
bugprone-*,
cert-*,
clang-analyzer-*,
clang-diagnostic-*,
concurrency-*,
cppcoreguidelines-*,
google-*,
hicpp-*,
misc-*,
modernize-*,
objc-*,
performance-*,
portability-*,
readability-*,
-bugprone-easily-swappable-parameters,
-bugprone-reserved-identifier,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-type-cstyle-cast,
-cppcoreguidelines-pro-type-reinterpret-cast,
-google-default-arguments,
-misc-non-private-member-variables-in-classes,
-google-readability-casting,
-hicpp-deprecated-headers,
-misc-const-correctness,
-misc-non-private-member-variables-in-classes,
-modernize-avoid-c-arrays,
# -modernize-use-auto,
-modernize-deprecated-headers,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-readability-magic-numbers,
-google-readability-braces-around-statements,
-readability-braces-around-statements,
-readability-identifier-length,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-magic-numbers,
CheckOptions:
- key: modernize-loop-convert.MinConfidence
value: reasonable
Expand Down
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
7 changes: 7 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@

# reformat everything commit
b5349478cfb0dc2dd0de8c8e8aeebdd24cf7ac6b

# reformat every .js .css
534d8c2e96ef00ae03650c2185d7b240ea5a1114

# replace QVector & QPair
3273f39dd73f4dba07fa95be2be74061f2690b2c
44853544f850e1de90b341780168c04d089c37a1
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
92 changes: 0 additions & 92 deletions .github/scripts/windows-publish.ps1

This file was deleted.

109 changes: 109 additions & 0 deletions .github/workflows/PR-check-cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Build Check
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
branches:
- dev
- master
- experimental
- staged
jobs:
job_ubuntu_build_check:
name: ubuntu Build and analyze
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:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: false
- name: Run build
run: |
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
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:
- name: Install Qt
uses: jurplel/install-qt-action@v4
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: Run build
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
cmake -S . -B "./build_dir" `
-G Ninja `
-DWITH_VCPKG_BREAKPAD=ON `
-DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" `
-DWITH_FFMPEG_PLAYER=OFF
cmake --build "./build_dir"
55 changes: 20 additions & 35 deletions .github/workflows/Sonar Cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,62 +6,47 @@ on:
workflow_dispatch:
push:
branches:
- dev
- staged

pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.5.1
arch: gcc_64

#serialport linuxdeploy need serialport to work.
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech qtserialport

- 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 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 install openjdk-17-jdk openjdk-17-jre
java -version
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: true
- uses: actions/setup-node@v4
with:
node-version: 18
submodules: true
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Run build-wrapper
run: |
qmake CONFIG+=release CONFIG+=zim_support CONFIG+=chinese_conversion_support
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make -j8
mkdir build_dir
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -S . -B ./build_dir -G Ninja
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
sonar-scanner --define sonar.cfamily.compile-commands=./build_dir/compile_commands.json
Loading

0 comments on commit 316ec90

Please sign in to comment.