Skip to content

Commit

Permalink
Test Pixel Engine Build
Browse files Browse the repository at this point in the history
  • Loading branch information
WhalesState committed Dec 17, 2024
1 parent cb9e702 commit 44fc8ae
Show file tree
Hide file tree
Showing 279 changed files with 1,553 additions and 708 deletions.
190 changes: 67 additions & 123 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes strict_checks=yes
SCONSFLAGS: verbose=yes warnings=extra werror=yes strict_checks=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
TSAN_OPTIONS: suppressions=misc/error_suppressions/tsan.txt
Expand All @@ -25,76 +25,20 @@ jobs:
fail-fast: false
matrix:
include:
- name: Editor w/ Mono (target=editor)
cache-name: linux-editor-mono
target: editor
sconsflags: module_mono_enabled=yes
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
proj-conv: true
api-compat: true
- name: Pixel Debug
cache-name: linux_pixel_engine_debug
target: pixel_debug
bin: ./bin/pixel.linuxbsd.pixel_debug.x86_64
artifact: true
cache-limit: 1

- 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
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
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

- name: Editor with clang sanitizers (target=editor, tests=yes, dev_build=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld)
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
build-mono: false
tests: true
# Skip 2GiB artifact speeding up action.
artifact: false
# Test our oldest supported SCons/Python versions on one arbitrary editor build.
legacy-scons: true
cache-limit: 7

- name: Editor with ThreadSanitizer (target=editor, tests=yes, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)
cache-name: linux-editor-thread-sanitizer
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
build-mono: false
# Skip 2GiB artifact speeding up action.
artifact: false
cache-limit: 5

- name: Template w/ Mono (target=template_release, tests=yes)
cache-name: linux-template-mono
target: template_release
sconsflags: module_mono_enabled=yes
bin: ./bin/godot.linuxbsd.template_release.x86_64.mono
build-mono: false
tests: true
- name: Pixel Release
cache-name: linux_pixel_engine_release
target: pixel_debug
bin: ./bin/pixel.linuxbsd.pixel_release.x86_64
artifact: true
cache-limit: 1

- name: Minimal template (target=template_release, tests=yes, everything disabled)
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
tests: true
artifact: true
cache-limit: 1

steps:
- name: Checkout
Expand Down Expand Up @@ -143,10 +87,10 @@ jobs:
- name: Compilation
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
sconsflags: ${{ env.SCONSFLAGS }}
platform: linuxbsd
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
# tests: ${{ matrix.tests }}
scons-cache-limit: ${{ matrix.cache-limit }}

- name: Save Godot build cache
Expand All @@ -155,71 +99,71 @@ jobs:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true

- name: Generate C# glue
if: matrix.build-mono
run: |
${{ matrix.bin }} --headless --generate-mono-glue ./modules/mono/glue
# - name: Generate C# glue
# if: matrix.build-mono
# run: |
# ${{ matrix.bin }} --headless --generate-mono-glue ./modules/mono/glue

- name: Build .NET solutions
if: matrix.build-mono
run: |
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
# - name: Build .NET solutions
# if: matrix.build-mono
# run: |
# ./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd

- name: Prepare artifact
if: matrix.artifact
run: |
strip bin/godot.*
chmod +x bin/godot.*
strip bin/pixel.*
chmod +x bin/pixel.*
- name: Upload artifact
uses: ./.github/actions/upload-artifact
if: matrix.artifact
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: |
${{ matrix.bin }} --version
${{ matrix.bin }} --help
${{ matrix.bin }} --headless --test --force-colors
- name: .NET source generators tests
if: matrix.build-mono
run: |
dotnet test modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests
# Check class reference
- name: Check for class reference updates
if: matrix.doc-test
run: |
echo "Running --doctool to see if this changes the public API without updating the documentation."
echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n"
${{ matrix.bin }} --doctool --headless 2>&1 > /dev/null || true
git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$'
# Check API backwards compatibility
- name: Check for GDExtension compatibility
if: matrix.api-compat
run: |
./misc/scripts/validate_extension_api.sh "${{ matrix.bin }}"
# Download and run the test project
- name: Test Godot project
uses: ./.github/actions/godot-project-test
if: matrix.proj-test
with:
bin: ${{ matrix.bin }}

# Test the project converter
- name: Test project converter
uses: ./.github/actions/godot-converter-test
if: matrix.proj-conv
with:
bin: ${{ matrix.bin }}
# - 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: |
# ${{ matrix.bin }} --version
# ${{ matrix.bin }} --help
# ${{ matrix.bin }} --headless --test --force-colors

# - name: .NET source generators tests
# if: matrix.build-mono
# run: |
# dotnet test modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests

# # Check class reference
# - name: Check for class reference updates
# if: matrix.doc-test
# run: |
# echo "Running --doctool to see if this changes the public API without updating the documentation."
# echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n"
# ${{ matrix.bin }} --doctool --headless 2>&1 > /dev/null || true
# git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$'

# # Check API backwards compatibility
# - name: Check for GDExtension compatibility
# if: matrix.api-compat
# run: |
# ./misc/scripts/validate_extension_api.sh "${{ matrix.bin }}"

# # Download and run the test project
# - name: Test Godot project
# uses: ./.github/actions/godot-project-test
# if: matrix.proj-test
# with:
# bin: ${{ matrix.bin }}

# # Test the project converter
# - name: Test project converter
# uses: ./.github/actions/godot-converter-test
# if: matrix.proj-conv
# with:
# bin: ${{ matrix.bin }}
46 changes: 21 additions & 25 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes strict_checks=yes
SCONSFLAGS: verbose=yes warnings=extra werror=yes strict_checks=yes

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-macos
Expand All @@ -20,19 +20,17 @@ jobs:
fail-fast: false
matrix:
include:
- name: Editor (target=editor, tests=yes)
cache-name: macos-editor
target: editor
tests: true
bin: ./bin/godot.macos.editor.universal
- name: Pixel Debug
cache-name: macos_pixel_engine_debug
target: pixel_debug
bin: ./bin/pixel.macos.pixel_debug.universal
cache-limit: 1

- name: Template (target=template_release, tests=yes)
cache-name: macos-template
target: template_release
tests: true
- name: Pixel Release
cache-name: macos_pixel_engine_release
target: pixel_release
sconsflags: debug_symbols=no
bin: ./bin/godot.macos.template_release.universal
bin: ./bin/pixel.macos.pixel_release.universal
cache-limit: 1

steps:
Expand Down Expand Up @@ -60,17 +58,15 @@ jobs:
sconsflags: ${{ env.SCONSFLAGS }} arch=x86_64
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
scons-cache-limit: 0 # Only cap on second run to avoid purging unnecessarily
# tests: ${{ matrix.tests }}

- name: Compilation (arm64)
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} arch=arm64
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
scons-cache-limit: ${{ matrix.cache-limit }}
# tests: ${{ matrix.tests }}

- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
Expand All @@ -80,19 +76,19 @@ jobs:

- name: Prepare artifact
run: |
lipo -create ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64 -output ./bin/godot.macos.${{ matrix.target }}.universal
rm ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64
strip bin/godot.*
chmod +x bin/godot.*
lipo -create ./bin/pixel.macos.${{ matrix.target }}.x86_64 ./bin/pixel.macos.${{ matrix.target }}.arm64 -output ./bin/pixel.macos.${{ matrix.target }}.universal
rm ./bin/pixel.macos.${{ matrix.target }}.x86_64 ./bin/pixel.macos.${{ matrix.target }}.arm64
strip bin/pixel.*
chmod +x bin/pixel.*
- name: Upload artifact
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}

- name: Unit tests
if: matrix.tests
run: |
${{ matrix.bin }} --version
${{ matrix.bin }} --help
${{ matrix.bin }} --test --force-colors
# - name: Unit tests
# if: matrix.tests
# run: |
# ${{ matrix.bin }} --version
# ${{ matrix.bin }} --help
# ${{ matrix.bin }} --test --force-colors
38 changes: 19 additions & 19 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:

# Second stage: Run all the builds and some of the tests.

android-build:
name: 🤖 Android
needs: static-checks
uses: ./.github/workflows/android_builds.yml
# android-build:
# name: 🤖 Android
# needs: static-checks
# uses: ./.github/workflows/android_builds.yml

ios-build:
name: 🍏 iOS
needs: static-checks
uses: ./.github/workflows/ios_builds.yml
# ios-build:
# name: 🍏 iOS
# needs: static-checks
# uses: ./.github/workflows/ios_builds.yml

linux-build:
name: 🐧 Linux
Expand All @@ -40,19 +40,19 @@ jobs:
needs: static-checks
uses: ./.github/workflows/windows_builds.yml

web-build:
name: 🌐 Web
needs: static-checks
uses: ./.github/workflows/web_builds.yml
# web-build:
# 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
# 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

0 comments on commit 44fc8ae

Please sign in to comment.