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

Add clang-tidy workflow #3403

Merged
merged 9 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and test
name: CI

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate API Coverage
name: Coverage

on:
workflow_dispatch:
Expand Down
38 changes: 36 additions & 2 deletions .github/workflows/clang_format.yml → .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Clang Format

name: C++
on:
workflow_dispatch:
push:
Expand Down Expand Up @@ -30,3 +29,38 @@ jobs:
run: |
find . -name "*.h" -o -name "*.c" -o -name "*.cpp" -o -name "*.mm" | xargs clang-format-19 --style=file --fallback-style=none --Werror --dry-run
find cpp -name "*.m" | xargs clang-format-19 --style=file --fallback-style=none --Werror --dry-run

clang-tidy:
runs-on: ubuntu-latest
steps:
- name: Install clang-tidy
run: |
# This LLVM script will add the relevant LLVM PPA: https://apt.llvm.org/
wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh
chmod +x /tmp/llvm.sh
sudo /tmp/llvm.sh 19
sudo apt-get install -y clang-tidy-19
rm /tmp/llvm.sh
clang-tidy-19 --version

- name: Install bear
run: |
sudo apt-get update
sudo apt-get install -y bear
bear --version

- name: Checkout Ice
uses: actions/checkout@v4

- name: Setup Ice Build Dependencies
uses: ./.github/actions/setup-dependencies

- name: Build Ice
timeout-minutes: 90
working-directory: cpp
run: bear -- make

- name: Run Clang Tidy
working-directory: cpp
run: |
run-clang-tidy-19 -j$(nproc) -quiet src/Ice
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: dotnet format
name: .NET

on:
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: JavaScript Prettier
name: JavaScript

on:
push:
Expand All @@ -8,7 +8,7 @@ on:
branches: ["main"]

jobs:
js-prettier:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -17,7 +17,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
node-version: "latest"

- name: Run JavaScript prettier
run: npx prettier --check .
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Matlab Analyzer
name: Matlab

on:
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ruff.yml → .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python lint and format
name: Python

on:
workflow_dispatch:
Expand All @@ -9,7 +9,7 @@ on:
branches: ["main"]

jobs:
ruff-lint:
ruff:
name: Ruff check
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Swift Format
name: Swift

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/whitespace.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Whitespace validation
name: Whitespace

on:
workflow_dispatch:
Expand Down
Loading