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

CI: Add C compile step for gdextension_interface.h #96408

Merged

Conversation

Bromeon
Copy link
Contributor

@Bromeon Bromeon commented Aug 31, 2024

It has happened repeatedly that C++ code accidentally crept into the GDExtension C header, a notable example being use of the bool type, latest example being #96406.

This change adds a CI step to check the header with a C-only compiler. I chose gcc without any flags, let me know if there's an invocation that would fit better.

Also, I put it as a separate job next to Godot CPP; maybe there's a better place.


This CI will fail until #96406 is merged.

Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

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

Looks good to me! But it would be good for folks who are more engaged with the build/CI stuff to advise if this is a good place to put it in the GitHub workflows.

The CI failed before PR #96406 was merged in the expected way. I've just clicked the button for that job to re-run, so we can ensure it passes now that that has been fixed.

UPDATE: Ah, nevermind, it'll need to be rebased before it'll actually pass.

@akien-mga akien-mga changed the title CI: add C compile step for gdextension_interface.h CI: Add C compile step for gdextension_interface.h Sep 2, 2024
It has happened repeatedly that C++ code accidentally crept into the
GDExtension C header, a notable example being use of the `bool` type.
This change adds a CI step to check the header with a C-only compiler.
@Bromeon Bromeon force-pushed the feature/gdextension-c-compile branch from 6ab1b8c to c89a57d Compare September 2, 2024 17:03
@Bromeon
Copy link
Contributor Author

Bromeon commented Sep 2, 2024

Rebased on master.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 2, 2024
@akien-mga akien-mga merged commit 71ad72b into godotengine:master Sep 3, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@Bromeon Bromeon deleted the feature/gdextension-c-compile branch September 3, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants