diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f819355..f031668 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -83,8 +83,6 @@ jobs: COMMON_CMAKE_ARGS: '-DBUILD_SHARED_LIBS=OFF -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra"' MACOS_CMAKE_ARGS: > -DCMAKE_BUILD_TYPE=MinSizeRel - -DCMAKE_CXX_FLAGS_MINSIZEREL="-Os" - -DCMAKE_C_FLAGS_MINSIZEREL="-Os" -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_C_COMPILER=gcc-11 -DZSTD_STATIC_LINKING_ONLY=1 @@ -96,8 +94,8 @@ jobs: suffix: '${{ matrix.clang-version }}_${{ matrix.os }}-amd64' steps: - name: download patches - # we download a tarball of this repo, as the presence of a .git directory leaks - # the commit hash of this repository into the clang binaries + # We download a tarball of this repo, as the presence of a .git directory leaks + # The commit hash of this repository into the clang binaries shell: bash run: curl -L https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz | tar xvz --strip 1 - name: get llvm-project @@ -140,7 +138,7 @@ jobs: if: ${{ ( matrix.clang-version == 9 || matrix.clang-version == 10 ) && matrix.os == 'windows' }} shell: bash run: patch ${{ matrix.release }}/llvm/cmake/config-ix.cmake windows-clang-9-10-trivially-copyable-mismatch.patch - - name: patch cmake implicit link libraries on macosx + - name: patch cmake implicit link libraries on macOS if: ${{ matrix.os == 'macosx' }} shell: bash run: | @@ -160,13 +158,18 @@ jobs: - name: print dependencies if: ${{ matrix.os == 'macosx' }} run: otool -L ${{ matrix.release }}/build/bin/clang-format - - name: rename output binary + - name: rename output binary and test run: | cd ${{ matrix.release }}${{ matrix.bindir }} mv clang-format${{ matrix.dotexe }} clang-format-${{ env.suffix }}${{ matrix.dotexe }} mv clang-query${{ matrix.dotexe }} clang-query-${{ env.suffix }}${{ matrix.dotexe }} mv clang-tidy${{ matrix.dotexe }} clang-tidy-${{ env.suffix }}${{ matrix.dotexe }} mv clang-apply-replacements${{ matrix.dotexe }} clang-apply-replacements-${{ env.suffix }}${{ matrix.dotexe }} + + ./clang-format-${{ env.suffix }}${{ matrix.dotexe }} --version + ./clang-query-${{ env.suffix }}${{ matrix.dotexe }} --version + ./clang-tidy-${{ env.suffix }}${{ matrix.dotexe }} --version + ./clang-apply-replacements-${{ env.suffix }}${{ matrix.dotexe }} --version - name: create and print sha512sum shell: bash run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index a52ebba..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Test static binaries - -on: - workflow_dispatch: - inputs: - tag: - description: 'The release tag you want to download and test' - default: '' - required: true - type: string - -jobs: - install: - runs-on: ${{ matrix.os }} - strategy: - matrix: - clang-version: [ 8, 9, 10, 11, 12, 12.0.1, 13, 14, 15, 16, 17, 18, 19, 20 ] - os: [ ubuntu-latest, macos-latest, windows-latest ] - include: - - os: ubuntu-latest - bin_pattern: linux-amd64 - checksum_pattern: linux-amd64 - - os: macos-latest - bin_pattern: macosx-amd64 - checksum_pattern: macosx-amd64 - - os: windows-latest - bin_pattern: windows-amd64.exe - checksum_pattern: windows-amd64 - fail-fast: false - env: - GH_TOKEN: ${{ secrets.TOKEN }} - bin_suffix: '${{ matrix.clang-version }}_${{ matrix.bin_pattern }}' - checksum_suffix: '${{ matrix.clang-version }}_${{ matrix.checksum_pattern }}.sha512sum' - steps: - - uses: actions/checkout@v4 - - name: Download and check clang versions - shell: bash - run: | - gh release download ${{ inputs.tag }} --pattern 'clang-format-${{ env.bin_suffix }}' - gh release download ${{ inputs.tag }} --pattern 'clang-format-${{ env.checksum_suffix }}' - echo "== Output clang-format checksum" - cat clang-format-${{ env.checksum_suffix }} - chmod +x clang-format-${{ env.bin_suffix }} - echo "== Output clang-format version" - ./clang-format-${{ env.bin_suffix }} --version - - gh release download ${{ inputs.tag }} --pattern 'clang-tidy-${{ env.bin_suffix }}' - gh release download ${{ inputs.tag }} --pattern 'clang-tidy-${{ env.checksum_suffix }}' - echo "== Output clang-tidy checksum" - cat clang-tidy-${{ env.checksum_suffix }} - chmod +x clang-tidy-${{ env.bin_suffix }} - echo "== Output clang-tidy version" - ./clang-tidy-${{ env.bin_suffix }} --version - - gh release download ${{ inputs.tag }} --pattern 'clang-query-${{ env.bin_suffix }}' - gh release download ${{ inputs.tag }} --pattern 'clang-query-${{ env.checksum_suffix }}' - echo "== Output clang-query checksum" - cat clang-query-${{ env.checksum_suffix }} - chmod +x clang-query-${{ env.bin_suffix }} - echo "== Output clang-query version" - ./clang-query-${{ env.bin_suffix }} --version - - gh release download ${{ inputs.tag }} --pattern 'clang-apply-replacements-${{ env.bin_suffix }}' - gh release download ${{ inputs.tag }} --pattern 'clang-apply-replacements-${{ env.checksum_suffix }}' - echo "== Output clang-apply-replacements checksum" - cat clang-apply-replacements-${{ env.checksum_suffix }} - chmod +x clang-apply-replacements-${{ env.bin_suffix }} - echo "== Output clang-apply-replacements version" - ./clang-apply-replacements-${{ env.bin_suffix }} --version diff --git a/README.md b/README.md index 195ccd0..a9df750 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The supported versions are as follows: | |macOS 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| | clang-tidy |Linux 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| | |Window 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| -| |macOS 64 |❌|❌|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| +| |macOS 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| | clang-query |Linux 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| | |Window 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| | |macOS 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| @@ -24,9 +24,6 @@ The supported versions are as follows: | |Window 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| | |macOS 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| -> [!CAUTION] -> clang-tidy-19_macosx-amd64 and clang-tidy-20_macosx-amd64 - Files size exceeds 2GB, unable to upload to GitHub releases. See #40 - > [!NOTE] > Remove Support v7 (released in May 2019) by February 2025.