Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move clang-tidy checks back to Linux #7817

Merged
merged 4 commits into from
Aug 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,22 @@ jobs:
# a bit of a sluggard
check_clang_tidy:
name: Check clang-tidy
runs-on: macos-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
# Workaround for https://github.com/actions/setup-python/issues/577
- name: Clean up python binaries
run: |
rm -f /usr/local/bin/2to3*;
rm -f /usr/local/bin/idle3*;
rm -f /usr/local/bin/pydoc3*;
rm -f /usr/local/bin/python3*;
rm -f /usr/local/bin/python3*-config;
- name: Install clang-tidy
run: |
brew update
brew install llvm@16 ninja coreutils flatbuffers
# from apt.llvm.org
# wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 15CF4D18AF4F7421
sudo apt-add-repository "deb https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-16 main"
sudo apt-get update
sudo apt-get install llvm-16 clang-16 liblld-16-dev libclang-16-dev clang-tidy-16 ninja-build
- name: Run clang-tidy
run: |
export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++
export CLANG_TIDY_LLVM_INSTALL_DIR=/usr/local/opt/llvm
export CC=clang-16
export CXX=clang++-16
export CLANG_TIDY_LLVM_INSTALL_DIR=/usr/lib/llvm-16
export CMAKE_GENERATOR=Ninja
./run-clang-tidy.sh
check_cmake_file_lists:
Expand Down