virtualx-engine/.github/workflows/godot_cpp_test.yml
Yuri Sizov deb6025781 CI: Extract godot-cpp testing into its own job
This ensures that the godot-cpp job has plenty of resources
to run its build and avoid being affected by the main build.

Additionally:
- Extract test tasks into dedicated actions.
- Upload artifacts as early as possible.
- Ensure that we check master cache before random cache.
2023-08-01 20:41:45 +02:00

54 lines
1.6 KiB
YAML

name: 🪲 Godot CPP
on:
workflow_call:
# Global Settings
env:
# Used for the cache key, and godot-cpp checkout. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-cpp-tests
cancel-in-progress: true
jobs:
godot-cpp-tests:
runs-on: "ubuntu-20.04"
name: "Build and test Godot CPP"
steps:
- uses: actions/checkout@v3
- name: Setup python and scons
uses: ./.github/actions/godot-deps
# Checkout godot-cpp
- name: Checkout godot-cpp
uses: actions/checkout@v3
with:
repository: godotengine/godot-cpp
ref: ${{ env.GODOT_BASE_BRANCH }}
submodules: 'recursive'
path: 'godot-cpp'
# Download generated API dump
- name: Download GDExtension interface and API dump
uses: ./.github/actions/download-artifact
with:
name: 'godot-api-dump'
path: './godot-api'
# Extract and override existing files with generated files
- name: Extract GDExtension interface and API dump
run: |
cp -f godot-api/gdextension_interface.h godot-cpp/gdextension/
cp -f godot-api/extension_api.json godot-cpp/gdextension/
# TODO: Add caching to the scons build and store it for CI via the godot-cache
# action.
# Build godot-cpp test extension
- name: Build godot-cpp test extension
run: |
cd godot-cpp/test
scons target=template_debug dev_build=yes
cd ../..