Skip to content

Commit

Permalink
Upload core files etc upon CI failure (#3405)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshinwell authored Dec 24, 2024
1 parent dc6e300 commit 2358e09
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,20 @@ jobs:
--with-dune=$GITHUB_WORKSPACE/ocaml-414/_install/bin/dune \
${{ matrix.config }}
- name: Setup for saving core files (not for macOS at the moment)
if: matrix.os != 'macos-latest'
run: |
sudo mkdir /cores
sudo chmod 777 /cores
# Core filenames will be of the form executable.pid.timestamp:
sudo bash -c 'echo "/cores/%e.%p.%t" > /proc/sys/kernel/core_pattern'
- name: Build, install and test Flambda backend
working-directory: flambda_backend
run: |
if [ $run_testsuite = true ]; then target=ci; else target=compiler; fi
export PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH
ulimit -c unlimited
make $target \
|| (if [ $expected_fail = true ]; then exit 0; else exit 1; fi);
env:
Expand All @@ -265,6 +274,25 @@ jobs:
if: matrix.check_arch == true
run: |
PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH make check_all_arches
- uses: actions/upload-artifact@v3
if: ${{ failure() }} && matrix.os != 'macos-latest'
with:
name: cores
path: /cores

- uses: actions/upload-artifact@v3
if: ${{ failure() }} && matrix.os != 'macos-latest'
with:
name: _build
path: $GITHUB_WORKSPACE/_build

- uses: actions/upload-artifact@v3
if: ${{ failure() }} && matrix.os != 'macos-latest'
with:
name: _runtest
path: $GITHUB_WORKSPACE/_runtest

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

0 comments on commit 2358e09

Please sign in to comment.