Skip to content

Commit

Permalink
CI: Change godot-cpp from workflow to action
Browse files Browse the repository at this point in the history
  • Loading branch information
Repiteo committed Jan 20, 2025
1 parent 791c87e commit b8480ff
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 78 deletions.
39 changes: 39 additions & 0 deletions .github/actions/godot-cpp-build/action.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 0 additions & 57 deletions .github/workflows/godot_cpp_test.yml

This file was deleted.

19 changes: 10 additions & 9 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
proj-conv: true
api-compat: 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)
cache-name: linux-editor-double-sanitizers
Expand All @@ -44,8 +46,6 @@ jobs:
build-mono: false
tests: true
proj-test: true
# Generate an API dump for godot-cpp tests.
api-dump: true
# Skip 2GiB artifact speeding up action.
artifact: false
cache-limit: 7
Expand Down Expand Up @@ -158,6 +158,13 @@ jobs:
tests: ${{ matrix.tests }}
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
uses: ./.github/actions/godot-cache-save
with:
Expand Down Expand Up @@ -187,12 +194,6 @@ jobs:
with:
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
if: matrix.tests
run: |
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,3 @@ jobs:
name: 🌐 Web
needs: static-checks
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

0 comments on commit b8480ff

Please sign in to comment.