summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2021-10-20 18:22:49 +1100
committerBastiaan Olij <mux213@gmail.com>2021-10-21 20:30:19 +1100
commitdaff03576dc83b913a34d73298624192c7f28554 (patch)
tree7745ee49ec920df166624455ddfca4a994ff94ff
parentf4c3192d0a558cae80b1e601b64deb0c6ae3a0ff (diff)
Add CI step for compiling and testing godot-cpp
-rw-r--r--.github/workflows/linux_builds.yml41
-rwxr-xr-xmisc/scripts/compare_extension_api.py11
2 files changed, 52 insertions, 0 deletions
diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml
index 018839b817..f6d11e2efe 100644
--- a/.github/workflows/linux_builds.yml
+++ b/.github/workflows/linux_builds.yml
@@ -34,6 +34,7 @@ jobs:
tests: true
sconsflags: use_asan=yes use_ubsan=yes
proj-test: true
+ godot-cpp-test: true
bin: "./bin/godot.linuxbsd.tools.64s"
# Skip 2GiB artifact speeding up action.
artifact: false
@@ -126,6 +127,46 @@ jobs:
VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run ${{ matrix.bin }} 40 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true
misc/scripts/check_ci_log.py sanitizers_log.txt
+ # Checkout godot-cpp
+ - name: Checkout godot-cpp
+ if: ${{ matrix.godot-cpp-test }}
+ uses: actions/checkout@v2
+ with:
+ repository: godotengine/godot-cpp
+ submodules: 'recursive'
+ path: 'godot-cpp'
+
+ # Check extension API
+ - name: Check for extension api updates
+ 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/gdnative_interface.h godot-cpp/godot-headers/godot/
+
+ # Build godot-cpp library
+ - name: Build godot-cpp library
+ if: ${{ matrix.godot-cpp-test }}
+ run: |
+ cd godot-cpp
+ scons target=${{ matrix.target }} generate_bindings=yes -j2
+ cd ..
+
+ # Build godot-cpp test extension
+ - name: Build godot-cpp test extension
+ if: ${{ matrix.godot-cpp-test }}
+ run: |
+ cd godot-cpp/test
+ scons target=${{ matrix.target }} -j2
+ cd ../..
+
- name: Prepare artifact
if: ${{ matrix.artifact }}
run: |
diff --git a/misc/scripts/compare_extension_api.py b/misc/scripts/compare_extension_api.py
new file mode 100755
index 0000000000..f96db4278c
--- /dev/null
+++ b/misc/scripts/compare_extension_api.py
@@ -0,0 +1,11 @@
+#!/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)