File tree 1 file changed +24
-1
lines changed
1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,7 @@ jobs:
177
177
id : llvm-parameters
178
178
run : |
179
179
echo -E "llvm-hash=7a28a5b3fee6c78ad59af79a3d03c00db153c49f" >> $GITHUB_OUTPUT
180
+ echo -E "llvm-id=7a28a5b3" >> $GITHUB_OUTPUT
180
181
echo -E "llvm-build-preset=${{ runner.os == 'Windows' && 'release-win' || 'release-unix' }}" >> $GITHUB_OUTPUT
181
182
cd ..
182
183
llvm_root=$(pwd)/third-party/llvm-project/install
@@ -227,7 +228,29 @@ jobs:
227
228
cmake --build ./build --target help
228
229
fi
229
230
N_CORES=$(nproc 2>/dev/null || echo 1)
230
- cmake --build ./build --config Release --parallel $N_CORES
231
+ if [ ${{ runner.os }} != 'Windows' ]; then
232
+ cmake --build ./build --config Release --parallel $N_CORES
233
+ else
234
+ # Allow build step to fail
235
+ set +e
236
+ cmake --build ./build --config Release --parallel $N_CORES
237
+ exit_code=$?
238
+ set -e
239
+ if [ $exit_code -ne 0 ]; then
240
+ echo "Could not build LLVM in CI. Fetching pre-built binaries from mrdocs.com."
241
+ cd ..
242
+ llvm_archive_filename="Windows-Release-${{ steps.llvm-parameters.outputs.llvm-id }}.7z"
243
+ llvm_url="https://mrdocs.com/llvm+clang/$llvm_archive_filename"
244
+ curl -L -o "$llvm_archive_filename" "$llvm_url"
245
+ 7z x "$llvm_archive_filename"
246
+ cd "Release"
247
+ mkdir -p "$llvm_project_root"/install
248
+ mv * "$llvm_project_root"/install
249
+ cd ..
250
+ rm -rf "Release"
251
+ exit 0
252
+ fi
253
+ fi
231
254
cmake --install ./build --prefix "$llvm_project_root"/install
232
255
233
256
- name : Install Node.js
You can’t perform that action at this time.
0 commit comments