Big build server improvements!

When the Defold extension system and the cloud builders were launched eight years ago it marked a milestone for Defold when game developers no longer had to rely on the Defold development team to provide integrations to third party services and platform specific features. Instead developers could write native code and add Lua bindings and have the code seamlessly integrated into the engine without installing any additional tools or SDKs.

A couple of months ago we made the decision to simplify the setup and operation of the build servers and we are now happy to announce that we’ve finished a large overhaul of the build servers. The servers are now split up into multiple instances where each instance is serving builds for a single platform. This will give us flexibility to quickly scale servers up and down depending on use, and even suspend servers that are inactive for a period of time.

The servers have also been migrated from Amazon Web Services to Google Cloud Platform (GCP) and the container images for each platform are available from a public container registry on GCP. The public container registry greatly simplifies the work involved in setting up your own local build servers or servers running on your own GCP account.

The new system has been running for a month and we are very happy with the results. The setup is easier to maintain and operate and it will help us save money. It is now also a lot easier for users to set up their own build servers in a few easy steps. Have a look at the instructions in the official manual and try it out yourself!

NOTE: The build servers will obviously remain available free of charge, but we would also like to remind everyone that the servers, storage and bandwidth are far from free. The Defold Foundation currently pays well over a €1000 each month for servers, storage and network traffic. If you are a regular user of the build servers (most users are) please consider donating through GitHub Sponsors, Patreon or PayPal.

32 Likes

Thanks to all of you. I bet it was really challenging. AWS quickly becomes a mess for large projects. I can’t imagine moving something from AWS to GCP. :smiley: Nice to know it went smoothly

I always use a local Extender server while developing. I highly encourage everyone to try it out—it’s very easy to set up, especially on macOS. Since it’s local, it’s so fast to work with.
I only use Defold servers for release builds or when I need to fix/identify something related to my local Extender server version.

P.S: It’s not that I’m trying to avoid donating or supporting; it’s just that I’m always broke :smiley:

11 Likes

What is the use of a build server?

I already build from the editor :slight_smile:

If your project has dependencies containing native code, such as Google Firebase, Admob, Steam SDK, DearImGUI, Poki SDK then you are using the public build servers already. Probably without knowing it.

The purpose of the build servers is to compile the native code (C, C++, Objective C, Java) from such an extension and include it into the engine. The entire process happens on the server where we have compilers and tools available to do the work for you. If it weren’t for the build servers you would instead have to install and configure compilers, platform SDKs and additional tools on your own.

10 Likes

I understand. Thank you

I hope defold will be a more powerful engine and pass unity

1 Like

Awesome. Try it today, this is much easy to install build server now. Windows build worked for me :fire: :partying_face:

Thanks :+1:

6 Likes

That’s nice to hear!

5 Likes

Another thing that’s not mentioned, is that we have similar images for the console developers. Just reach out to us for more info!

5 Likes

I’m reviewing the new setup instructions for Extender (macOS), and I feel the previous version was much clearer, more detailed, and beginner-friendly. At the very least, these points seem crucial:

This one failed for me:

> DM_PACKAGES_URL=http://localhost:9999 ./server/scripts/standalone/setup-standalone-env.sh 
Load common env ...
Load user env ...
/Users/selimanac/Development/defold/defold-extender/server/scripts/standalone/../../envs/user.env: line 16: Text.app/Contents/SharedSupport/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/selimanac/.composer/vendor/bin: No such file or directory

EDIT: I removed PATH from user.env since it is not used by setup-standalone-env.sh and it setups fine.

SDK versions:

Also I’m using xcode 16. So I was able to change the sdks before… I’m not sure what to do now, it takes sometime I guess…

I thought we can edit the Sdk versions using .env files but I guess I was wrong. I had to edit
setup-standalone-env.sh file accordingly. It would be very useful If we can set those from .env file.:

# Keep Apple's naming convention to avoid bugs
PACKAGES=(
    iPhoneOS18.0.sdk
    iPhoneSimulator18.0.sdk
    MacOSX15.0.sdk
    XcodeDefault16.0.xctoolchain.darwin
    XcodeDefault16.0.xctoolchain.darwin
)

EDIT: Turns out this is not enough anymore

I have to edit macos.env:

XCODE_15_VERSION=16.0
XCODE_15_CLANG_VERSION=16.0.0
MACOS_14_VERSION=15.0
IOS_17_VERSION=18.0

Server URL&Port

It was http://localhost:9010/before. What is it now?
It would be nice to have this info when server starts.

EDIT: it is the same.

Local Extender’s application

It was a one step setup before. Setup and go. I never had problem before.
So now, we have an other step.
Failed at first attempt because I download the files from Github.
There is no info releated to this at How to build Extender’s applications

> Configure project :server
fatal: not a git repository (or any of the parent directories): .git

Defold SDK

When I restart the server, Defold SDK has been deleted and downloading again(In my case lots of times). This is not a big deal but it would be nice to keep it until it is changed.

Edit: I’m so glad that we don’t have to download .net sdk every time when we start the server anymore. Server start almost instantly now and ready to go, this is great. Thank you.

The given sdk does not exist: http://d.defold.com/archive/stable/93cf6cab32223e2754304468fcb4180d710e501a/engine/defoldsdk.zip 404 NOT_FOUND
2024-09-28 15:31:38.972 - INFO 13532 --- [-job9526855955840446559] c.d.extender.services.DefoldSdkService   : Downloading Defold SDK from http://d.defold.com/archive/93cf6cab32223e2754304468fcb4180d710e501a/engine/defoldsdk.zip ...
6 Likes

Thanks for feedback!
I’ll return description of topics that you highlighted in your feedback.
Regarding issue with user.env - I guees my back because I didn’t escape spaces in PATH variable and as result it prevents from sourcing user.env file.

1 Like

Thank you.
I’m still trying to build it with using latest sdks. I guess I have to edit .env files now. I’ll update the post if I got stuck.

Thanks again, actually process is much more simple and .env files are great to edit. Because I was editing the .sh files before which is not nice.

3 Likes

Great feedback. Thank you one more time :heart:

2 Likes

I have to update my local development environment so this was inevitable.

I manage to start the server but I got an error while building the native extension template locally. It builds fine if I use https://build-stage.defold.com/ so this is a big problem for me. Any idea?

I think I have to stick with v2.6.5 for now.

_crash file:
_crash.zip (2.7 KB)


Thread 0 Crashed:: engine_main Dispatch queue: com.apple.main-thread
0   dmengine                      	       0x103409cf0 lj_vmeta_tgetr + 24
1   dmengine                      	       0x1034097ac lj_BC_FUNCC + 44
2   dmengine                      	       0x103421420 lua_pcall + 148
3   dmengine                      	       0x1033e5e4c dmRender::RunScript(dmRender::RenderScriptInstance*, dmRender::RenderScriptFunction, void*) + 452 (render_script.cpp:3386)
4   dmengine                      	       0x1032f1eac dmEngine::Init(dmEngine::Engine*, int, char**) + 7648 (engine.cpp:1353)
5   dmengine                      	       0x1032f2eb4 dmEngineCreate(int, char**) + 172 (engine.cpp:2243)
6   dmengine                      	       0x1032f3abc dmEngine::RunLoop(dmEngine::RunLoopParams const*) + 84 (engine_loop.cpp:68)
7   dmengine                      	       0x1032f39b4 EngineMain(int, char**) + 80 (engine_main.cpp:55) [inlined]
8   dmengine                      	       0x1032f39b4 engine_main(int, char**) + 104 (engine_main.cpp:151)
9   dyld                          	       0x19ce77154 start + 2476
1 Like

Looks like v2.6.5 has other problems:

But unfortunately I still got crash. I think it is related to new macOS SDK. So no more local extender for me…

EDIT: Downloading the xcode 15.4, I’m going to try with it again. Nope this doesn’t work either.
UPDATE: I manage to build and run using v2.6.5 with xcode 15.4 now. I’m going to try the ‘dev’ branch using xcode 15.4 again. But still this error is something to consider…
UPDATE: ‘dev’ branch using xcode 15.4 still crashing for me.

Have you tried to get a grant from Google to pay for this?

We are actually discussing it!

2 Likes