github actions: archive logs on failure.

The test harnesses log details to files during the run,
which is helpful when debugging issues which are only
reported as a run failure in the console output.

When the build job fails, upload an artifact consisting
of a zipfile with all the log files from the build,
so users can investigate test failures in ci more
easily.
This commit is contained in:
Ralph Giles
2021-07-03 16:05:44 -07:00
parent 37d1a620eb
commit df35f5ea41

View File

@@ -149,3 +149,10 @@ jobs:
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.configure-opts }} -DCMAKE_FIND_FRAMEWORK=NEVER
cmake --build .
ctest -V
- name: Upload logs on failure
uses: actions/upload-artifact@v2
if: failure()
with:
name: flac-${{ github.sha }}-${{ github.run_id }}-logs
path: ./**/*.log