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 be3c2be
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 92 deletions.
21 changes: 21 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,18 @@ runs:
scons platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
ls -l bin/
- 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: |
${{ 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 }}
69 changes: 0 additions & 69 deletions .github/workflows/godot_cpp_test.yml

This file was deleted.

23 changes: 17 additions & 6 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 All @@ -27,7 +28,7 @@ jobs:
cache-name: linux-editor-mono
target: editor
sconsflags: module_mono_enabled=yes
bin: ./bin/godot.linuxbsd.editor.x86_64.mono
bin: bin/godot.linuxbsd.editor.x86_64.mono
build-mono: true
tests: false # Disabled due freeze caused by mix Mono build and CI
doc-test: true
Expand All @@ -40,7 +41,7 @@ jobs:
target: editor
# Debug symbols disabled as they're huge on this build and we hit the 14 GB limit for runners.
sconsflags: dev_build=yes scu_build=yes debug_symbols=no precision=double use_asan=yes use_ubsan=yes linker=gold
bin: ./bin/godot.linuxbsd.editor.dev.double.x86_64.san
bin: bin/godot.linuxbsd.editor.dev.double.x86_64.san
build-mono: false
tests: true
proj-test: true
Expand All @@ -53,7 +54,7 @@ jobs:
cache-name: linux-editor-llvm-sanitizers
target: editor
sconsflags: dev_build=yes use_asan=yes use_ubsan=yes use_llvm=yes linker=lld
bin: ./bin/godot.linuxbsd.editor.dev.x86_64.llvm.san
bin: bin/godot.linuxbsd.editor.dev.x86_64.llvm.san
build-mono: false
tests: true
# Skip 2GiB artifact speeding up action.
Expand All @@ -66,7 +67,7 @@ jobs:
target: editor
tests: true
sconsflags: dev_build=yes use_tsan=yes use_llvm=yes linker=lld
bin: ./bin/godot.linuxbsd.editor.dev.x86_64.llvm.san
bin: bin/godot.linuxbsd.editor.dev.x86_64.llvm.san
build-mono: false
# Skip 2GiB artifact speeding up action.
artifact: false
Expand All @@ -75,7 +76,7 @@ jobs:
cache-name: linux-template-mono
target: template_release
sconsflags: module_mono_enabled=yes
bin: ./bin/godot.linuxbsd.template_release.x86_64.mono
bin: bin/godot.linuxbsd.template_release.x86_64.mono
build-mono: false
tests: true
artifact: true
Expand All @@ -84,7 +85,7 @@ jobs:
cache-name: linux-template-minimal
target: template_release
sconsflags: modules_enabled_by_default=no disable_3d=yes disable_advanced_gui=yes deprecated=no minizip=no
bin: ./bin/godot.linuxbsd.template_release.x86_64
bin: bin/godot.linuxbsd.template_release.x86_64
tests: true
artifact: true

Expand All @@ -94,6 +95,14 @@ jobs:
with:
submodules: recursive

- name: Checkout godot-cpp
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 +151,8 @@ jobs:
platform: linuxbsd
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
godot-cpp: true
bin: ${{ github.workspace }}/${{ matrix.bin }}

- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
Expand Down
17 changes: 15 additions & 2 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 All @@ -24,21 +25,29 @@ jobs:
cache-name: macos-editor
target: editor
tests: true
bin: ./bin/godot.macos.editor.universal
bin: bin/godot.macos.editor.universal

- name: Template (target=template_release, tests=yes)
cache-name: macos-template
target: template_release
tests: true
sconsflags: debug_symbols=no
bin: ./bin/godot.macos.template_release.universal
bin: bin/godot.macos.template_release.universal

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Checkout godot-cpp
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 +68,8 @@ jobs:
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
godot-cpp: true
bin: ${{ github.workspace }}/bin/godot.macos.${{ matrix.target }}.x86_64

- name: Compilation (arm64)
uses: ./.github/actions/godot-build
Expand All @@ -67,6 +78,8 @@ jobs:
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
godot-cpp: true
bin: ${{ github.workspace }}/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
17 changes: 14 additions & 3 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 All @@ -29,22 +30,22 @@ jobs:
tests: true
# Skip debug symbols, they're way too big with MSVC.
sconsflags: debug_symbols=no vsproj=yes vsproj_gen_only=no windows_subsystem=console
bin: ./bin/godot.windows.editor.x86_64.exe
bin: bin/godot.windows.editor.x86_64.exe
artifact: true

- name: Editor w/ clang-cl (target=editor, tests=yes, use_llvm=yes)
cache-name: windows-editor-clang
target: editor
tests: true
sconsflags: debug_symbols=no windows_subsystem=console use_llvm=yes
bin: ./bin/godot.windows.editor.x86_64.llvm.exe
bin: bin/godot.windows.editor.x86_64.llvm.exe

- name: Template (target=template_release, tests=yes)
cache-name: windows-template
target: template_release
tests: true
sconsflags: debug_symbols=no
bin: ./bin/godot.windows.template_release.x86_64.console.exe
bin: bin/godot.windows.template_release.x86_64.console.exe
artifact: true

steps:
Expand All @@ -53,6 +54,14 @@ jobs:
with:
submodules: recursive

- name: Checkout godot-cpp
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 +95,8 @@ jobs:
platform: windows
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
godot-cpp: true
bin: ${{ github.workspace }}/${{ matrix.bin }}

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

0 comments on commit be3c2be

Please sign in to comment.