Simplify clang-format setup and fix npm warning

This commit is contained in:
Mario Zechner 2025-07-16 04:30:46 +02:00
parent a0a86af560
commit b035b12272
2 changed files with 8 additions and 7 deletions

View File

@ -11,17 +11,18 @@ jobs:
- uses: actions/checkout@v3
- name: Install clang-format 18
- name: Setup clang-format
run: |
# Install clang-format-18 from LLVM apt repository
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-18 main" | sudo tee /etc/apt/sources.list.d/llvm.list
# Ubuntu 24.04 has clang-format-18 in its default repos
sudo apt-get update
sudo apt-get install -y clang-format-18
# Create symlink
# Make clang-format-18 the default clang-format
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-18 100
# Verify version
# Verify we're using the right version
which clang-format
clang-format --version
# Double check the actual path
ls -la /usr/bin/clang-format*
- name: Install dotnet
uses: actions/setup-dotnet@v3

View File

@ -23,7 +23,7 @@ npm run format
popd > /dev/null
pushd ../tests > /dev/null
npm run format -r
npm run format
popd > /dev/null
# Return to original directory