Move to clang-format 15 (#621)
The current version requires clang-format-9. This now getting hard to get. This commit moves it to the clang-format-15, which is the latest in 22.04. Also, updates clang-tidy to 15 as well.
This commit is contained in:
committed by
GitHub
parent
cdfedd8718
commit
9d4466093a
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
@@ -400,12 +400,14 @@ jobs:
|
||||
|
||||
# Job to run clang-format and report errors
|
||||
format:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
# We don't need to do the build for this job, but we need to configure it to get the clang-format target
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install clang-tidy and clang-format
|
||||
run: sudo apt install clang-tidy-9 clang-format-9
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install clang-tidy-15 clang-format-15
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{github.workspace}}/build -DSNMALLOC_USE_CXX17=ON
|
||||
# Run the clang-format check and error if it generates a diff
|
||||
@@ -417,7 +419,7 @@ jobs:
|
||||
git diff --exit-code
|
||||
- name: Run clang-tidy
|
||||
run: |
|
||||
clang-tidy-9 src/snmalloc/override/malloc.cc -header-filter="`pwd`/*" -warnings-as-errors='*' -export-fixes=tidy.fail -- -std=c++17 -mcx16 -DSNMALLOC_PLATFORM_HAS_GETENTROPY=0
|
||||
clang-tidy-15 src/snmalloc/override/malloc.cc -header-filter="`pwd`/*" -warnings-as-errors='*' -export-fixes=tidy.fail -- -std=c++17 -mcx16 -DSNMALLOC_PLATFORM_HAS_GETENTROPY=0
|
||||
if [ -f tidy.fail ] ; then
|
||||
cat tidy.fail
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user