diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 95bb2620865..8fb29218912 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: @@ -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