@@ -91,27 +91,27 @@ jobs:
91
91
RELEASE : ' ${{ matrix.release }}'
92
92
suffix : ' ${{ matrix.clang-version }}_${{ matrix.os }}-amd64'
93
93
steps :
94
- - name : download patches
94
+ - name : Download patches
95
95
# We download a tarball of this repo, as the presence of a .git directory leaks
96
96
# The commit hash of this repository into the clang binaries
97
97
shell : bash
98
98
run : curl -L https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz | tar xvz --strip 1
99
- - name : get llvm-project
99
+ - name : Get llvm-project
100
100
if : ${{ matrix.clang-version == 8 }}
101
101
shell : bash
102
102
run : |
103
103
version=${RELEASE##llvm-project-}
104
104
curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-${version}.src.tar.xz
105
105
curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/cfe-${version}.src.tar.xz
106
106
curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/clang-tools-extra-${version}.src.tar.xz
107
- - name : get llvm-project
107
+ - name : Get llvm-project
108
108
if : ${{ matrix.clang-version >= 9 || matrix.clang-version == '12.0.1' }}
109
109
shell : bash
110
110
run : |
111
111
version=${RELEASE##llvm-project-}; version=${version%.src}
112
112
curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${{ matrix.release }}.tar.xz
113
113
114
- - name : unpack llvm-project
114
+ - name : Unpack llvm-project
115
115
if : ${{ matrix.clang-version < 9 }}
116
116
shell : bash
117
117
run : |
@@ -123,40 +123,40 @@ jobs:
123
123
mv llvm-${version}.src ${{ matrix.release }}/llvm
124
124
mv cfe-${version}.src ${{ matrix.release }}/clang
125
125
mv clang-tools-extra-${version}.src ${{ matrix.release }}/clang-tools-extra
126
- - name : unpack llvm-project
126
+ - name : Unpack llvm-project
127
127
if : ${{ matrix.clang-version >= 9 || matrix.clang-version == '12.0.1' }}
128
128
shell : bash
129
129
run : |
130
130
tar xf ${{ matrix.release }}.tar.xz ${{ matrix.extra-tar-args }}
131
- - name : patch clang-8 includes
131
+ - name : Patch clang-8 includes
132
132
if : ${{ matrix.clang-version == 8 }}
133
133
shell : bash
134
134
run : patch ${{ matrix.release }}/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h include-cstdint-string-prior-to-using-uint8_t.patch
135
- - name : patch trivially-copyable clang 9/10
135
+ - name : Patch trivially-copyable clang 9/10
136
136
if : ${{ ( matrix.clang-version == 9 || matrix.clang-version == 10 ) && matrix.os == 'windows' }}
137
137
shell : bash
138
138
run : patch ${{ matrix.release }}/llvm/cmake/config-ix.cmake windows-clang-9-10-trivially-copyable-mismatch.patch
139
- - name : patch cmake implicit link libraries on macOS
139
+ - name : Patch cmake implicit link libraries on macOS
140
140
if : ${{ matrix.os == 'macosx' }}
141
141
shell : bash
142
142
run : |
143
143
sed -i.backup 's/gcc_eh.\*|/gcc_eh.*|gcc_ext.*|/g' "$(find /opt/homebrew/Cellar -name CMakeParseImplicitLinkInfo.cmake)"
144
144
brew install gcc@11
145
- - name : update homebrew
145
+ - name : Update homebrew
146
146
if : ${{ matrix.os == 'macosx' && matrix.clang-version >= '18' }}
147
147
shell : bash
148
148
run : |
149
149
brew update
150
150
brew upgrade
151
151
brew cleanup
152
- - name : cmake
152
+ - name : CMake
153
153
run : cmake -S ${{ matrix.release }}/llvm -B ${{ matrix.release }}/build ${{ env.COMMON_CMAKE_ARGS }} ${{ matrix.os-cmake-args }} ${{ matrix.extra-cmake-args }}
154
- - name : build
154
+ - name : Build
155
155
run : cmake --build ${{ matrix.release }}/build ${{ matrix.build-args }} --target clang-format clang-query clang-tidy clang-apply-replacements
156
- - name : print dependencies
156
+ - name : Print dependencies
157
157
if : ${{ matrix.os == 'macosx' }}
158
158
run : otool -L ${{ matrix.release }}/build/bin/clang-format
159
- - name : rename output binary and test
159
+ - name : Rename output binary and test
160
160
run : |
161
161
cd ${{ matrix.release }}${{ matrix.bindir }}
162
162
mv clang-format${{ matrix.dotexe }} clang-format-${{ env.suffix }}${{ matrix.dotexe }}
@@ -168,7 +168,7 @@ jobs:
168
168
./clang-query-${{ env.suffix }}${{ matrix.dotexe }} --version
169
169
./clang-tidy-${{ env.suffix }}${{ matrix.dotexe }} --version
170
170
./clang-apply-replacements-${{ env.suffix }}${{ matrix.dotexe }} --version
171
- - name : create and print sha512sum
171
+ - name : Create and print sha512sum
172
172
shell : bash
173
173
run : |
174
174
cd ${{ matrix.release }}${{ matrix.bindir }}
@@ -181,7 +181,7 @@ jobs:
181
181
cat clang-query-${{ env.suffix }}.sha512sum
182
182
cat clang-tidy-${{ env.suffix }}.sha512sum
183
183
cat clang-apply-replacements-${{ env.suffix }}.sha512sum
184
- - name : upload artifacts
184
+ - name : Upload artifacts
185
185
if : ${{ github.actor != 'dependabot[bot]' }} || github.event_name != 'pull_request'
186
186
uses : actions/upload-artifact@v4
187
187
with :
@@ -193,16 +193,24 @@ jobs:
193
193
if : ${{ github.actor != 'dependabot[bot]' }} || github.event_name != 'pull_request'
194
194
needs : build
195
195
steps :
196
- - name : download artifacts
196
+ - name : Download artifacts
197
197
uses : actions/download-artifact@v4
198
198
- name : list files
199
199
run : ls -laR .
200
200
- name : Delete all files over 2G # see issue 40
201
201
run : find . -type f -size +2G -exec rm -v {} \;
202
- - name : draft release
202
+ - name : Checkout code
203
+ uses : actions/checkout@v4
204
+ - name : Get short SHA
205
+ id : sha
206
+ run : echo "short_sha=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT
207
+ - name : Draft release
203
208
uses : svenstaro/upload-release-action@v2
204
209
with :
210
+ release_name : " master-${{ steps.sha.outputs.short_sha }}"
211
+ tag : " master-${{ steps.sha.outputs.short_sha }}"
205
212
repo_token : ${{ secrets.GITHUB_TOKEN }}
206
213
draft : true
214
+ overwrite : true
207
215
file_glob : true
208
216
file : clang-*/**/*
0 commit comments