mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
CI: Change godot-cpp from workflow to action
This commit is contained in:
parent
791c87eb7a
commit
b8480ffa21
4 changed files with 49 additions and 78 deletions
39
.github/actions/godot-cpp-build/action.yml
vendored
Normal file
39
.github/actions/godot-cpp-build/action.yml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
name: Build godot-cpp
|
||||||
|
description: Build godot-cpp with the provided options.
|
||||||
|
|
||||||
|
env:
|
||||||
|
GODOT_CPP_BRANCH: 4.3
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
bin:
|
||||||
|
description: Path to the Godot binary.
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
scons-flags:
|
||||||
|
description: Additional SCons flags.
|
||||||
|
type: string
|
||||||
|
scons-cache:
|
||||||
|
description: The SCons cache path.
|
||||||
|
default: ${{ github.workspace }}/.scons_cache/
|
||||||
|
type: string
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
repository: godotengine/godot-cpp
|
||||||
|
ref: ${{ env.GODOT_CPP_BRANCH }}
|
||||||
|
path: godot-cpp
|
||||||
|
|
||||||
|
- name: Extract API
|
||||||
|
shell: sh
|
||||||
|
run: ${{ inputs.bin }} --headless --dump-gdextension-interface --dump-extension-api
|
||||||
|
|
||||||
|
- name: SCons Build
|
||||||
|
shell: sh
|
||||||
|
env:
|
||||||
|
SCONS_CACHE: ${{ inputs.scons-cache }}
|
||||||
|
run: scons --directory=./godot-cpp/test "gdextension_dir=${{ github.workspace }}" ${{ inputs.scons-flags }}
|
57
.github/workflows/godot_cpp_test.yml
vendored
57
.github/workflows/godot_cpp_test.yml
vendored
|
@ -1,57 +0,0 @@
|
||||||
name: 🪲 Godot CPP
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
|
|
||||||
# Global Settings
|
|
||||||
env:
|
|
||||||
# Used for the cache key. Add version suffix to force clean build.
|
|
||||||
GODOT_BASE_BRANCH: master
|
|
||||||
# Used for the godot-cpp checkout.
|
|
||||||
GODOT_CPP_BRANCH: 4.3
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
godot-cpp-tests:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
name: Build and test Godot CPP
|
|
||||||
timeout-minutes: 30
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
sparse-checkout: |
|
|
||||||
.github
|
|
||||||
misc/utility/problem-matchers.json
|
|
||||||
|
|
||||||
- name: Checkout godot-cpp
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
repository: godotengine/godot-cpp
|
|
||||||
ref: ${{ env.GODOT_CPP_BRANCH }}
|
|
||||||
path: godot-cpp
|
|
||||||
|
|
||||||
- name: Setup Python and SCons
|
|
||||||
uses: ./.github/actions/godot-deps
|
|
||||||
|
|
||||||
- name: Download GDExtension interface and API dump
|
|
||||||
uses: ./.github/actions/download-artifact
|
|
||||||
with:
|
|
||||||
name: godot-api-dump
|
|
||||||
path: ./godot-cpp/gdextension
|
|
||||||
|
|
||||||
# TODO: Enable caching when godot-cpp has proper cache limiting.
|
|
||||||
|
|
||||||
# - name: Restore Godot build cache
|
|
||||||
# uses: ./.github/actions/godot-cache-restore
|
|
||||||
# with:
|
|
||||||
# cache-name: godot-cpp
|
|
||||||
# continue-on-error: true
|
|
||||||
|
|
||||||
- name: Build godot-cpp test extension
|
|
||||||
run: scons --directory=./godot-cpp/test target=template_debug dev_build=yes verbose=yes
|
|
||||||
|
|
||||||
# - name: Save Godot build cache
|
|
||||||
# uses: ./.github/actions/godot-cache-save
|
|
||||||
# with:
|
|
||||||
# cache-name: godot-cpp
|
|
||||||
# continue-on-error: true
|
|
19
.github/workflows/linux_builds.yml
vendored
19
.github/workflows/linux_builds.yml
vendored
|
@ -33,7 +33,9 @@ jobs:
|
||||||
proj-conv: true
|
proj-conv: true
|
||||||
api-compat: true
|
api-compat: true
|
||||||
artifact: true
|
artifact: true
|
||||||
cache-limit: 1
|
# Validate godot-cpp compatibility on one arbitrary editor build.
|
||||||
|
godot-cpp: true
|
||||||
|
cache-limit: 2
|
||||||
|
|
||||||
- name: Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, scu_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=gold)
|
- name: Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, scu_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=gold)
|
||||||
cache-name: linux-editor-double-sanitizers
|
cache-name: linux-editor-double-sanitizers
|
||||||
|
@ -44,8 +46,6 @@ jobs:
|
||||||
build-mono: false
|
build-mono: false
|
||||||
tests: true
|
tests: true
|
||||||
proj-test: true
|
proj-test: true
|
||||||
# Generate an API dump for godot-cpp tests.
|
|
||||||
api-dump: true
|
|
||||||
# Skip 2GiB artifact speeding up action.
|
# Skip 2GiB artifact speeding up action.
|
||||||
artifact: false
|
artifact: false
|
||||||
cache-limit: 7
|
cache-limit: 7
|
||||||
|
@ -158,6 +158,13 @@ jobs:
|
||||||
tests: ${{ matrix.tests }}
|
tests: ${{ matrix.tests }}
|
||||||
scons-cache-limit: ${{ matrix.cache-limit }}
|
scons-cache-limit: ${{ matrix.cache-limit }}
|
||||||
|
|
||||||
|
- name: Compilation (godot-cpp)
|
||||||
|
uses: ./.github/actions/godot-cpp-build
|
||||||
|
if: matrix.godot-cpp
|
||||||
|
with:
|
||||||
|
bin: ${{ matrix.bin }}
|
||||||
|
scons-flags: target=template_debug dev_build=yes verbose=yes
|
||||||
|
|
||||||
- name: Save Godot build cache
|
- name: Save Godot build cache
|
||||||
uses: ./.github/actions/godot-cache-save
|
uses: ./.github/actions/godot-cache-save
|
||||||
with:
|
with:
|
||||||
|
@ -187,12 +194,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.cache-name }}
|
name: ${{ matrix.cache-name }}
|
||||||
|
|
||||||
- name: Dump Godot API
|
|
||||||
uses: ./.github/actions/godot-api-dump
|
|
||||||
if: matrix.api-dump
|
|
||||||
with:
|
|
||||||
bin: ${{ matrix.bin }}
|
|
||||||
|
|
||||||
- name: Unit tests
|
- name: Unit tests
|
||||||
if: matrix.tests
|
if: matrix.tests
|
||||||
run: |
|
run: |
|
||||||
|
|
12
.github/workflows/runner.yml
vendored
12
.github/workflows/runner.yml
vendored
|
@ -44,15 +44,3 @@ jobs:
|
||||||
name: 🌐 Web
|
name: 🌐 Web
|
||||||
needs: static-checks
|
needs: static-checks
|
||||||
uses: ./.github/workflows/web_builds.yml
|
uses: ./.github/workflows/web_builds.yml
|
||||||
|
|
||||||
# Third stage: Run auxiliary tests using build artifacts from previous jobs.
|
|
||||||
|
|
||||||
# Can be turned off for PRs that intentionally break compat with godot-cpp,
|
|
||||||
# until both the upstream PR and the matching godot-cpp changes are merged.
|
|
||||||
godot-cpp-test:
|
|
||||||
name: 🪲 Godot CPP
|
|
||||||
# This can be changed to depend on another platform, if we decide to use it for
|
|
||||||
# godot-cpp instead. Make sure to move the .github/actions/godot-api-dump step
|
|
||||||
# appropriately.
|
|
||||||
needs: linux-build
|
|
||||||
uses: ./.github/workflows/godot_cpp_test.yml
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue