Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppVeyor build failures do not always show in log output #12560

Closed
jay opened this issue Dec 20, 2023 · 4 comments
Closed

AppVeyor build failures do not always show in log output #12560

jay opened this issue Dec 20, 2023 · 4 comments
Labels
CI Continuous Integration Windows Windows-specific

Comments

@jay
Copy link
Member

jay commented Dec 20, 2023

I'm reviewing some CI jobs from a recent PR and I noticed that a bunch failed in appveyor. For example this one. When they fail the last line of the log always looks something like:

The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: ../../../docs/examples/10-at-a-time.c: In function 'main':

but that's it, that's the last line. It doesn't actually show the compilation error so I don't know what needs to be fixed.

@jay jay added the CI Continuous Integration label Dec 20, 2023
@icing
Copy link
Contributor

icing commented Dec 20, 2023

Yes, saw that too several times. I suspect the CI server cancelled maybe?

@vszakats
Copy link
Member

vszakats commented Dec 20, 2023

I've been documenting this issue since moving from MS-DOS batches to PowerShell in appveyor.yml. I don't know what the solution is.

PowerShell offers two options:

  • 'stop' on error, this will stop on error, but fails to show what the error is! (except the first line)
  • 'continue' on error, this will show the full error, but not stop on them.
    To make it worse, the PowerShell versions running in CI also consider an error when a called process outputs something to stderr. This has been fixed in recent releases.

Current situtation is almost unusable; to show errors one needs to switch between abort/continue back and forth.

This is so wrong, I'm fairly sure I'm missing something, but days/weeks of search didn't help finding a solution.

@vszakats vszakats added the Windows Windows-specific label Dec 20, 2023
@vszakats
Copy link
Member

vszakats commented Dec 20, 2023

If there is no better way with PowerShell, another fix is moving to an external shell script. Here's an implementation made back then (with posts related to this issue):
#11999 (comment)

More links:
#12444 (comment) (this issue)
#11976 (comment) (why not MS-DOS batches)

@jay
Copy link
Member Author

jay commented Dec 21, 2023

I agree bash would be better or at least easier to manage. Thanks for working on it. Some batch scripts that we use are inescapable because we have them for Windows systems without a unix shell, but as you know they can be called from bash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Windows Windows-specific
Development

Successfully merging a pull request may close this issue.

3 participants