godot_cpp_test.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: 🪲 Godot CPP
  2. on:
  3. workflow_call:
  4. # Global Settings
  5. env:
  6. # Used for the cache key, and godot-cpp checkout. Add version suffix to force clean build.
  7. GODOT_BASE_BRANCH: '4.1'
  8. concurrency:
  9. group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-cpp-tests
  10. cancel-in-progress: true
  11. jobs:
  12. godot-cpp-tests:
  13. runs-on: "ubuntu-20.04"
  14. name: "Build and test Godot CPP"
  15. steps:
  16. - uses: actions/checkout@v4
  17. - name: Setup python and scons
  18. uses: ./.github/actions/godot-deps
  19. # Checkout godot-cpp
  20. - name: Checkout godot-cpp
  21. uses: actions/checkout@v4
  22. with:
  23. repository: godotengine/godot-cpp
  24. ref: ${{ env.GODOT_BASE_BRANCH }}
  25. submodules: 'recursive'
  26. path: 'godot-cpp'
  27. # Download generated API dump
  28. - name: Download GDExtension interface and API dump
  29. uses: ./.github/actions/download-artifact
  30. with:
  31. name: 'godot-api-dump'
  32. path: './godot-api'
  33. # Extract and override existing files with generated files
  34. - name: Extract GDExtension interface and API dump
  35. run: |
  36. cp -f godot-api/gdextension_interface.h godot-cpp/gdextension/
  37. cp -f godot-api/extension_api.json godot-cpp/gdextension/
  38. # TODO: Add caching to the scons build and store it for CI via the godot-cache
  39. # action.
  40. # Build godot-cpp test extension
  41. - name: Build godot-cpp test extension
  42. run: |
  43. cd godot-cpp/test
  44. scons target=template_debug dev_build=yes
  45. cd ../..