fix llvm/clang version to 18 #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Lint" | |
on: | |
push: | |
pull_request: | |
workflow_call: | |
permissions: | |
contents: "read" | |
jobs: | |
go-lint: | |
strategy: | |
matrix: | |
go: ["1.22"] | |
os: ["ubuntu-latest", "macos-latest"] | |
runs-on: "${{ matrix.os }}" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Setup Go" | |
uses: "actions/setup-go@v5" | |
with: | |
go-version: "${{ matrix.go }}" | |
- name: "Lint go code" | |
uses: "golangci/golangci-lint-action@v6" | |
with: | |
version: "v1.59" | |
cpp-lint: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest"] | |
runs-on: "${{ matrix.os }}" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
with: | |
submodules: "recursive" | |
- name: "Macos: install clang/llvm" | |
if: "${{ matrix.os == 'macos-latest' }}" | |
run: | | |
brew update | |
brew install llvm@18 | |
- name: "Linux: install clang/llvm" | |
if: "${{ matrix.os == 'ubuntu-latest' }}" | |
run: | | |
curl --proto "=https" --tlsv1.2 -sSf https://apt.llvm.org/llvm.sh | | |
sudo bash -s -- 18 all | |
- name: "Build for compile commands.json" | |
run: | | |
cmake -S cpp/ -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 | |
ln -s build/compile_commands.json . | |
- name: "Clang format" | |
run: | | |
find cpp/src -type f | xargs clang-format-18 -i | |
- name: "Clang tidy" | |
run: | | |
find cpp/src -type f | xargs clang-tidy-18 |