Blender automated builds on Github

I managed to build Blender (Windows, Mac and Linux) with Github Actions.
This should make sharing experimental builds much easier for developers.

I had to make a few small changes. It builds with a custom script (build.py in the root folder) and the links to git submodules and svn repos are hard-coded.
Aside from that, there’s not too much to explain, really.

I haven’t figured out yet how to build it with CUDA, though.

Not sure if it makes sense to try to get this onto master. Opinions?

7 Likes

I looks great!
I suppose the problem with Cycles is CUDA / OpenCL. It that’s the case, it could be a weakness and and opportunity. I could be a great chance to increase usefulness with ARM architecture. There are a lot of people that could like to use Blender in ARM processors. Github Actions supports ARM. Could it be possible?

Thanks!
No idea what’s the current state of Blender on ARM, but there aren’t prebuilt binaries for it.
https://svn.blender.org/svnroot/bf-blender/trunk/lib/

Regarding Cycles, it works, It’s just CUDA what doesn’t work and just because I havent tried to support it yet.
I guess it shouldn’t be too hard. I’ll give it a try at some point.

CUDA isn’t terribly difficult to build, it just requires some headers that are not FLOSS (the SDK from NVIDIA). On Windows, I don’t remember any special steps to do this, but on Linux it can be tedious because you have to disable the nouveau driver and do everything from a shell.

We have automated scripts for building Blender on buildbot. Those could perhaps be improved to work on Github Actions. I wouldn’t add another script that duplicates the same logic.
https://wiki.blender.org/wiki/Infrastructure/BuildBot#Setup

CUDA or OptiX compilation does not require any specific graphics card drivers. In particular for OptiX it’s just a folder with some header files that is needed.

1 Like

I meant the feature.
I wrote my own build script because I had some problems with the built-in ones. (They assume that submodules are present on the same server as the main repo, SVN binaries are selected based on the branch name, the checkout process fails often…)
And since the iteration times for Github Actions are very slow I just took the easy route.

Anyway, while I find being able to compile and distribute custom Blender builds for free for every OS quite useful… this hasn’t generated too much interest.
So for now I think that having it available on my own Github repo should be enough.

1 Like

In case someone is interested in using those, I created something similar, trying to use the buildbot scripts:

https:// github.com/grische/blender/tree/feature/github_actions/.github/workflows

master: https://github.com/grische/blender/actions/runs/190357923
2.90: https://github.com/grische/blender/actions/runs/190361573
2.83: https://github.com/grische/blender/actions/runs/190362216

The step names are based upon the buildbot steps:
https://builder.blender.org/admin/#/builders/26/builds/10

Unfortunately, I don’t have access to codesign, so those builds will fail with the current buildbot scripts (especially Windows is enforcing codesign during the compile step).

5 Likes

Nice to see our worker scripts can also run on GitHub. I’ve now made code signing optional, only enabled with the --code-sign parameter for the worker scripts. We needed this ourselves, but it should also help with these GitHub workflows.

1 Like

I’m very excited about this opportunity, thank you for sharing!

I tried @grische’s version.
(https://github.com/grische/blender/tree/feature/github_actions/.github/workflows)

I tried to build for Mac, and I have one remark.
It creates an artifact with this content:

blender-macos_master.zip
    Blender.app
    buildbot_upload.zip
        blender-2.92.0-62897f25df17-macOS.dmg
            Blender.app

The root “Blender.app” doesn’t work, so it would be nice to exclude it from the archive. The version from the .dmg works.