From c89a57d4c2bcaddaf4b53cc9fb6e3c8b4ebfad50 Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Sat, 31 Aug 2024 21:53:15 +0200 Subject: [PATCH] CI: add C compile step for gdextension_interface.h 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. --- .github/workflows/godot_cpp_test.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/godot_cpp_test.yml b/.github/workflows/godot_cpp_test.yml index e1c37bbc1e1..e3223c799be 100644 --- a/.github/workflows/godot_cpp_test.yml +++ b/.github/workflows/godot_cpp_test.yml @@ -56,3 +56,13 @@ jobs: cd godot-cpp/test scons target=template_debug dev_build=yes cd ../.. + + gdextension-c-compile: + runs-on: "ubuntu-20.04" + name: "Check GDExtension header with a C compiler" + steps: + - uses: actions/checkout@v4 + + - name: "Run C compiler on gdextension_interface.h" + run: | + gcc -c core/extension/gdextension_interface.h