Skip to content

Commit d7bac6f

Browse files
committed
CI: add clang-tidy.yml
1 parent b8e3808 commit d7bac6f

File tree

9 files changed

+229
-23
lines changed

9 files changed

+229
-23
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ jobs:
144144
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-file ${{github.workspace}}/Note.md
145145
gh release upload ${{ github.ref_name }} ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/Note.md ${{github.workspace}}/update.json
146146
147-
- name: clean test tag
148-
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
149-
continue-on-error: true
150-
run: |
151-
gh release delete test_${{ github.ref_name }} -y --cleanup-tag
152-
153-
- name: Upload test tag To Github Release
154-
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
155-
run: |
156-
gh release create test_${{ github.ref_name }} --prerelease --latest=false --title "Recently developed build - ${{ github.ref_name }}" --notes-file ${{github.workspace}}/Note.md
157-
gh release upload test_${{ github.ref_name }} ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/Note.md ${{github.workspace}}/update.json --clobber
147+
# - name: clean test tag
148+
# if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
149+
# continue-on-error: true
150+
# run: |
151+
# gh release delete test_${{ github.ref_name }} -y --cleanup-tag
152+
153+
# - name: Upload test tag To Github Release
154+
# if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
155+
# run: |
156+
# gh release create test_${{ github.ref_name }} --prerelease --latest=false --title "Recently developed build - ${{ github.ref_name }}" --notes-file ${{github.workspace}}/Note.md
157+
# gh release upload test_${{ github.ref_name }} ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/Note.md ${{github.workspace}}/update.json --clobber
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Post clang-tidy review comments
2+
3+
on:
4+
workflow_run:
5+
workflows: ["clang-tidy-review"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
pull-requests: write
11+
issues: write
12+
checks: write
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: ZedThree/clang-tidy-review/[email protected]
20+
# lgtm_comment_body, max_comments, and annotations need to be set on the posting workflow in a split setup
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
annotations: false
24+
max_comments: 10

.github/workflows/clang-tidy.yml

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
name: clang-tidy-review
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
env:
8+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
9+
10+
jobs:
11+
build_ubuntu:
12+
strategy:
13+
matrix:
14+
BUILD_TYPE: [Release]
15+
16+
# See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
17+
# See: https://github.com/actions/runner-images/
18+
runs-on: ubuntu-latest
19+
20+
env:
21+
BUILD_TYPE: ${{matrix.BUILD_TYPE}}
22+
SOURCE_DIR: ${{github.workspace}}/.cache/source
23+
TOOSL_DIR: ${{github.workspace}}/.cache/tools
24+
INSTALL_DIR: ${{github.workspace}}/.cache/install
25+
26+
steps:
27+
- name: Checkout Repository
28+
uses: actions/checkout@v3
29+
with:
30+
submodules: true
31+
32+
- name: Make directories
33+
run: |
34+
cmake -E make_directory ${{github.workspace}}/build
35+
cmake -E make_directory ${{env.SOURCE_DIR}}
36+
cmake -E make_directory ${{env.TOOSL_DIR}}
37+
cmake -E make_directory ${{env.INSTALL_DIR}}
38+
39+
- name: git clone RabbitCommon
40+
working-directory: ${{env.SOURCE_DIR}}
41+
run: |
42+
git clone https://github.com/KangLin/RabbitCommon.git
43+
44+
- name: Cache installed
45+
uses: actions/cache@v3
46+
id: cache-installed
47+
with:
48+
path: |
49+
${{env.INSTALL_DIR}}
50+
key: install_ubuntu_${{matrix.BUILD_TYPE}}
51+
52+
- name: build FreeRDP
53+
if: false
54+
working-directory: ${{env.SOURCE_DIR}}
55+
run: |
56+
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/FreeRDP3 ]; then
57+
git clone -b 3.8.0 --depth=1 https://github.com/FreeRDP/FreeRDP.git
58+
# git clone https://github.com/KangLin/FreeRDP.git
59+
cd FreeRDP
60+
git submodule update --init --recursive
61+
cmake -E make_directory build
62+
cd build
63+
cmake .. \
64+
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \
65+
-DCMAKE_INSTALL_PREFIX="${{env.INSTALL_DIR}}" \
66+
-DWITH_SERVER=ON \
67+
-DWITH_CLIENT_SDL=OFF \
68+
-DWITH_KRB5=OFF \
69+
-DWITH_MANPAGES=OFF
70+
cmake --build . --parallel $(nproc) --config ${{matrix.BUILD_TYPE}}
71+
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
72+
fi
73+
74+
- name: build RabbitVNC
75+
if: false
76+
working-directory: ${{env.SOURCE_DIR}}
77+
run: |
78+
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/RabbitVNC ]; then
79+
git clone --depth=1 https://github.com/KangLin/RabbitVNC.git
80+
cd ${{env.SOURCE_DIR}}/RabbitVNC
81+
cmake -E make_directory build
82+
cd build
83+
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
84+
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
85+
-DBUILD_TESTS=OFF -DBUILD_VIEWER=OFF
86+
cmake --build . --parallel $(nproc) --config ${{ matrix.BUILD_TYPE }}
87+
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
88+
fi
89+
90+
- name: build tigervnc
91+
#if: ${{ matrix.BUILD_TYPE == 'Debug'}}
92+
working-directory: ${{env.SOURCE_DIR}}
93+
run: |
94+
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/tigervnc ]; then
95+
git clone --depth=1 https://github.com/KangLin/tigervnc.git
96+
cd ${{env.SOURCE_DIR}}/tigervnc
97+
cmake -E make_directory build
98+
cd build
99+
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
100+
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
101+
-DBUILD_TESTS=OFF -DBUILD_VIEWER=OFF
102+
cmake --build . --parallel $(nproc) --config ${{ matrix.BUILD_TYPE }}
103+
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
104+
fi
105+
106+
- name: build libdatachannel
107+
working-directory: ${{env.SOURCE_DIR}}
108+
if: false
109+
run: |
110+
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/LibDataChannel ]; then
111+
git clone -b v0.22.2 --depth=1 https://github.com/paullouisageneau/libdatachannel.git
112+
cd libdatachannel
113+
git submodule update --init --recursive
114+
cmake -E make_directory build
115+
cd build
116+
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }}
117+
cmake --build . --parallel $(nproc) --config ${{ matrix.BUILD_TYPE }}
118+
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
119+
fi
120+
121+
- name: build QtService
122+
working-directory: ${{env.SOURCE_DIR}}
123+
run: |
124+
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/QtService ]; then
125+
git clone --depth=1 https://github.com/KangLin/qt-solutions.git
126+
cd qt-solutions/qtservice
127+
git submodule update --init --recursive
128+
cmake -E make_directory build
129+
cd build
130+
export Qt6_DIR=/usr/lib/`uname -a`-linux-gnu/cmake/Qt6
131+
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
132+
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }}
133+
cmake --build . --parallel $(nproc) --config ${{ matrix.BUILD_TYPE }}
134+
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
135+
fi
136+
137+
- name: pcapplusplus
138+
working-directory: ${{env.SOURCE_DIR}}
139+
run: |
140+
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/pcapplusplus ]; then
141+
git clone -b v24.09 --depth=1 https://github.com/seladb/PcapPlusPlus.git
142+
cd PcapPlusPlus
143+
cmake -E make_directory build
144+
cd build
145+
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
146+
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
147+
-DPCAPPP_BUILD_EXAMPLES=OFF \
148+
-DPCAPPP_BUILD_TESTS=OFF \
149+
-DPCAPPP_BUILD_TUTORIALS=OFF
150+
cmake --build . --parallel $(nproc) --config ${{ matrix.BUILD_TYPE }}
151+
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
152+
fi
153+
154+
# Run clang-tidy
155+
- uses: ZedThree/[email protected]
156+
env:
157+
RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon
158+
id: review
159+
with:
160+
split_workflow: true
161+
clang_tidy_checks: ''
162+
lgtm_comment_body: 'clang-tidy review says "All clean, LGTM! 👍"'
163+
# List of packages to install
164+
apt_packages: cmake build-essential xvfb xpra libgl1-mesa-dev libglx-dev libglu1-mesa-dev libvulkan-dev cmake debhelper fakeroot graphviz qt6-tools-dev qt6-tools-dev-tools qt6-base-dev qt6-base-dev-tools qt6-qpa-plugins libqt6svg6-dev qt6-l10n-tools qt6-translations-l10n qt6-scxml-dev qt6-multimedia-dev libqt6serialport6-dev libxkbcommon-dev libxkbcommon-x11-dev xorg-dev libx11-xcb-dev libx11-dev libxfixes-dev libxcb-randr0-dev libxcb-shm0-dev libxcb-cursor0 libxcb-xinerama0-dev libxcb-composite0-dev libxcomposite-dev libxinerama-dev libxcb1-dev libx11-xcb-dev libxcb-xfixes0-dev libpixman-1-dev libpam0g-dev libutf8proc-dev libfuse3-dev libusb-1.0-0-dev libvncserver-dev libssh-dev libtelnet-dev freerdp2-dev libpcap-dev libcups2-dev libavcodec-dev libavformat-dev libresample1-dev libswscale-dev libcmark-dev
165+
# CMake command to run in order to generate compile_commands.json
166+
build_dir: tidy
167+
cmake_command: cmake -Btidy -S. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_FIND_ROOT_PATH=${{env.INSTALL_DIR}} -DRabbitCommon_ROOT=${{env.SOURCE_DIR}}/RabbitCommon -DCMARK_SHARED=OFF -DCMARK_TESTS=OFF -DCMARK_STATIC=ON -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}}
168+
169+
# Uploads an artefact containing clang_fixes.json
170+
- uses: ZedThree/clang-tidy-review/[email protected]
171+
id: upload-review

.github/workflows/msvc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ jobs:
206206
-T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^
207207
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
208208
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" ^
209+
-DCMAKE_FIND_ROOT_PATH=${{env.INSTALL_DIR}} ^
209210
-DBUILD_TESTS=OFF -DBUILD_VIEWER=OFF ^
210211
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" ^
211212
-DVCPKG_VERBOSE=ON ^

.github/workflows/ubuntu.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ jobs:
107107
libfuse3-dev libusb-1.0-0-dev \
108108
libvncserver-dev libssh-dev libtelnet-dev freerdp2-dev \
109109
libpcap-dev libcups2-dev \
110-
libavcodec-dev libavformat-dev libresample1-dev libswscale-dev
110+
libavcodec-dev libavformat-dev libresample1-dev libswscale-dev \
111+
libcmark-dev
111112
112113
- name: Cache installed
113114
uses: actions/cache@v3

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,11 @@ It include remote desktop, remote terminal, player etc remote control functions.
7474
- [x] Unix/Linux
7575
- [x] [Android](https://doc.qt.io/qt-6/android.html)
7676
- [x] mac os
77-
- [ ] IPHONE
78-
- [ ] WINCE
7977

80-
See: [Qt5](https://doc.qt.io/qt-5/supported-platforms.html), [Qt6](https://doc.qt.io/qt-6/supported-platforms.html)
78+
See: [Qt5](https://doc.qt.io/qt-5/supported-platforms.html),
79+
[Qt6](https://doc.qt.io/qt-6/supported-platforms.html)
8180

82-
I have no devices so I did not compile and test. Please test by yourself if you have devices.
81+
I have no the mac devices so I did not compile and test. Please test by yourself if you have devices.
8382
Interested and capable friends are welcome to participate in the development of the project.
8483

8584
If you want to donate the developed devices for me, please contact: (email: [email protected])
@@ -239,6 +238,10 @@ If it cannot be displayed, please open:
239238
- https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png
240239
- https://sourceforge.net/p/rabbitcommon/code/ci/master/tree/Src/Resource/image/Contribute.png
241240

241+
Contact me:
242+
243+
- [jami](https://jami.net): eddacfd6c7b70b258e511e812ffab7d3490396fa
244+
242245
## Contribution
243246

244247
- [Mailing list](https://sourceforge.net/p/rabbitremotecontrol/mailman/)
@@ -247,7 +250,8 @@ If it cannot be displayed, please open:
247250
- [Issues](https://github.com/KangLin/RabbitRemoteControl/issues)
248251
- [![Join the chat at https://gitter.im/RabbitRemoteControl/community](https://badges.gitter.im/RabbitRemoteControl/community.svg)](https://gitter.im/RabbitRemoteControl/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
249252
- [Discussions](https://github.com/KangLin/RabbitRemoteControl/discussions)
250-
- [Contributors](https://github.com/KangLin/RabbitRemoteControl/graphs/contributors): Thank [Contributors](https://github.com/KangLin/RabbitRemoteControl/graphs/contributors)
253+
- [Contributors](https://github.com/KangLin/RabbitRemoteControl/graphs/contributors):
254+
Thank [Contributors](https://github.com/KangLin/RabbitRemoteControl/graphs/contributors)
251255

252256
If you're wondering how could you help, fear not, there are plenty of ways:
253257

README_zh_CN.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,11 @@
7373
- [x] Unix/Linux
7474
- [x] [Android](https://doc.qt.io/qt-6/android.html)
7575
- [x] mac os
76-
- [ ] IPHONE
77-
- [ ] WINCE
7876

79-
详见:[Qt5 支持平台](https://doc.qt.io/qt-5/supported-platforms.html)[Qt6 支持平台](https://doc.qt.io/qt-6/supported-platforms.html)
77+
详见:[Qt5 支持平台](https://doc.qt.io/qt-5/supported-platforms.html)
78+
[Qt6 支持平台](https://doc.qt.io/qt-6/supported-platforms.html)
8079

81-
未选中的操作系统是因为本人没有设备,所以没有做编译与测试。请有设备的朋友自行测试。
80+
因为本人没有 mac 设备,所以没有做编译与测试。请有设备的朋友自行测试。
8281
欢迎有兴趣,有能力的朋友参与项目的开发。
8382

8483
如果你想为本人捐赠开发设备,请联系:[email protected]
@@ -238,6 +237,10 @@
238237
- https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png
239238
- https://sourceforge.net/p/rabbitcommon/code/ci/master/tree/Src/Resource/image/Contribute.png
240239

240+
联系:
241+
242+
- [jami](https://jami.net): eddacfd6c7b70b258e511e812ffab7d3490396fa
243+
241244
## 贡献
242245

243246
- [邮件列表](https://sourceforge.net/p/rabbitremotecontrol/mailman/)
@@ -246,7 +249,8 @@
246249
- [问题](https://github.com/KangLin/RabbitRemoteControl/issues)
247250
- [![加入聊天 https://gitter.im/RabbitRemoteControl/community](https://badges.gitter.im/RabbitRemoteControl/community.svg)](https://gitter.im/RabbitRemoteControl/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
248251
- [讨论](https://github.com/KangLin/RabbitRemoteControl/discussions)
249-
- [贡献者](https://github.com/KangLin/RabbitRemoteControl/graphs/contributors): 感谢[贡献者](https://github.com/KangLin/RabbitRemoteControl/graphs/contributors)
252+
- [贡献者](https://github.com/KangLin/RabbitRemoteControl/graphs/contributors):
253+
感谢[贡献者](https://github.com/KangLin/RabbitRemoteControl/graphs/contributors)
250254

251255
如果您想知道如何提供帮助,不要害怕,有很多方法:
252256

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Section: main
55
Priority: optional
66
Maintainer: Kang Lin <[email protected]>
77
Build-Depends: debhelper(>= 13), debhelper-compat (=13), fakeroot, cmake(>=3.21),
8-
libssl-dev, libcmark-dev, rabbitcommon-dev(>=2.2.6),
8+
libssl-dev, libcmark-dev, rabbitcommon-dev(>=2.3.1),
99
qt6-tools-dev, qt6-tools-dev-tools,
1010
qt6-base-dev, qt6-base-dev-tools, qt6-qpa-plugins, qt6-l10n-tools,
1111
qt6-translations-l10n, qt6-scxml-dev, qt6-multimedia-dev,

deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ CHANGLOG_TMP=${SOURCE_DIR}/debian/changelog.tmp
6969
CHANGLOG_FILE=${SOURCE_DIR}/debian/changelog
7070
echo "rabbitremotecontrol (${DEBIAN_VERSION}) unstable; urgency=medium" > ${CHANGLOG_FILE}
7171
echo "" >> ${CHANGLOG_FILE}
72+
echo " * Full Changelog: [${PRE_TAG}..${VERSION}](https://github.com/KangLin/RabbitRemoteControl/compare/${PRE_TAG}..${VERSION})" >> ${CHANGLOG_FILE}
7273
#echo "`git log --pretty=format:' * %s' ${PRE_TAG}..HEAD`" >> ${CHANGLOG_FILE}
7374
echo "" >> ${CHANGLOG_FILE}
7475
echo " -- `git log --pretty=format:'%an <%ae>' HEAD^..HEAD` `date --rfc-email`" >> ${CHANGLOG_FILE}

0 commit comments

Comments
 (0)