Skip to content

Commit e0ad1a3

Browse files
authored
Update build.yml to fix macOs build
1 parent badb9e5 commit e0ad1a3

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ master, test-macos-build ]
66
paths:
77
- ".github/workflows/build.yml"
88
pull_request:
@@ -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: |

0 commit comments

Comments
 (0)