Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI step for compiling and testing godot-cpp #54015

Merged
merged 1 commit into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down
11 changes: 11 additions & 0 deletions misc/scripts/compare_extension_api.py
Original file line number Diff line number Diff line change
@@ -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)