Add CI step for compiling and testing godot-cpp

This commit is contained in:
Bastiaan Olij 2021-10-20 18:22:49 +11:00
parent f4c3192d0a
commit daff03576d
2 changed files with 52 additions and 0 deletions

View File

@ -34,6 +34,7 @@ jobs:
tests: true tests: true
sconsflags: use_asan=yes use_ubsan=yes sconsflags: use_asan=yes use_ubsan=yes
proj-test: true proj-test: true
godot-cpp-test: true
bin: "./bin/godot.linuxbsd.tools.64s" bin: "./bin/godot.linuxbsd.tools.64s"
# Skip 2GiB artifact speeding up action. # Skip 2GiB artifact speeding up action.
artifact: false 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 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 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 - name: Prepare artifact
if: ${{ matrix.artifact }} if: ${{ matrix.artifact }}
run: | run: |

View File

@ -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)