Skip to content

Commit 21879f4

Browse files
authored
Update build.yml to fix macOs build (#46)
* Update build.yml to fix macOs build * Apply suggestions from code review * Remove test.yml and update readme.md
1 parent badb9e5 commit 21879f4

File tree

3 files changed

+10
-79
lines changed

3 files changed

+10
-79
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ jobs:
8383
COMMON_CMAKE_ARGS: '-DBUILD_SHARED_LIBS=OFF -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra"'
8484
MACOS_CMAKE_ARGS: >
8585
-DCMAKE_BUILD_TYPE=MinSizeRel
86-
-DCMAKE_CXX_FLAGS_MINSIZEREL="-Os"
87-
-DCMAKE_C_FLAGS_MINSIZEREL="-Os"
8886
-DCMAKE_CXX_COMPILER=g++-11
8987
-DCMAKE_C_COMPILER=gcc-11
9088
-DZSTD_STATIC_LINKING_ONLY=1
@@ -96,8 +94,8 @@ jobs:
9694
suffix: '${{ matrix.clang-version }}_${{ matrix.os }}-amd64'
9795
steps:
9896
- name: download patches
99-
# we download a tarball of this repo, as the presence of a .git directory leaks
100-
# the commit hash of this repository into the clang binaries
97+
# We download a tarball of this repo, as the presence of a .git directory leaks
98+
# The commit hash of this repository into the clang binaries
10199
shell: bash
102100
run: curl -L https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz | tar xvz --strip 1
103101
- name: get llvm-project
@@ -140,7 +138,7 @@ jobs:
140138
if: ${{ ( matrix.clang-version == 9 || matrix.clang-version == 10 ) && matrix.os == 'windows' }}
141139
shell: bash
142140
run: patch ${{ matrix.release }}/llvm/cmake/config-ix.cmake windows-clang-9-10-trivially-copyable-mismatch.patch
143-
- name: patch cmake implicit link libraries on macosx
141+
- name: patch cmake implicit link libraries on macOS
144142
if: ${{ matrix.os == 'macosx' }}
145143
shell: bash
146144
run: |
@@ -160,13 +158,18 @@ jobs:
160158
- name: print dependencies
161159
if: ${{ matrix.os == 'macosx' }}
162160
run: otool -L ${{ matrix.release }}/build/bin/clang-format
163-
- name: rename output binary
161+
- name: rename output binary and test
164162
run: |
165163
cd ${{ matrix.release }}${{ matrix.bindir }}
166164
mv clang-format${{ matrix.dotexe }} clang-format-${{ env.suffix }}${{ matrix.dotexe }}
167165
mv clang-query${{ matrix.dotexe }} clang-query-${{ env.suffix }}${{ matrix.dotexe }}
168166
mv clang-tidy${{ matrix.dotexe }} clang-tidy-${{ env.suffix }}${{ matrix.dotexe }}
169167
mv clang-apply-replacements${{ matrix.dotexe }} clang-apply-replacements-${{ env.suffix }}${{ matrix.dotexe }}
168+
169+
./clang-format-${{ env.suffix }}${{ matrix.dotexe }} --version
170+
./clang-query-${{ env.suffix }}${{ matrix.dotexe }} --version
171+
./clang-tidy-${{ env.suffix }}${{ matrix.dotexe }} --version
172+
./clang-apply-replacements-${{ env.suffix }}${{ matrix.dotexe }} --version
170173
- name: create and print sha512sum
171174
shell: bash
172175
run: |

.github/workflows/test.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@ The supported versions are as follows:
1616
| |macOS 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
1717
| clang-tidy |Linux 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
1818
| |Window 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
19-
| |macOS 64 |||✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
19+
| |macOS 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
2020
| clang-query |Linux 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
2121
| |Window 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
2222
| |macOS 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
2323
| clang-apply-replacements| Linux 64|✔️|✔️|✔️|✔️|✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️|✔️|✔️|
2424
| |Window 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
2525
| |macOS 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
2626

27-
> [!CAUTION]
28-
> clang-tidy-19_macosx-amd64 and clang-tidy-20_macosx-amd64 - Files size exceeds 2GB, unable to upload to GitHub releases. See #40
29-
3027
> [!NOTE]
3128
> Remove Support v7 (released in May 2019) by February 2025.
3229

0 commit comments

Comments
 (0)