mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2026-09-22 08:58:54 +00:00
CI: fix clang-tidy job
This commit is contained in:
+24
-25
@@ -130,35 +130,34 @@ jobs:
|
|||||||
exclude-regex: '(libs\/gsl\/)|(tmpl)|(cpu_features)|^.*\.(cu)$'
|
exclude-regex: '(libs\/gsl\/)|(tmpl)|(cpu_features)|^.*\.(cu)$'
|
||||||
|
|
||||||
clang-tidy:
|
clang-tidy:
|
||||||
runs-on: macos-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
CLANG_VERSION: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-python@v6
|
- name: Install dependencies
|
||||||
with:
|
|
||||||
python-version: '3.12'
|
|
||||||
- name: install dependencies
|
|
||||||
run: |
|
run: |
|
||||||
brew update
|
sudo apt update
|
||||||
rm /usr/local/bin/2to3 || true
|
sudo apt install -y --no-install-recommends cmake \
|
||||||
rm /usr/local/bin/idle3 || true
|
clang-${CLANG_VERSION} clang-tidy-${CLANG_VERSION} clang-format-${CLANG_VERSION} \
|
||||||
rm /usr/local/bin/pydoc3 || true
|
libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev \
|
||||||
rm /usr/local/bin/python3 || true
|
libboost-thread-dev libboost-chrono-dev libboost-serialization-dev \
|
||||||
rm /usr/local/bin/python3-config || true
|
liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev \
|
||||||
rm /usr/local/bin/2to3-3.1* || true
|
liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libunwind-dev \
|
||||||
rm /usr/local/bin/idle3.1* || true
|
libgnutls-openssl-dev libmatio-dev googletest protobuf-compiler libprotobuf-dev \
|
||||||
rm /usr/local/bin/pydoc3.1* || true
|
python3-mako liborc-0.4-dev
|
||||||
rm /usr/local/bin/python3.1* || true
|
sudo ln -sf /usr/lib/llvm-${CLANG_VERSION}/bin/clang /usr/bin/clang
|
||||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
sudo ln -sf /usr/lib/llvm-${CLANG_VERSION}/bin/clang /usr/bin/clang++
|
||||||
brew link --overwrite python@3.12
|
sudo ln -sf /usr/lib/llvm-${CLANG_VERSION}/bin/clang-format /usr/bin/clang-format
|
||||||
brew install ninja pkg-config hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf llvm boost
|
sudo ln -sf /usr/lib/llvm-${CLANG_VERSION}/bin/clang-tidy /usr/bin/clang-tidy
|
||||||
pip3 install mako
|
sudo ln -sf /usr/lib/llvm-${CLANG_VERSION}/bin/run-clang-tidy /usr/bin/run-clang-tidy
|
||||||
ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin
|
|
||||||
ln -s $(brew --prefix llvm)/bin/clang-apply-replacements /usr/local/bin
|
|
||||||
ln -s $(brew --prefix llvm)/bin/run-clang-tidy.py /usr/local/bin
|
|
||||||
- name: Prepare run
|
- name: Prepare run
|
||||||
run: cmake -S . -B build && cmake --build build --target volk_gnsssdr_module gtest-1.17.0 core_monitor core_libs pvt_libs
|
run: |
|
||||||
- name: run clang-tidy
|
cmake -S . -B build-tidy -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang
|
||||||
run: cd build && /opt/homebrew/opt/llvm/bin/run-clang-tidy -fix
|
cmake --build build-tidy --target volk_gnsssdr_module gtest-1.17.0 core_monitor core_libs pvt_libs
|
||||||
|
- name: Run clang-tidy
|
||||||
|
run: |
|
||||||
|
cd build-tidy && run-clang-tidy -fix
|
||||||
- name: check
|
- name: check
|
||||||
run: |
|
run: |
|
||||||
git diff > clang_tidy.patch
|
git diff > clang_tidy.patch
|
||||||
|
|||||||
Reference in New Issue
Block a user