CI: improve logging for configure, build and install steps
* Line buffering for stdout and stderr to better preserve log order * Full log now contains both stdout and stderr to keep errors in context
This commit is contained in:
@@ -50,7 +50,8 @@ runs:
|
||||
id: configure
|
||||
shell: bash
|
||||
run: |
|
||||
cmake -S ${{ inputs.sourcedir }} -B ${{ inputs.builddir }} -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE ${{inputs.extraParameters }} > ${{ inputs.logFile }} 2> ${{ inputs.errorFile }}
|
||||
(stdbuf -oL -eL cmake -S ${{ inputs.sourcedir }} -B ${{ inputs.builddir }} -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE ${{inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash
|
||||
if: always()
|
||||
@@ -72,8 +73,3 @@ runs:
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
# Print the Log to the console
|
||||
cat ${{ inputs.errorFile }}
|
||||
echo "::group::Configure Log"
|
||||
cat ${{ inputs.logFile }}
|
||||
echo "::endgroup::"
|
||||
|
||||
Reference in New Issue
Block a user