abarichello / godot-ci

Docker image to export Godot Engine games. Templates for Gitlab CI and GitHub Actions to deploy to GitLab Pages/GitHub Pages/Itch.io.
https://hub.docker.com/r/barichello/godot-ci
MIT License
759 stars 133 forks source link

Windows build problems #112

Closed jtuchel closed 1 year ago

jtuchel commented 1 year ago

Given the following workflow to check if the game is buildable on PR

name: QA on pull request

on: pull_request

jobs:
  qa_on_pull_request:
    runs-on: ubuntu-latest
    container:
      image: docker://barichello/godot-ci:4.0.3
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Setup Godot build environment
        run: |
          mkdir -v -p build/windows build/linux build/web ~/.local/share/godot/templates
          mv /root/.local/share/godot/templates/4.0.3.stable ~/.local/share/godot/templates/4.0.3.stable

      - name: Build for Windows
        run: godot -v --export-release "Windows Desktop" ./build/windows/my-game.exe

      - name: Build for Linux
        run: godot -v --export-release "Linux/X11" ./build/linux/my-game.x86_64

      - name: Build for Web
        run: godot -v --export-release "HTML5" ./build/web/index.html

The workflow fails when building for Windows

Run godot -v --export-release "Windows Desktop" ./build/windows/my-game.exe
Godot Engine v[4](https://github.com/me/my-game/actions/runs/5235734221/jobs/9452773284#step:5:5).0.3.stable.official.5222a99f5 - https://godotengine.org/
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
libX11.so.6: cannot open shared object file: No such file or directory
ERROR: Can't load Xlib dynamically.
   at: DisplayServerX11 (platform/linuxbsd/x11/display_server_x11.cpp:[5](https://github.com/me/my-game/actions/runs/5235734221/jobs/9452773284#step:5:6)254)
Your video card drivers seem not to support the required Vulkan version.

If possible, consider updating your video card drivers or using the OpenGL 3 driver.

You can enable the OpenGL 3 driver by starting the engine from the
command line with the command:

    "godot" --rendering-driver opengl3

If you recently updated your video card drivers, try rebooting.
ERROR: Unable to create DisplayServer, all display drivers failed.
   at: setup2 (main/main.cpp:2018)
ERROR: Pages in use exist at exit in PagedAllocator: N[7](https://github.com/me/my-game/actions/runs/5235734221/jobs/9452773284#step:5:8)Variant5Pools[11](https://github.com/me/my-game/actions/runs/5235734221/jobs/9452773284#step:5:12)BucketLargeE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:140)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools[12](https://github.com/me/my-game/actions/runs/5235734221/jobs/9452773284#step:5:13)BucketMediumE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:140)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketSmallE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:140)
ERROR: BUG: Unreferenced static string to 0: interface_added
   at: unref (core/string/string_name.cpp:[13](https://github.com/me/my-game/actions/runs/5235734221/jobs/9452773284#step:5:14)1)
Error: Process completed with exit code [25](https://github.com/me/my-game/actions/runs/5235734221/jobs/9452773284#step:5:26)5.

Is my workflow wrong / am I missing something?

jtuchel commented 1 year ago

It seems I have to add a --headless flag to the Godot cli command

Calinou commented 1 year ago

Out of curiosity, where did you look to find the Godot export CLI argument to use? This has changed in 4.0 with the introduction of headless mode (and removal of separate headless binaries).

jtuchel commented 1 year ago

@Calinou smart people on Reddit helped :) https://www.reddit.com/r/godot/comments/14745d4/comment/jnve7xr/?utm_source=share&utm_medium=web2x&context=3

So based on your PR #113 , people should use the --headless flag and that's it?

Should I close this issue then?

Calinou commented 1 year ago

So based on your PR https://github.com/abarichello/godot-ci/pull/113 , people should use the --headless flag and that's it?

Yes 🙂

This issue can be closed now, the PR fixes something that isn't strictly related.