2023-08-01 18:38:07 +00:00
|
|
|
name: 🪲 Godot CPP
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
|
|
|
|
# Global Settings
|
|
|
|
env:
|
2023-09-01 21:11:51 +00:00
|
|
|
# Used for the cache key. Add version suffix to force clean build.
|
2023-08-01 18:38:07 +00:00
|
|
|
GODOT_BASE_BRANCH: master
|
2023-09-01 21:11:51 +00:00
|
|
|
# Used for the godot-cpp checkout.
|
2024-07-08 15:41:20 +00:00
|
|
|
GODOT_CPP_BRANCH: 4.3
|
2023-08-01 18:38:07 +00:00
|
|
|
|
|
|
|
concurrency:
|
2024-07-08 15:41:20 +00:00
|
|
|
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-cpp-tests
|
2023-08-01 18:38:07 +00:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
godot-cpp-tests:
|
2024-07-08 15:41:20 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
name: Build and test Godot CPP
|
2023-08-01 18:38:07 +00:00
|
|
|
steps:
|
2024-07-08 15:41:20 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
2024-03-16 02:52:47 +00:00
|
|
|
with:
|
2024-09-18 20:29:00 +00:00
|
|
|
sparse-checkout: .github
|
2023-08-01 18:38:07 +00:00
|
|
|
|
|
|
|
- name: Checkout godot-cpp
|
2023-09-04 14:05:38 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-08-01 18:38:07 +00:00
|
|
|
with:
|
2024-09-18 20:29:00 +00:00
|
|
|
submodules: recursive
|
2023-08-01 18:38:07 +00:00
|
|
|
repository: godotengine/godot-cpp
|
2023-09-01 21:11:51 +00:00
|
|
|
ref: ${{ env.GODOT_CPP_BRANCH }}
|
2024-07-08 15:41:20 +00:00
|
|
|
path: godot-cpp
|
2023-08-01 18:38:07 +00:00
|
|
|
|
2024-09-18 20:29:00 +00:00
|
|
|
- name: Setup Python and SCons
|
|
|
|
uses: ./.github/actions/godot-deps
|
|
|
|
|
|
|
|
- name: Setup GCC problem matcher
|
|
|
|
uses: ammaraskar/gcc-problem-matcher@master
|
|
|
|
|
2023-08-01 18:38:07 +00:00
|
|
|
- name: Download GDExtension interface and API dump
|
|
|
|
uses: ./.github/actions/download-artifact
|
|
|
|
with:
|
2024-07-08 15:41:20 +00:00
|
|
|
name: godot-api-dump
|
2024-09-18 20:29:00 +00:00
|
|
|
path: ./godot-cpp/gdextension
|
2023-08-01 18:38:07 +00:00
|
|
|
|
2024-09-18 20:29:00 +00:00
|
|
|
# TODO: Enable caching when godot-cpp has proper cache limiting.
|
2023-08-01 18:38:07 +00:00
|
|
|
|
2024-09-18 20:29:00 +00:00
|
|
|
# - name: Restore Godot build cache
|
|
|
|
# uses: ./.github/actions/godot-cache-restore
|
|
|
|
# with:
|
|
|
|
# cache-name: godot-cpp
|
|
|
|
# continue-on-error: true
|
2023-08-01 18:38:07 +00:00
|
|
|
|
|
|
|
- name: Build godot-cpp test extension
|
2024-09-18 20:29:00 +00:00
|
|
|
env: # Keep synced with godot-build.
|
|
|
|
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
|
|
|
|
SCONS_CACHE_LIMIT: 7168
|
|
|
|
run: scons --directory=./godot-cpp/test target=template_debug dev_build=yes verbose=yes
|
2024-08-31 19:53:15 +00:00
|
|
|
|
2024-09-18 20:29:00 +00:00
|
|
|
# - name: Save Godot build cache
|
|
|
|
# uses: ./.github/actions/godot-cache-save
|
|
|
|
# with:
|
|
|
|
# cache-name: godot-cpp
|
|
|
|
# continue-on-error: true
|