Develop #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: clang-tidy-review | |
on: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
BUILD_TYPE: [Release, Debug] | |
# 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 | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 | |
# Run clang-tidy | |
- uses: ZedThree/[email protected] | |
env: | |
RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon | |
id: review | |
with: | |
split_workflow: true | |
clang_tidy_checks: '' | |
# 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. -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 |