Skip to content

Conversation

@Calinou
Copy link
Member

@Calinou Calinou commented Jul 30, 2025

This allows finding issues in headless project export early on, including when exporting for a dedicated server.

We also use this opportunity to check whether the audiovisual output between the project being run from its files and the exported PCK matches (it should always be a perfect match, assuming the same GPU is used for both runs). This can be used to catch audiovisual discrepancies, which could indicate a bug in the export process. This also tests Movie Maker mode functionality while we're at it.

The test project is currently part of the main repository, so I've attempted to minimize the file size while making use of as many Godot features as possible. We could move this test project to a separate repository, but this would increase the complexity of the setup and make it harder for contributors to test this project locally (as well as further improve it).

This export test is performed on the Linux Editor w/ Mono job, which will allow for testing C# (not implemented in this PR yet).

The development of this PR has already uncovered several bugs so far:

Sounds that were

Preview

The project features:

  • LightmapGI setup, as well as most 3D rendering features enabled.
  • Custom text and visual shaders (the black and white spheres), with parameters set to non-default values. Global and per-instance uniforms are also used in the text shader. The default parameters are red, while the overrides are green. If the project is run/exported correctly, you should only see green spheres, not red ones.
  • All texture compression types (with and without mipmaps) as shown in the top-left corners. Size Limit is also used here, with a size of 29×29 to ensure we have valid behavior for texture sizes that aren't a multiple of 4.
  • 3D scene import in all supported formats (the apples).
  • Translation and font imports (standard, LCD subpixel, MSDF, bitmap).
  • GDScript, C# and GDExtension C++ using godot-cpp.
    - name: Build test GDExtension
      shell: sh
      run: |
        cd misc/test_project/addons/test_extension/
        git clone --depth=1 https://github.com/godotengine/godot-cpp.git src/godot-cpp/
        scons target=template_debug
        scons target=template_release
        cd ../../../../
image

TODO

  • Add DDS and KTX texture loading.
  • Add more resource types. Perhaps use an EditorScript to generate all of them, which might uncover some more bugs in the process.

For a future PR (due to the complexity):

  • Test exporting to Android with both Gradle and APK workflows. This will require waiting on the Android build to finish, then making this CI job download the artifacts and use them for export. It would also require setting up the Android SDK before exporting.
  • Test exporting to Windows and web platforms. Not as involved as Android, but it'll still require changing the CI setup to add dependencies to other platforms' workflows.
  • Test exporting to macOS and iOS. This requires using a macOS host, which may not be technically feasible due to Metal rendering driver fails to run on Apple's software Metal implementation (paravirtual device) #101773.

@Calinou Calinou added this to the 4.x milestone Jul 30, 2025
@Calinou Calinou requested a review from a team as a code owner July 30, 2025 23:07
@Calinou Calinou force-pushed the ci-test-project-export branch 4 times, most recently from 976845a to cc2c229 Compare July 31, 2025 00:40
@Calinou Calinou force-pushed the ci-test-project-export branch 2 times, most recently from 779f6ad to 9b4c6c6 Compare July 31, 2025 15:35
@Repiteo
Copy link
Contributor

Repiteo commented Jul 31, 2025

This is fantastic for testing purposes, and already coming along really nicely; great job!

Though, the test project itself shouldn't be in the repo. It's not something to worry about during this testing phase, but we should do something similar to the regression test project where it's downloaded from a remote location

@Calinou Calinou force-pushed the ci-test-project-export branch 2 times, most recently from 00c8440 to 72a215a Compare July 31, 2025 20:17
@Calinou Calinou force-pushed the ci-test-project-export branch 6 times, most recently from e6cd321 to 4da0e30 Compare August 5, 2025 21:15
@mihe
Copy link
Contributor

mihe commented Oct 30, 2025

Anything that can be done to help move this one forward? I'd love to see this merged in some form for 4.6, since it would've helped catch one or two of the regressions that I ran into during the last beta.

@Calinou Calinou force-pushed the ci-test-project-export branch from 4da0e30 to ae3cd86 Compare October 31, 2025 00:57
@Calinou
Copy link
Member Author

Calinou commented Oct 31, 2025

Anything that can be done to help move this one forward? I'd love to see this merged in some form for 4.6, since it would've helped catch one or two of the regressions that I ran into during the last beta.

I'll take a look at it again next week. Once I get CI to pass, we can look into creating a new repository in the @godotengine organization then update this PR to remove the test project from it (and make it clone the other repository instead).

There's already https://github.com/godotengine/godot-tests, but we don't seem to be using the tests from that repository anywhere currently.

The alternative is to modify https://github.com/godotengine/regression-test-project to include two projects side-by-side (the existing project + the new one).

What do you think?

@akien-mga
Copy link
Member

There's already https://github.com/godotengine/godot-tests, but we don't seem to be using the tests from that repository anywhere currently.

I guess using that repository makes sense. Eventually we might want to run more of this kind of integration tests which could be hosted in that repo. The existing tests may or may not be obsolete but you can likely replace the project_export one with your new project.

@Calinou
Copy link
Member Author

Calinou commented Nov 4, 2025

I'm getting a CI failure due to sanitizers on the regression test project (not the project added by this PR). How come it doesn't occur on master? I just rebased my PR on top of current master.

@Calinou Calinou force-pushed the ci-test-project-export branch 2 times, most recently from 7f8f543 to 1503d21 Compare November 12, 2025 22:13
@Calinou
Copy link
Member Author

Calinou commented Nov 12, 2025

I've removed C# for now as it was too difficult to get working. We can look into it again in a future PR, especially since the way C# is integrated in Godot may change in the near future.

I've also switched localization to gettext, as CSV constantly caused errors on export (even on my own machine in non-headless export). This is presumably due to its one-to-many nature, where importing a single CSV file creates multiple *.translation files. In contrast, gettext has a one-to-one mapping between source files and resulting translation files (the PO file is the translation file).

Also, the GDExtension build takes a very long time (10+ minutes). Is there a way to speed it up? Maybe we should commit a precompiled Linux library in the test project when I open a PR to godot-tests.

@mihe
Copy link
Contributor

mihe commented Nov 13, 2025

Also, the GDExtension build takes a very long time (10+ minutes). Is there a way to speed it up?

I sped up the build times of godot-cpp in Godot Jolt a lot by using CMake's built-in "unity builds", i.e. what Godot refers to as SCU builds. I feel like it would be fairly straight-forward to add support for that to godot-cpp's SCons setup. You really only need it for the generated *.cpp files, which make up the majority of the build times, and which would be trivial to ensure that they adhere to the various SCU quirks.

I'd be curious to hear what you think of that, @dsnopek.

EDIT: Maybe caching the build artifacts in GitHub Actions is an option as well?

@Calinou Calinou force-pushed the ci-test-project-export branch 3 times, most recently from 5344dec to 8f3c0a8 Compare November 13, 2025 22:10
@Calinou
Copy link
Member Author

Calinou commented Nov 13, 2025

I've removed VoxelGI and OBJ mesh/scenes from the test project for now, since they caused (benign) errors on headless export I couldn't fix. I have a fix in the works for VoxelGI, which will also make PCKs smaller by introducing a PlaceholderVoxelGI resource, but it'll be in a separate PR.

check_ci_log.py was modified to be optionally more strict, according to the GODOT_CHECK_CI_LOG_ALL_ERRORS=1 environment variable.

I'm still running into issues with GDExtension though. Running the project directly works, but running the exported PCK results in the GDExtension not being found.

@Calinou
Copy link
Member Author

Calinou commented Nov 25, 2025

CI is passing now, so I've opened a PR on godot-tests with the test project:

Once the above PR is merged, I'll change this PR to download the test project from godot-tests instead of embedding it here.

@Calinou Calinou force-pushed the ci-test-project-export branch from 4a012e6 to 93c23a1 Compare November 26, 2025 00:24
@mihe
Copy link
Contributor

mihe commented Nov 26, 2025

@Calinou Any plans on resuming the GDExtension part of this if/when this is merged, or did you find yourself stuck on the dynamic library loading issue you were having?

@Calinou
Copy link
Member Author

Calinou commented Nov 26, 2025

@Calinou Any plans on resuming the GDExtension part of this if/when this is merged, or did you find yourself stuck on the dynamic library loading issue you were having?

Yes, I'll look into it once this is merged. I've tried to use --export-release "Linux" instead of --export-pack, but it didn't seem to work (possibly because I accidentally left the output path as /tmp/test_project.zip instead of /tmp/test_project.x86_64, and this seemed to create a zipped export with missing GDExtension libraries).

I've reverted the PR to use --export-pack for now, but ideally, I would expect --export-pack to copy GDExtension libraries next to the PCK/ZIP just like --export-release (since it knows the platform it's exporting for).

@akien-mga
Copy link
Member

Once the above PR is merged, I'll change this PR to download the test project from godot-tests instead of embedding it here.

Just a reminder that this still needs to be done before merging.

This allows finding issues in headless project export early on,
including when exporting for a dedicated server.

We also use this opportunity to check whether the audiovisual output
between the project being run from its files and the exported PCK
matches (it should always be a perfect match, assuming the same GPU
is used for both runs). This can be used to catch audiovisual
discrepancies, which could indicate a bug in the export process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants