diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index ac1cfec..d9155de 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -60,7 +60,7 @@ jobs: needs: [build] strategy: matrix: - version: [ 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12.0.1, 13, 14, 15, 16, 17 ] + version: [ 7, 8, 9, 10, 11, 12, 12.0.1, 13, 14, 15, 16, 17 ] os: [ ubuntu-latest, macos-latest, windows-latest ] fail-fast: false runs-on: ${{ matrix.os }} diff --git a/README.rst b/README.rst index 1d64b3b..5ff9b0e 100644 --- a/README.rst +++ b/README.rst @@ -124,28 +124,29 @@ Supported versions clang-format ************ .. csv-table:: - :header: "Version", "17", "16", "15", "14", "13", "12", "11", "10", "9", "8", "7", "6", "5", "4", "3.9" + :header: "Version", "17", "16", "15", "14", "13", "12", "11", "10", "9", "8", "7" :stub-columns: 1 - Linux,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ - Windows,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ - macOS,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ + Linux,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ + Windows,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ + macOS,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ clang-tidy ********** .. csv-table:: - :header: "Version", "17", "16", "15", "14", "13", "12", "11", "10", "9", "8", "7", "6", "5", "4", "3.9" + :header: "Version", "17", "16", "15", "14", "13", "12", "11", "10", "9", "8", "7" :stub-columns: 1 - Linux,✔️,❌,❌,❌,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ - Windows,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ - macOS,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ + Linux,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ + Windows,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ + macOS,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️ -Know issues: +.. warning:: + All clang-tidy v14+ builds for MacOS are still ~1.7 GB in size. -1. clang-tidy-14, clang-tidy-15 and clang-tidy-16 has Segmentation fault on Ubuntu 22.02. -2. clang-tidy-14, clang-tidy-15, clang-tidy-16, clang-tidy-17 is over 1 GB for MacOSX +------------ Thanks to the project -`clang-tools-static-binaries `_ -for all the binaries. +`clang-tools-static-binaries `_. +We now used the `fork repository `_ +that fixed the clang-tidy v14+ Segmentation fault (core dumped). see `#56 `_ for details. diff --git a/clang_tools/install.py b/clang_tools/install.py index ca911d9..27c05b1 100644 --- a/clang_tools/install.py +++ b/clang_tools/install.py @@ -63,7 +63,7 @@ def is_installed(tool_name: str, version: str) -> Optional[Path]: def clang_tools_binary_url( - tool: str, version: str, release_tag: str = "master-8f72ab3c" + tool: str, version: str, release_tag: str = "master-be694ee7" ) -> str: """Assemble the URL to the binary. @@ -74,7 +74,7 @@ def clang_tools_binary_url( :returns: The URL used to download the specified tool. """ base_url = ( - "https://github.com/muttleyxd/clang-tools-static-binaries/releases/download/" + "https://github.com/cpp-linter/clang-tools-static-binaries/releases/download/" + release_tag ) download_url = f"{base_url}/{tool}-{version}_{install_os}-amd64{suffix}" diff --git a/tests/clang-format-12_linux-amd64.sha512sum b/tests/clang-format-12_linux-amd64.sha512sum new file mode 100644 index 0000000..1aea8db --- /dev/null +++ b/tests/clang-format-12_linux-amd64.sha512sum @@ -0,0 +1 @@ +d916477bdedd48245b6eedeb8680fcb0665a0145c7b078ddc4ba3f1fbc16eb6b081dc89f41242f228b723a472eb734836d1914178abdd94293a25a9e62eefc11 clang-format-12_linux-amd64 diff --git a/tests/clang-format-12_macosx-amd64.sha512sum b/tests/clang-format-12_macosx-amd64.sha512sum new file mode 100644 index 0000000..6bc3a54 --- /dev/null +++ b/tests/clang-format-12_macosx-amd64.sha512sum @@ -0,0 +1 @@ +25a5854bf43bc37114d67cd8bbf88dd72da5ca3dc31c61bf0f245aec330eb657cd085344b66285095a257da94425480fee4188e95f98a368998d3632a467f32b clang-format-12_macosx-amd64 diff --git a/tests/clang-format-12_windows-amd64.sha512sum b/tests/clang-format-12_windows-amd64.sha512sum new file mode 100644 index 0000000..85042a5 --- /dev/null +++ b/tests/clang-format-12_windows-amd64.sha512sum @@ -0,0 +1 @@ +4b96e93eedcbceafc0dea62cf46a002ba3d2a165215a83fbfe1e2a73d21888a3b36bc7da092fcad38fa56e615d7cb9d375a34eddc642ee08a4a29b836f938762 *clang-format-12_windows-amd64 diff --git a/tests/clang-query-12_linux-amd64.sha512sum b/tests/clang-query-12_linux-amd64.sha512sum deleted file mode 100644 index c7745b8..0000000 --- a/tests/clang-query-12_linux-amd64.sha512sum +++ /dev/null @@ -1 +0,0 @@ -02c62a5916e669bff34a2777874912a0e84556df448b7c690b4e9fe3e429dd29e0b8195124cc3e1b16b0ee3271391c865c040707d32c9ccfc45737a5673fc385 clang-query-12_linux-amd64 diff --git a/tests/clang-query-12_macosx-amd64.sha512sum b/tests/clang-query-12_macosx-amd64.sha512sum deleted file mode 100644 index c20be55..0000000 --- a/tests/clang-query-12_macosx-amd64.sha512sum +++ /dev/null @@ -1 +0,0 @@ -1ab92140027a96958c50d924ab1adbd05623c99fe695be02596d9570e1e8cbbf0b4311931c1ec9bac189e0b2c911564be6a4f4e770f506d85d2d5de6e6eb69dc clang-query-12_macosx-amd64 diff --git a/tests/clang-query-12_windows-amd64.sha512sum b/tests/clang-query-12_windows-amd64.sha512sum deleted file mode 100644 index 2ebdb7e..0000000 --- a/tests/clang-query-12_windows-amd64.sha512sum +++ /dev/null @@ -1 +0,0 @@ -4d3162943870490986f94d198600f94895db13b07c04e450832b39ccba004317d70fcc6216b3689de8058058df8e813fab8e3b93ecde330e79d399aa82a5a243 *clang-query-12_windows-amd64 diff --git a/tests/test_util.py b/tests/test_util.py index 47b5163..3b72a9b 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -13,12 +13,12 @@ def test_check_install_os(): @pytest.mark.parametrize( - "tag", ["master-8f72ab3c", pytest.param("latest", marks=pytest.mark.xfail)] + "tag", ["master-be694ee7", pytest.param("latest", marks=pytest.mark.xfail)] ) def test_download_file(monkeypatch: pytest.MonkeyPatch, tmp_path: Path, tag: str): """Test that deliberately fails to download a file.""" monkeypatch.chdir(str(tmp_path)) - url = clang_tools_binary_url("clang-query", "12", release_tag=tag) + url = clang_tools_binary_url("clang-format", "12", release_tag=tag) file_name = download_file(url, "file.tar.gz", True) assert file_name is not None @@ -27,8 +27,8 @@ def test_get_sha(monkeypatch: pytest.MonkeyPatch): """Test the get_sha() function used to fetch the releases' corresponding SHA512 checksum.""" monkeypatch.chdir(PurePath(__file__).parent.as_posix()) - expected = Path(f"clang-query-12_{install_os}-amd64.sha512sum").read_text( + expected = Path(f"clang-format-12_{install_os}-amd64.sha512sum").read_text( encoding="utf-8" ) - url = clang_tools_binary_url("clang-query", "12", release_tag="master-8f72ab3c") + url = clang_tools_binary_url("clang-format", "12", release_tag="master-be694ee7") assert get_sha_checksum(url) == expected