Skip to content

Commit 8c34f13

Browse files
shenxianpeng2bndy5
andauthored
Support clang-tools version 15 (#41)
* Support clang-tools version 15 * Update test * Update README.rst * Update test workflow Co-authored-by: Brendan <[email protected]> Co-authored-by: Brendan <[email protected]>
1 parent 8ff06ea commit 8c34f13

7 files changed

+24
-21
lines changed

.github/workflows/python-test.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ jobs:
5757
needs: [build]
5858
strategy:
5959
matrix:
60-
# skip version 14 because it failed on ubuntu.
61-
version: [ 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12.0.1, 13 ]
60+
version: [ 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12.0.1, 13, 14, 15 ]
6261
os: [ ubuntu-latest, macos-latest, windows-latest ]
6362
fail-fast: false
6463
runs-on: ${{ matrix.os }}
@@ -81,7 +80,7 @@ jobs:
8180

8281
- name: Install clang-tools
8382
run: clang-tools --install ${{ matrix.version }}
84-
83+
8584
- name: show path of binaries
8685
shell: bash
8786
run: |
@@ -98,7 +97,11 @@ jobs:
9897
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
9998
run: |
10099
clang-format-${{ matrix.version }} --version
101-
clang-tidy-${{ matrix.version }} --version
100+
if [ "${{ matrix.version }}" = "14" -o "${{ matrix.version }}" = "15" ]; then
101+
echo "skip version ${{ matrix.version }} because Segmentation fault on ubuntu."
102+
else
103+
clang-tidy-${{ matrix.version }} --version
104+
fi
102105
103106
docs:
104107
runs-on: ubuntu-latest

README.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Features
3333

3434
- Binaries are statically linked for improved portability.
3535
- Binaries are checked with SHA512 checksum. This ensures:
36-
36+
3737
1. Downloads are not corrupted.
3838
2. Old binary builds can be updated.
3939
- Installed binaries are symbolically linked for better cross-platform usage.
@@ -124,27 +124,27 @@ Supported versions
124124
clang-format
125125
************
126126
.. csv-table::
127-
:header: "Version", "14", "13", "12.0.1", "12", "11", "10", "9", "8", "7", "6", "5", "4", "3.9"
127+
:header: "Version", "15", "14", "13", "12.0.1", "12", "11", "10", "9", "8", "7", "6", "5", "4", "3.9"
128128
:stub-columns: 1
129129

130-
Linux,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
131-
Windows,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
132-
macOS,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
130+
Linux,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
131+
Windows,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
132+
macOS,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
133133

134134
clang-tidy
135135
**********
136136
.. csv-table::
137-
:header: "Version", "14", "13", "12.0.1", "12", "11", "10", "9", "8", "7", "6", "5", "4", "3.9"
137+
:header: "Version", "15", "14", "13", "12.0.1", "12", "11", "10", "9", "8", "7", "6", "5", "4", "3.9"
138138
:stub-columns: 1
139139

140-
Linux,❌,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
141-
Windows,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
142-
macOS,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
140+
Linux,❌,❌,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
141+
Windows,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
142+
macOS,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
143143

144144
Know issues:
145145

146-
1. clang-tidy-14 has Segmentation fault on Ubuntu 22.02.
147-
2. clang-format-14 is over 1 GB for MacOSX
146+
1. clang-tidy-14 and clang-tidy-15 has Segmentation fault on Ubuntu 22.02.
147+
2. clang-tidy-14 and clang-tidy-15 is over 1 GB for MacOSX
148148

149149
Thanks to the project
150150
`clang-tools-static-binaries <https://github.com/muttleyxd/clang-tools-static-binaries>`_

clang_tools/install.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def is_installed(tool_name: str, version: str) -> Optional[Path]:
6363

6464

6565
def clang_tools_binary_url(
66-
tool: str, version: str, release_tag: str = "master-208096c1"
66+
tool: str, version: str, release_tag: str = "master-1d7ec53d"
6767
) -> str:
6868
"""Assemble the URL to the binary.
6969
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e5ae0dc1df5b259e7ed1bf6887af9d0eeba3a659a1465999cc732e014763e5ce7d38c0bef9f36d9df1a2732ce9fac12419d8a78cc157668ad464094a8f65f066 clang-query-12_linux-amd64
1+
bd1492a81d05d5fa13457e11b75b73bf4a02213b14daf2a956dc7413b0cf1f47de4c4e96e15139a09cdaae1152d47b5dd9cab43fdbe993d58161636ca2e8a33e clang-query-12_linux-amd64
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8dca8b2de3637cefd3ec739b1efd4e7430a1c83fccdca90999f1e67c14c8caabaed3df3f5fdc9a3c9ed7ab28952c9c04660c20b1f0c36bfc96d22239cd13a9f9 clang-query-12_macosx-amd64
1+
1ab92140027a96958c50d924ab1adbd05623c99fe695be02596d9570e1e8cbbf0b4311931c1ec9bac189e0b2c911564be6a4f4e770f506d85d2d5de6e6eb69dc clang-query-12_macosx-amd64
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0d7abeea833917074ced1810dbd3bcf94d0b1de15bf83dc051f65163f5e5db1ed88ee56e9000d9a67e17a74886b92a942ab14e6f27c6df04d12fdff64bf1437b *clang-query-12_windows-amd64
1+
4d3162943870490986f94d198600f94895db13b07c04e450832b39ccba004317d70fcc6216b3689de8058058df8e813fab8e3b93ecde330e79d399aa82a5a243 *clang-query-12_windows-amd64

tests/test_util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_check_install_os():
1313

1414

1515
@pytest.mark.parametrize(
16-
"tag", ["master-208096c1", pytest.param("latest", marks=pytest.mark.xfail)]
16+
"tag", ["master-1d7ec53d", pytest.param("latest", marks=pytest.mark.xfail)]
1717
)
1818
def test_download_file(monkeypatch: pytest.MonkeyPatch, tmp_path: Path, tag: str):
1919
"""Test that deliberately fails to download a file."""
@@ -30,5 +30,5 @@ def test_get_sha(monkeypatch: pytest.MonkeyPatch):
3030
expected = Path(f"clang-query-12_{install_os}-amd64.sha512sum").read_text(
3131
encoding="utf-8"
3232
)
33-
url = clang_tools_binary_url("clang-query", "12", release_tag="master-208096c1")
33+
url = clang_tools_binary_url("clang-query", "12", release_tag="master-1d7ec53d")
3434
assert get_sha_checksum(url) == expected

0 commit comments

Comments
 (0)