Skip to content

Commit 587a7ba

Browse files
committed
Remove manual tweak of gdextension_interface.h from CI
Remnant from times where the header regularly had breaking changes. Since Godot 4.1, changes should generally be backwards compatible. Some patching still happens in Rust code, with direct String::replace() calls.
1 parent d093359 commit 587a7ba

File tree

3 files changed

+1
-138
lines changed

3 files changed

+1
-138
lines changed

.github/composite/godot-itest/action.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -162,34 +162,6 @@ runs:
162162
fi
163163
shell: bash
164164

165-
# This step no longer fails if there's a diff, as we expect header to be forward-compatible; instead issues a warning
166-
# However, still fails if patch cannot be applied (conflict).
167-
# Step is only run in latest, not for compat 4.0.1 etc. -> no need to take into account different header versions.
168-
- name: "Copy and compare GDExtension header"
169-
if: inputs.godot-check-header == 'true'
170-
run: |
171-
mv godot-ffi/src/gen/gdextension_interface.h godot-ffi/src/gen/gdextension_interface_prebuilt.h
172-
mv $RUNNER_DIR/godot_bin/gdextension_interface.h godot-ffi/src/gen/gdextension_interface.h
173-
git apply godot-bindings/res/tweak.patch
174-
cd godot-ffi/src/gen
175-
git diff --no-index --exit-code --quiet gdextension_interface_prebuilt.h gdextension_interface.h || {
176-
echo "OUTCOME=header-diff" >> $GITHUB_ENV
177-
echo "::warning::gdextension_interface.h is not up-to-date."
178-
echo ""
179-
180-
echo "### :warning: Outdated GDExtension API header" >> $GITHUB_STEP_SUMMARY
181-
echo "gdextension_interface.h contains the following differences:" >> $GITHUB_STEP_SUMMARY
182-
echo "\`\`\`diff" >> $GITHUB_STEP_SUMMARY
183-
git diff --no-index gdextension_interface_prebuilt.h gdextension_interface.h >> $GITHUB_STEP_SUMMARY || true
184-
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
185-
echo "After manually updating file, run: \`git diff -R > tweak2.patch && mv tweak2.patch tweak.patch\`." >> $GITHUB_STEP_SUMMARY
186-
187-
# Undo modifications
188-
mv gdextension_interface_prebuilt.h gdextension_interface.h
189-
#exit 1
190-
}
191-
shell: bash
192-
193165
- name: "Run Godot integration tests"
194166
# Aborts immediately if Godot outputs certain keywords (would otherwise stall until CI runner times out).
195167
# Explanation:

godot-bindings/res/tweak.patch

Lines changed: 0 additions & 108 deletions
This file was deleted.

godot-ffi/build.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ fn main() {
1616
// struggle with static analysis when symbols are outside the crate directory (April 2023).
1717
let gen_path = Path::new(concat!(env!("CARGO_MANIFEST_DIR"), "/src/gen"));
1818

19-
// C header is not strictly required, however it is generated for debugging, and to allow CI
20-
// to check for differences (tweak.patch).
19+
// C header is not strictly required, however it is generated for debugging.
2120
let h_path = gen_path.join("gdextension_interface.h");
2221
let rs_path = gen_path.join("gdextension_interface.rs");
2322

0 commit comments

Comments
 (0)