Skip to content

Conversation

@ABUCKY0
Copy link
Contributor

@ABUCKY0 ABUCKY0 commented Mar 20, 2025

Fixes #3

Given the following block of code:

COMPILE_STD_OUTPUT=$(mktemp)
echo "::group::Build Project"
meson setup --cross-file scripts/v5.ini build | tee $COMPILE_STD_OUTPUT
meson_exit_code=${PIPESTATUS[0]}
echo "PIPESTATUS: ${PIPESTATUS[@]}"
echo "Meson setup exit code: $meson_exit_code"
if [ $meson_exit_code -ne 0 ]; then
echo "Meson setup failed. Please check the logs for more information."
if [ "$INPUT_WRITE_JOB_SUMMARY" == "true" ]; then
{
echo "Meson setup failed. Please check the logs for more information. "
echo "***"
echo "

Click to expand "
echo " "
echo "``` "
echo " "
cat $COMPILE_STD_OUTPUT
echo " "
echo "``` "
echo " "
echo "
"
} >> $GITHUB_STEP_SUMMARY
fi
echo "::endgroup::"
exit 1
fi
echo "::endgroup::"
this line

echo "PIPESTATUS: ${PIPESTATUS[@]}" was for some reason causing setup failures to not actually exit the build.sh script when they should

Fixes

  • Remove this line
  • Add tests to prevent this in the future

ABUCKY0 added 7 commits March 19, 2025 18:52
If somehow the `meson setup` command were to fail, the prior verson of this script did not error at the `if [ $meson_exit_code -ne 0 ]; then` step.
checks to see if the setup command fails by not cloning the test repository (currently the kernel)
…he specific case we want instead of excluding extra ones we don't want
@ABUCKY0 ABUCKY0 added the bug Something isn't working label Mar 20, 2025
@ABUCKY0 ABUCKY0 self-assigned this Mar 20, 2025
@ABUCKY0 ABUCKY0 changed the title Fix meson setup failure not exiting Fix meson setup failure not exiting build script when it should Mar 20, 2025
… for Meson setup and compile failures` since it's unrelated to this PR
@ABUCKY0 ABUCKY0 marked this pull request as ready for review March 20, 2025 01:38
Copy link
Member

@SizzinSeal SizzinSeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I want @meisZWFLZ to review this before it gets merged

@ABUCKY0 ABUCKY0 requested a review from meisZWFLZ March 20, 2025 01:40
Copy link

@meisZWFLZ meisZWFLZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ABUCKY0 ABUCKY0 merged commit c540f38 into main Mar 20, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: 🐛 Meson setup failure doesn't actually exit the script when it should.

4 participants