85
85
build-stage1-linux :
86
86
name : " Build Stage 1 Linux"
87
87
needs : prepare
88
- runs-on : ubuntu-22.04
88
+ runs-on : ${{ matrix.runs-on }}
89
89
if : github.repository == 'llvm/llvm-project'
90
+ strategy :
91
+ fail-fast : false
92
+ matrix :
93
+ runs-on :
94
+ - ubuntu-22.04
95
+ - windows-2022
96
+ - macos-13
97
+ - macos-14
90
98
steps :
91
99
- name : Checkout LLVM
92
100
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -100,7 +108,7 @@ jobs:
100
108
uses : hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9
101
109
with :
102
110
max-size : 250M
103
- key : sccache-${{ runner.os }}-release
111
+ key : sccache-${{ runner.os }}-${{ runner.arch }}- release
104
112
variant : sccache
105
113
106
114
- name : Build Stage 1 Clang
@@ -119,14 +127,14 @@ jobs:
119
127
- name : Upload Stage 1 Source
120
128
uses : actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
121
129
with :
122
- name : stage1-source
130
+ name : ${{ runner.os }}-${{ runner.arch }}- stage1-source
123
131
path : llvm-project.tar.zst
124
132
retention-days : 2
125
133
126
134
- name : Upload Stage 1 Build Dir
127
135
uses : actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
128
136
with :
129
- name : stage1-build
137
+ name : ${{ runner.os}}-${{ runner.arch }}- stage1-build
130
138
path : build.tar.zst
131
139
retention-days : 2
132
140
@@ -135,16 +143,24 @@ jobs:
135
143
needs :
136
144
- prepare
137
145
- build-stage1-linux
138
- runs-on : ubuntu-22.04
146
+ runs-on : ${{ matrix.runs-on }}
139
147
if : github.repository == 'llvm/llvm-project'
148
+ strategy :
149
+ fail-fast : false
150
+ matrix :
151
+ runs-on :
152
+ - ubuntu-22.04
153
+ - windows-2022
154
+ - macos-13
155
+ - macos-14
140
156
steps :
141
157
- name : Install Ninja
142
158
uses : llvm/actions/install-ninja@22e9f909d35b50bd1181709564bfe816eaeaae81 # main
143
159
144
160
- name : Download Stage 1 Artifacts
145
161
uses : actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
146
162
with :
147
- pattern : stage1-*
163
+ pattern : ${{ runner.os }}-${{ runner.arch }}- stage1-*
148
164
merge-multiple : true
149
165
150
166
- name : Unpack Artifacts
@@ -156,6 +172,7 @@ jobs:
156
172
rm build.tar.zst
157
173
158
174
- name : Build Stage 2
175
+ if : false
159
176
run : |
160
177
ninja -C /mnt/build stage2-instrumented
161
178
@@ -169,14 +186,14 @@ jobs:
169
186
- name : Upload Stage 2 Source
170
187
uses : actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
171
188
with :
172
- name : stage2-source
189
+ name : ${{ runner.os }}-${{ runner.arch }}- stage2-source
173
190
path : ${{ github.workspace }}/llvm-project.tar.zst
174
191
retention-days : 2
175
192
176
193
- name : Upload Stage 2 Build Dir
177
194
uses : actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
178
195
with :
179
- name : stage2-build
196
+ name : ${{ runner.os }}-${{ runner.arch }}- stage2-build
180
197
path : ${{ github.workspace }}/build.tar.zst
181
198
retention-days : 2
182
199
@@ -197,7 +214,7 @@ jobs:
197
214
- name : ' Download artifact'
198
215
uses : actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
199
216
with :
200
- pattern : stage2-*
217
+ pattern : ${{ runner.os }}-${{ runner.arch }}- stage2-*
201
218
merge-multiple : true
202
219
203
220
- name : Unpack Artifact
@@ -208,10 +225,26 @@ jobs:
208
225
tar --zstd -C /mnt -xf build.tar.zst
209
226
rm build.tar.zst
210
227
228
+ - name : Timeout Restore
229
+ id : timeout
230
+ uses : ./.github/workflows/timeout-restore
231
+ with :
232
+ artifact-name-suffix : ${{ runner.os }}-${{ runner.arch }}
233
+
211
234
- name : Build Release Package
235
+ name : Build
212
236
run : |
213
237
ninja -C /mnt/build stage2-package
214
238
239
+ - name : Timeout Save
240
+ if : always()
241
+ uses : ./.github/workflows/timeout-save
242
+ with :
243
+ job-name : " Build (${{ matrix.runs-on}})"
244
+ artifact-name-suffix : ${{ matrix.name }}
245
+ timeout-step : " Build"
246
+ timeout-minutes : 330
247
+
215
248
- id : package-info
216
249
run : |
217
250
filename="LLVM-${{ needs.prepare.outputs.release-version }}-Linux.tar.gz"
@@ -221,7 +254,7 @@ jobs:
221
254
- uses : actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
222
255
if : always()
223
256
with :
224
- name : release-binary
257
+ name : ${{ runner.os }}-${{ runner.arch }}- release-binary
225
258
path : ${{ steps.package-info.outputs.path }}
226
259
227
260
# Clean up some build files to reduce size of artifact.
@@ -239,14 +272,14 @@ jobs:
239
272
- name : Upload Stage 3 Source
240
273
uses : actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
241
274
with :
242
- name : stage3-source
275
+ name : ${{ runner.os }}-${{ runner.arch }}- stage3-source
243
276
path : llvm-project.tar.zst
244
277
retention-days : 2
245
278
246
279
- name : Upload Stage 3 Build Dir
247
280
uses : actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
248
281
with :
249
- name : stage3-build
282
+ name : ${{ runner.os }}-${{ runner.arch }}- stage3-build
250
283
path : build.tar.zst
251
284
retention-days : 2
252
285
@@ -264,7 +297,7 @@ jobs:
264
297
- name : ' Download artifact'
265
298
uses : actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
266
299
with :
267
- name : release-binary
300
+ pattern : *- release-binary
268
301
269
302
- name : Upload Release
270
303
run : |
@@ -273,7 +306,7 @@ jobs:
273
306
--token ${{ github.token }} \
274
307
--release ${{ needs.prepare.outputs.release-version }} \
275
308
upload \
276
- --files ${{ needs.build-stage3-linux.outputs.release-filename }}
309
+ --files *.tar.gz # ${{ needs.build-stage3-linux.outputs.release-filename }}
277
310
278
311
279
312
test-stage3-linux :
@@ -283,14 +316,22 @@ jobs:
283
316
- build-stage3-linux
284
317
runs-on : ubuntu-22.04
285
318
if : github.repository == 'llvm/llvm-project'
319
+ strategy :
320
+ fail-fast : false
321
+ matrix :
322
+ runs-on :
323
+ - ubuntu-22.04
324
+ - windows-2022
325
+ - macos-13
326
+ - macos-14
286
327
steps :
287
328
- name : Install Ninja
288
329
uses : llvm/actions/install-ninja@22e9f909d35b50bd1181709564bfe816eaeaae81 # main
289
330
290
331
- name : ' Download artifact'
291
332
uses : actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
292
333
with :
293
- pattern : stage3-*
334
+ pattern : ${{ runner.os }}-${{ runner.arch }}- stage3-*
294
335
merge-multiple : true
295
336
296
337
- name : Unpack Artifact
0 commit comments