Skip to content

Commit d5d7b8b

Browse files
authored
Switch to cpp-linter/clang-tools-static-binaries (#57)
1 parent 98e244a commit d5d7b8b

10 files changed

+24
-23
lines changed

.github/workflows/python-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
needs: [build]
6161
strategy:
6262
matrix:
63-
version: [ 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12.0.1, 13, 14, 15, 16, 17 ]
63+
version: [ 7, 8, 9, 10, 11, 12, 12.0.1, 13, 14, 15, 16, 17 ]
6464
os: [ ubuntu-latest, macos-latest, windows-latest ]
6565
fail-fast: false
6666
runs-on: ${{ matrix.os }}

README.rst

+14-13
Original file line numberDiff line numberDiff line change
@@ -124,28 +124,29 @@ Supported versions
124124
clang-format
125125
************
126126
.. csv-table::
127-
:header: "Version", "17", "16", "15", "14", "13", "12", "11", "10", "9", "8", "7", "6", "5", "4", "3.9"
127+
:header: "Version", "17", "16", "15", "14", "13", "12", "11", "10", "9", "8", "7"
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", "17", "16", "15", "14", "13", "12", "11", "10", "9", "8", "7", "6", "5", "4", "3.9"
137+
:header: "Version", "17", "16", "15", "14", "13", "12", "11", "10", "9", "8", "7"
138138
:stub-columns: 1
139139

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

144-
Know issues:
144+
.. warning::
145+
All clang-tidy v14+ builds for MacOS are still ~1.7 GB in size.
145146

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

149149
Thanks to the project
150-
`clang-tools-static-binaries <https://github.com/muttleyxd/clang-tools-static-binaries>`_
151-
for all the binaries.
150+
`clang-tools-static-binaries <https://github.com/muttleyxd/clang-tools-static-binaries>`_.
151+
We now used the `fork repository <https://github.com/cpp-linter/clang-tools-static-binaries>`_
152+
that fixed the clang-tidy v14+ Segmentation fault (core dumped). see `#56 <https://github.com/cpp-linter/clang-tools-pip/issues/56>`_ for details.

clang_tools/install.py

+2-2
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-8f72ab3c"
66+
tool: str, version: str, release_tag: str = "master-be694ee7"
6767
) -> str:
6868
"""Assemble the URL to the binary.
6969
@@ -74,7 +74,7 @@ def clang_tools_binary_url(
7474
:returns: The URL used to download the specified tool.
7575
"""
7676
base_url = (
77-
"https://github.com/muttleyxd/clang-tools-static-binaries/releases/download/"
77+
"https://github.com/cpp-linter/clang-tools-static-binaries/releases/download/"
7878
+ release_tag
7979
)
8080
download_url = f"{base_url}/{tool}-{version}_{install_os}-amd64{suffix}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d916477bdedd48245b6eedeb8680fcb0665a0145c7b078ddc4ba3f1fbc16eb6b081dc89f41242f228b723a472eb734836d1914178abdd94293a25a9e62eefc11 clang-format-12_linux-amd64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
25a5854bf43bc37114d67cd8bbf88dd72da5ca3dc31c61bf0f245aec330eb657cd085344b66285095a257da94425480fee4188e95f98a368998d3632a467f32b clang-format-12_macosx-amd64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4b96e93eedcbceafc0dea62cf46a002ba3d2a165215a83fbfe1e2a73d21888a3b36bc7da092fcad38fa56e615d7cb9d375a34eddc642ee08a4a29b836f938762 *clang-format-12_windows-amd64

tests/clang-query-12_linux-amd64.sha512sum

-1
This file was deleted.

tests/clang-query-12_macosx-amd64.sha512sum

-1
This file was deleted.

tests/clang-query-12_windows-amd64.sha512sum

-1
This file was deleted.

tests/test_util.py

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

1414

1515
@pytest.mark.parametrize(
16-
"tag", ["master-8f72ab3c", pytest.param("latest", marks=pytest.mark.xfail)]
16+
"tag", ["master-be694ee7", 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."""
2020
monkeypatch.chdir(str(tmp_path))
21-
url = clang_tools_binary_url("clang-query", "12", release_tag=tag)
21+
url = clang_tools_binary_url("clang-format", "12", release_tag=tag)
2222
file_name = download_file(url, "file.tar.gz", True)
2323
assert file_name is not None
2424

@@ -27,8 +27,8 @@ def test_get_sha(monkeypatch: pytest.MonkeyPatch):
2727
"""Test the get_sha() function used to fetch the
2828
releases' corresponding SHA512 checksum."""
2929
monkeypatch.chdir(PurePath(__file__).parent.as_posix())
30-
expected = Path(f"clang-query-12_{install_os}-amd64.sha512sum").read_text(
30+
expected = Path(f"clang-format-12_{install_os}-amd64.sha512sum").read_text(
3131
encoding="utf-8"
3232
)
33-
url = clang_tools_binary_url("clang-query", "12", release_tag="master-8f72ab3c")
33+
url = clang_tools_binary_url("clang-format", "12", release_tag="master-be694ee7")
3434
assert get_sha_checksum(url) == expected

0 commit comments

Comments
 (0)