Merge pull request #70061 from akien-mga/ci-godot-cpp-handle-pr960

CI: Fix dumping GDExtension interface and API for godot-cpp
This commit is contained in:
Rémi Verschelde 2022-12-14 17:05:40 +01:00 committed by GitHub
commit c22876e61c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 23 deletions

View file

@ -198,20 +198,13 @@ jobs:
submodules: 'recursive'
path: 'godot-cpp'
# Check extension API
- name: Check for extension api updates
# Dump GDExtension interface and API
- name: Dump GDExtension interface and API for godot-cpp build
if: ${{ matrix.godot-cpp-test }}
run: |
echo "Running --dump-extension-api to create extensions api."
VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --audio-driver Dummy --dump-extension-api 2>&1 > /dev/null || true
misc/scripts/compare_extension_api.py godot-cpp/godot-headers/extension_api.json extension_api.json
# Copy new extension API files into place
- name: Copy new extension API files into place
if: ${{ matrix.godot-cpp-test }}
run: |
cp -f extension_api.json godot-cpp/godot-headers/
cp -f core/extension/gdextension_interface.h godot-cpp/godot-headers/godot/
${{ matrix.bin }} --headless --dump-gdextension-interface --dump-extension-api
cp -f gdextension_interface.h godot-cpp/gdextension/
cp -f extension_api.json godot-cpp/gdextension/
# Build godot-cpp test extension
- name: Build godot-cpp test extension

View file

@ -2594,6 +2594,7 @@ bool Main::start() {
}
if (dump_gdextension_interface || dump_extension_api) {
OS::get_singleton()->set_exit_code(EXIT_SUCCESS);
return false;
}

View file

@ -1,11 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# TODO:
# Add a process that compares the original godot-cpp/godot-headers/extension_api.json with the new extension_api.json (both passed as arguments) and reports any API calls that have been removed.
# If we only have additions or no changes to the file, we pass
# For now we deem this too early because the API isn't stable enough yet.
sys.exit(0)