@@ -200,12 +200,14 @@ jobs:
200
200
if : matrix.os == 'macos-latest'
201
201
run : HOMEBREW_NO_INSTALL_CLEANUP=TRUE brew install autoconf
202
202
203
+ # NB. The "rev" number in the cache key below must be updated each time
204
+ # the patch file is changed!
203
205
- name : Cache OCaml 4.14, dune and menhir
204
206
uses : actions/cache@v4
205
207
id : cache
206
208
with :
207
209
path : ${{ github.workspace }}/ocaml-414/_install
208
- key : ${{ matrix.os }}-cache-ocaml-414-patched-dune-3152-menhir-20231231
210
+ key : ${{ matrix.os }}-cache-ocaml-414-patched-dune-3152-menhir-20231231-rev13
209
211
210
212
- name : Checkout OCaml 4.14
211
213
uses : actions/checkout@master
@@ -285,14 +287,23 @@ jobs:
285
287
--with-dune=$GITHUB_WORKSPACE/ocaml-414/_install/bin/dune \
286
288
${{ matrix.config }}
287
289
288
- - name : Setup for saving core files (not for macOS at the moment )
290
+ - name : Setup for saving core files (not for macOS)
289
291
if : matrix.os != 'macos-latest'
290
292
run : |
291
293
sudo mkdir /cores
292
294
sudo chmod 777 /cores
293
295
# Core filenames will be of the form executable.pid.timestamp:
294
296
sudo bash -c 'echo "/cores/%e.%p.%t" > /proc/sys/kernel/core_pattern'
295
297
298
+ - name : Setup for saving core files (macOS)
299
+ if : matrix.os == 'macos-latest'
300
+ run : |
301
+ sudo chmod 1777 /cores
302
+ sudo sysctl kern.coredump=1
303
+ /usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow bool true" /tmp/core.entitlements
304
+ codesign -s - -f --entitlements /tmp/core.entitlements $GITHUB_WORKSPACE/ocaml-414/_install/bin/ocamlc.opt
305
+ codesign -s - -f --entitlements /tmp/core.entitlements $GITHUB_WORKSPACE/ocaml-414/_install/bin/ocamlopt.opt
306
+
296
307
- name : Build, install and test Flambda backend
297
308
working-directory : flambda_backend
298
309
run : |
@@ -313,25 +324,35 @@ jobs:
313
324
run : |
314
325
PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH make check_all_arches
315
326
316
- # CR-soon xclerc for xclerc: re-enable the "upload-artifact" action
317
- # (they are failing @4 because the names are not unique)
318
- # - uses: actions/upload-artifact@v4
319
- # if: ${{ failure() }} && matrix.os != 'macos-latest'
320
- # with:
321
- # name: cores-${{ github.sha }}
322
- # path: /cores
323
- #
324
- # - uses: actions/upload-artifact@v4
325
- # if: ${{ failure() }} && matrix.os != 'macos-latest'
326
- # with:
327
- # name: _build-${{ github.sha }}
328
- # path: $GITHUB_WORKSPACE/_build
327
+ - uses : actions/upload-artifact@v4
328
+ if : ${{ failure() }}
329
+ with :
330
+ name : cores-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
331
+ path : /cores
332
+
333
+ # - uses: actions/upload-artifact@v4
334
+ # if: ${{ failure() }}
335
+ # with:
336
+ # name: ocaml-414-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
337
+ # path: ${{ github.workspace }}/ocaml-414/_install
338
+
339
+ - uses : actions/upload-artifact@v4
340
+ if : ${{ failure() }} && matrix.os == 'macos-latest'
341
+ with :
342
+ name : DiagnosticReports-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
343
+ path : /Users/runner/Library/Logs/DiagnosticReports
344
+
345
+ # - uses: actions/upload-artifact@v4
346
+ # if: ${{ failure() }}
347
+ # with:
348
+ # name: _build-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
349
+ # path: ${{ github.workspace }}/flambda_backend/_build
329
350
#
330
- # - uses: actions/upload-artifact@v4
331
- # if: ${{ failure() }} && matrix.os != 'macos-latest'
332
- # with:
333
- # name: _runtest-${{ github.sha }}
334
- # path: $GITHUB_WORKSPACE /_runtest
351
+ # - uses: actions/upload-artifact@v4
352
+ # if: ${{ failure() }}
353
+ # with:
354
+ # name: _runtest-${{ github.sha }}-${{ github.run_id }}-${{ matrix.name }}
355
+ # path: ${{ github.workspace }}/flambda_backend /_runtest
335
356
336
357
concurrency :
337
358
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
0 commit comments