Skip to content

Commit

Permalink
ci(clang-tidy-review): Fix for qt6 + swap to docker-ci container (#6860)
Browse files Browse the repository at this point in the history
* ci(clang-tidy-review): Fix for qt6 + swap to docker-ci container

Signed-off-by: Josh <josh.t.richards@gmail.com>

* fix: add OPENSSL_ROOT_DIR

Signed-off-by: Josh <josh.t.richards@gmail.com>

* fix: use clang-tidy-diff.py

Signed-off-by: Josh <josh.t.richards@gmail.com>

* fix: path to clang-tidy-diff.py -> clang-tidy-diff-15.py

Signed-off-by: Josh <josh.t.richards@gmail.com>

* fix: try to fix git usage

Signed-off-by: Josh <josh.t.richards@gmail.com>

* fix: LD_LIBRARY_PATH workaround for python in clang-tidy-pr-comments

Signed-off-by: Josh <josh.t.richards@gmail.com>

* fix: bump back to 1.4.3 clang-tidy-pr-comments to avoid workarounds

Signed-off-by: Josh <josh.t.richards@gmail.com>

* fix: wrap up after debugging this

Signed-off-by: Josh <josh.t.richards@gmail.com>

---------

Signed-off-by: Josh <josh.t.richards@gmail.com>
  • Loading branch information
joshtrichards authored Jul 21, 2024
1 parent 3767864 commit c19bf79
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,25 @@ on:

jobs:
clang-tidy:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.6.3-2
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install clang-tidy
run: |
sudo apt-get update
sudo apt-get install -y clang-tidy
sudo apt-get install -y ninja-build zlib1g-dev texlive-latex-base qtwebengine5-dev qttools5-dev-tools qttools5-dev qtquickcontrols2-5-dev qt5keychain-dev qtdeclarative5-dev qtbase5-dev python3-sphinx libssl-dev libsqlite3-dev libqt5websockets5-dev libqt5svg5-dev pkg-config libkf5archive-dev libcloudproviders-dev libcmocka-dev libdbus-1-dev qtbase5-private-dev qt5-qmake inkscape
- name: Prepare compile_commands.json
run: |
cmake -G Ninja -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1
cmake -G Ninja -B build -DCMAKE_PREFIX_PATH=/opt/qt6.6.3 -DQT_MAJOR_VERSION=6 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DOPENSSL_ROOT_DIR=/usr/local/lib64
cd build && ninja
- name: Create results directory
run: |
mkdir clang-tidy-result
- name: Analyze
run: |
git diff -U0 HEAD^ | clang-tidy-diff -checks='-*,modernize-use-auto,modernize-use-using,modernize-use-nodiscard,modernize-use-nullptr,modernize-use-override,cppcoreguidelines-pro-type-static-cast-downcast' -p1 -path build -export-fixes clang-tidy-result/fixes.yml
/usr/bin/git config --global --add safe.directory "$GITHUB_WORKSPACE"
/usr/bin/git diff -U0 HEAD^ | clang-tidy-diff-15.py -checks='-*,modernize-use-auto,modernize-use-using,modernize-use-nodiscard,modernize-use-nullptr,modernize-use-override,cppcoreguidelines-pro-type-static-cast-downcast' -p1 -path build -export-fixes clang-tidy-result/fixes.yml
- name: Run clang-tidy-pr-comments action
uses: platisd/clang-tidy-pr-comments@master
uses: platisd/clang-tidy-pr-comments@v1.4.3 # >1.4.3 switches to composite method w/ a forced python version and breaks things: https://github.com/actions/setup-python/issues/871
with:
# The GitHub token (or a personal access token)
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit c19bf79

Please sign in to comment.