Skip to content

Commit

Permalink
CI: Adjust how godot-cpp is tested
Browse files Browse the repository at this point in the history
  • Loading branch information
Repiteo committed Sep 18, 2024
1 parent 694d3c2 commit 907c4cc
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 81 deletions.
34 changes: 34 additions & 0 deletions .github/actions/godot-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ inputs:
# actions/cache has 10 GiB limit, and GitHub runners have a 14 GiB disk.
# Limit to 7 GiB to avoid having the extracted cache fill the disk.
default: 7168
godot-cpp:
description: Build godot-cpp as well.
default: false
bin:
description: The path to the Godot executable; only required if building godot-cpp.
default: ''

runs:
using: composite
Expand Down Expand Up @@ -51,3 +57,31 @@ runs:
scons platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
ls -l bin/
if [ ${{ inputs.godot-cpp }} = true ]; then
${{ inputs.bin }} --headless --dump-gdextension-interface --dump-extension-api
cp -f gdextension_interface.h godot-cpp/gdextension/
cp -f extension_api.json godot-cpp/gdextension/
echo Building with flags: --directory=godot-cpp/test ${{ env.SCONSFLAGS }}
scons --directory=godot-cpp/test ${{ env.SCONSFLAGS }}
fi
# - name: SCons Build (godot-cpp)
# if: inputs.godot-cpp
# shell: sh
# env:
# SCONSFLAGS: ${{ inputs.sconsflags }}
# SCONS_CACHE: ${{ inputs.scons-cache }}
# SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
# run: |
# echo ${{ inputs.godot-cpp }}

# ${{ inputs.bin }} --headless --dump-gdextension-interface --dump-extension-api
# cp -f gdextension_interface.h godot-cpp/gdextension/
# cp -f extension_api.json godot-cpp/gdextension/

# # echo Building with flags: --directory=godot-cpp/test platform=${{ inputs.platform }} target=${{ inputs.target }} ${{ env.SCONSFLAGS }}
# # scons --directory=godot-cpp/test platform=${{ inputs.platform }} target=${{ inputs.target }} ${{ env.SCONSFLAGS }}
# echo Building with flags: --directory=godot-cpp/test target=${{ inputs.target }} ${{ env.SCONSFLAGS }}
# scons --directory=godot-cpp/test target=${{ inputs.target }} ${{ env.SCONSFLAGS }}
69 changes: 0 additions & 69 deletions .github/workflows/godot_cpp_test.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
GODOT_CPP_BRANCH: 4.3
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes strict_checks=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
Expand Down Expand Up @@ -94,6 +95,15 @@ jobs:
with:
submodules: recursive

- name: Checkout godot-cpp
if: matrix.target == 'editor' && !matrix.legacy-scons
uses: actions/checkout@v4
with:
repository: godotengine/godot-cpp
ref: ${{ env.GODOT_CPP_BRANCH }}
submodules: recursive
path: godot-cpp

# Need newer mesa for lavapipe to work properly.
- name: Linux dependencies for tests
if: matrix.proj-test
Expand Down Expand Up @@ -142,6 +152,8 @@ jobs:
platform: linuxbsd
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
godot-cpp: ${{ matrix.target == 'editor' && !matrix.legacy-scons }}
bin: ${{ matrix.bin }}

- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
GODOT_CPP_BRANCH: 4.3
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes strict_checks=yes

concurrency:
Expand Down Expand Up @@ -39,6 +40,15 @@ jobs:
with:
submodules: recursive

- name: Checkout godot-cpp
if: matrix.target == 'editor'
uses: actions/checkout@v4
with:
repository: godotengine/godot-cpp
ref: ${{ env.GODOT_CPP_BRANCH }}
submodules: recursive
path: godot-cpp

- name: Restore Godot build cache
uses: ./.github/actions/godot-cache-restore
with:
Expand All @@ -59,6 +69,8 @@ jobs:
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
godot-cpp: ${{ matrix.target == 'editor' }}
bin: ./bin/godot.macos.${{ matrix.target }}.x86_64

- name: Compilation (arm64)
uses: ./.github/actions/godot-build
Expand All @@ -67,6 +79,8 @@ jobs:
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
godot-cpp: true
bin: ./bin/godot.macos.${{ matrix.target }}.arm64

- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
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
4 changes: 4 additions & 0 deletions .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ jobs:
- name: Class reference schema checks
run: |
xmllint --noout --schema doc/class.xsd doc/classes/*.xml modules/*/doc_classes/*.xml platform/*/doc_classes/*.xml
- name: Run C compiler on `gdextension_interface.h`
run: |
gcc -c core/extension/gdextension_interface.h
12 changes: 12 additions & 0 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
GODOT_CPP_BRANCH: 4.3
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes d3d12=yes strict_checks=yes "angle_libs=${{ github.workspace }}/"
SCONS_CACHE_MSVC_CONFIG: true

Expand Down Expand Up @@ -53,6 +54,15 @@ jobs:
with:
submodules: recursive

- name: Checkout godot-cpp
if: matrix.target == 'editor'
uses: actions/checkout@v4
with:
repository: godotengine/godot-cpp
ref: ${{ env.GODOT_CPP_BRANCH }}
submodules: recursive
path: godot-cpp

- name: Restore Godot build cache
uses: ./.github/actions/godot-cache-restore
with:
Expand Down Expand Up @@ -86,6 +96,8 @@ jobs:
platform: windows
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
godot-cpp: ${{ matrix.target == 'editor' }}
bin: ${{ matrix.bin }}

- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
Expand Down

0 comments on commit 907c4cc

Please sign in to comment.