switch to pip llvm #12
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 cmake gcc | |
- name: "Install clang/llvm" | |
run: | | |
pip install clang-format clang-tidy | |
- 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 -i | |
- name: "Clang tidy" | |
run: | | |
find cpp/src -type f | xargs clang-tidy |