< prev index next >

.github/actions/do-build/action.yml

Print this page

49     - name: 'Check for failure'
50       id: check
51       run: |
52         # Check for failure marker file
53         build_dir="$(ls -d build/*)"
54         if [[ -e $build_dir/build-failure ]]; then
55           # Collect relevant log files
56           mkdir failure-logs
57           cp \
58               $build_dir/spec.gmk \
59               $build_dir/build.log \
60               $build_dir/configure.log \
61               $build_dir/make-support/failure-summary.log \
62               $build_dir/make-support/failure-logs/* \
63               failure-logs/ 2> /dev/null || true
64           echo 'failure=true' >> $GITHUB_OUTPUT
65         fi
66       shell: bash
67 
68     - name: 'Upload build logs'
69       uses: actions/upload-artifact@v3
70       with:
71         name: failure-logs-${{ inputs.platform }}${{ inputs.debug-suffix }}
72         path: failure-logs
73       if: steps.check.outputs.failure == 'true'
74 
75       # This is the best way I found to abort the job with an error message
76     - name: 'Notify about build failures'
77       uses: actions/github-script@v6
78       with:
79         script: core.setFailed('Build failed. See summary for details.')
80       if: steps.check.outputs.failure == 'true'

49     - name: 'Check for failure'
50       id: check
51       run: |
52         # Check for failure marker file
53         build_dir="$(ls -d build/*)"
54         if [[ -e $build_dir/build-failure ]]; then
55           # Collect relevant log files
56           mkdir failure-logs
57           cp \
58               $build_dir/spec.gmk \
59               $build_dir/build.log \
60               $build_dir/configure.log \
61               $build_dir/make-support/failure-summary.log \
62               $build_dir/make-support/failure-logs/* \
63               failure-logs/ 2> /dev/null || true
64           echo 'failure=true' >> $GITHUB_OUTPUT
65         fi
66       shell: bash
67 
68     - name: 'Upload build logs'
69       uses: actions/upload-artifact@v4
70       with:
71         name: failure-logs-${{ inputs.platform }}${{ inputs.debug-suffix }}
72         path: failure-logs
73       if: steps.check.outputs.failure == 'true'
74 
75       # This is the best way I found to abort the job with an error message
76     - name: 'Notify about build failures'
77       uses: actions/github-script@v7
78       with:
79         script: core.setFailed('Build failed. See summary for details.')
80       if: steps.check.outputs.failure == 'true'
< prev index next >