Skip to content

Commit aa417d4

Browse files
committed
fix: add required=True and update test.yml
1 parent dd6befe commit aa417d4

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

.github/workflows/test.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -147,39 +147,48 @@ jobs:
147147
clang-apply-replacements-${{ matrix.version }} --version
148148
fi
149149
150-
- name: Install clang-tools wheels
151-
if: matrix.version >= 13 # Only versions 13 and above have wheels
152-
run: |
153-
clang-tools-wheel --tool clang-format --version ${{ matrix.version }}
154-
clang-tools-wheel --tool clang-tidy --version ${{ matrix.version }}
155-
156-
- name: Check clang-tools wheels
157-
if: matrix.version >= 13
150+
- name: Install and check clang-format wheels
158151
shell: bash
159152
run: |
160153
set -e
161-
echo "Checking clang-format and clang-tidy versions..."
154+
clang-tools-wheel --tool clang-format --version ${{ matrix.version }}
155+
156+
echo "Checking clang-format versions..."
162157
clang-format --version
163-
clang-tidy --version
164158
165159
# Verify versions contain expected string
166160
clang_format_version=$(clang-format --version)
167-
clang_tidy_version=$(clang-tidy --version)
168161
169162
echo "clang-format version: $clang_format_version"
170-
echo "clang-tidy version: $clang_tidy_version"
171163
172164
if ! echo "$clang_format_version" | grep -q "version ${{ matrix.version }}"; then
173165
echo "❌ Unexpected clang-format version!"
174166
exit 1
175167
fi
176168
169+
echo "✅ clang-format Versions are correct."
170+
171+
- name: Install and check clang-tidy wheels
172+
if: matrix.version >= 13 # Only versions 13 and above have wheels
173+
shell: bash
174+
run: |
175+
set -e
176+
clang-tools-wheel --tool clang-tidy --version ${{ matrix.version }}
177+
178+
echo "Checking clang-tidy versions..."
179+
clang-tidy --version
180+
181+
# Verify versions contain expected string
182+
clang_tidy_version=$(clang-tidy --version)
183+
184+
echo "clang-tidy version: $clang_tidy_version"
185+
177186
if ! echo "$clang_tidy_version" | grep -q "version ${{ matrix.version }}"; then
178187
echo "❌ Unexpected clang-tidy version!"
179188
exit 1
180189
fi
181190
182-
echo "✅ Versions are correct."
191+
echo "✅ clang-tidy Versions are correct."
183192
184193
docs:
185194
uses: cpp-linter/.github/.github/workflows/sphinx.yml@main

clang_tools/wheel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def get_parser() -> ArgumentParser:
88
parser.add_argument(
99
"--tool",
1010
default="clang-format",
11+
required=True,
1112
choices=["clang-format", "clang-tidy"],
1213
help="Tool to install (clang-format or clang-tidy)",
1314
)

0 commit comments

Comments
 (0)