Skip to content

Develop

Develop #12

Workflow file for this run

name: clang-tidy-review
on:
pull_request:
branches: [ master ]
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
build_ubuntu:
strategy:
matrix:
BUILD_TYPE: [Release]
# See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
# See: https://github.com/actions/runner-images/
runs-on: ubuntu-latest
env:
BUILD_TYPE: ${{matrix.BUILD_TYPE}}
SOURCE_DIR: ${{github.workspace}}/.cache/source
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install
RabbitRemoteControl_VERSION: 0.0.29
artifact_name: build_ubuntu
# Map the job outputs to step outputs
outputs:
name: ${{ env.artifact_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
- name: Make directories
run: |
cmake -E make_directory ${{github.workspace}}/build
cmake -E make_directory ${{env.SOURCE_DIR}}
cmake -E make_directory ${{env.TOOSL_DIR}}
cmake -E make_directory ${{env.INSTALL_DIR}}
- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
run: |
git clone https://github.com/KangLin/RabbitCommon.git
- name: Install apt packages
run: |
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt install -y -q 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
- name: Cache installed
uses: actions/cache@v3
id: cache-installed
with:
path: |
${{env.INSTALL_DIR}}
key: install_ubuntu_${{matrix.BUILD_TYPE}}
- name: build FreeRDP
if: false
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/FreeRDP3 ]; then
git clone -b 3.8.0 --depth=1 https://github.com/FreeRDP/FreeRDP.git
# git clone https://github.com/KangLin/FreeRDP.git
cd FreeRDP
git submodule update --init --recursive
cmake -E make_directory build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX="${{env.INSTALL_DIR}}" \
-DWITH_SERVER=ON \
-DWITH_CLIENT_SDL=OFF \
-DWITH_KRB5=OFF \
-DWITH_MANPAGES=OFF
cmake --build . --parallel $(nproc) --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
fi
- name: build RabbitVNC
if: false
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/RabbitVNC ]; then
git clone --depth=1 https://github.com/KangLin/RabbitVNC.git
cd ${{env.SOURCE_DIR}}/RabbitVNC
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DBUILD_TESTS=OFF -DBUILD_VIEWER=OFF
cmake --build . --parallel $(nproc) --config ${{ matrix.BUILD_TYPE }}
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
fi
- name: build tigervnc
#if: ${{ matrix.BUILD_TYPE == 'Debug'}}
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/tigervnc ]; then
git clone --depth=1 https://github.com/KangLin/tigervnc.git
cd ${{env.SOURCE_DIR}}/tigervnc
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DBUILD_TESTS=OFF -DBUILD_VIEWER=OFF
cmake --build . --parallel $(nproc) --config ${{ matrix.BUILD_TYPE }}
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
fi
- name: build libdatachannel
working-directory: ${{env.SOURCE_DIR}}
if: false
run: |
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/LibDataChannel ]; then
git clone -b v0.22.2 --depth=1 https://github.com/paullouisageneau/libdatachannel.git
cd libdatachannel
git submodule update --init --recursive
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }}
cmake --build . --parallel $(nproc) --config ${{ matrix.BUILD_TYPE }}
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
fi
- name: build QtService
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/QtService ]; then
git clone --depth=1 https://github.com/KangLin/qt-solutions.git
cd qt-solutions/qtservice
git submodule update --init --recursive
cmake -E make_directory build
cd build
export Qt6_DIR=/usr/lib/`uname -a`-linux-gnu/cmake/Qt6
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }}
cmake --build . --parallel $(nproc) --config ${{ matrix.BUILD_TYPE }}
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
fi
- name: pcapplusplus
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -d ${{env.INSTALL_DIR}}/lib/cmake/pcapplusplus ]; then
git clone -b v24.09 --depth=1 https://github.com/seladb/PcapPlusPlus.git
cd PcapPlusPlus
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DPCAPPP_BUILD_EXAMPLES=OFF \
-DPCAPPP_BUILD_TESTS=OFF \
-DPCAPPP_BUILD_TUTORIALS=OFF
cmake --build . --parallel $(nproc) --config ${{ matrix.BUILD_TYPE }}
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
fi
# Run clang-tidy
- uses: ZedThree/[email protected]
env:
RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon
id: review
with:
split_workflow: true
clang_tidy_checks: ''
lgtm_comment_body: "All clean, LGTM! 👍"
# List of packages to install
#apt_packages: 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
# CMake command to run in order to generate compile_commands.json
build_dir: tidy
cmake_command: cmake -Btidy -S. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMARK_SHARED=OFF -DCMARK_TESTS=OFF -DCMARK_STATIC=ON -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }}
# Uploads an artefact containing clang_fixes.json
- uses: ZedThree/clang-tidy-review/[email protected]
id: upload-review