summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Giles <giles@thaumas.net>2021-07-03 16:05:44 -0700
committerRalph Giles <giles@thaumas.net>2021-07-11 13:53:07 -0700
commitdf35f5ea41ab3e639c0be4958b90798af56088d6 (patch)
treec1eec1fc912b71ef2f941e0721900a3bb81d1f42
parent37d1a620eb2c2ffe52446df5832608196d57f562 (diff)
downloadflac-df35f5ea41ab3e639c0be4958b90798af56088d6.tar.gz
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.
-rw-r--r--.github/workflows/action.yml7
1 files changed, 7 insertions, 0 deletions
diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml
index 4f1c8ac3..9e922335 100644
--- a/.github/workflows/action.yml
+++ b/.github/workflows/action.yml
@@ -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