Compiling HISE with GitHub Actions
-
@Dan-Korneff said in Compiling HISE with GitHub Actions:
@dannytaurus you've built the debug version which contains extra data
Sorry, I should've been more clear - it was the debug version for both.
Edited the original post
-
@dannytaurus maybe the github action built a universal binary?
-
@Christoph-Hart said in Compiling HISE with GitHub Actions:
@dannytaurus maybe the github action built a universal binary?
Ah, that's probably it! My Xcode is set up to build for 'My Mac' and not 'Any Mac'.
Nothing to worry about then!
-
@dannytaurus but
- why do you build the debug build?
- Does compiling a plugin also takes hours on your MacBook?
-
@Christoph-Hart said in Compiling HISE with GitHub Actions:
@dannytaurus but
- why do you build the debug build?
- Does compiling a plugin also takes hours on your MacBook?
- Because I was told it was quicker to build.
- No, exporting an AU plugin from the HISE Export menu takes a few minutes (if that's what you mean)
To be fair I haven't tried a release build on my MacBook but I can't imagine it would be quicker. Still worth a try though.
-
@dannytaurus said in Compiling HISE with GitHub Actions:
After a hilariously long (2h35m) compile on my 2020 M1 MacBook Air
Very strange, it takes about 5min with my M3, and even my ol' 2013 intel iMac took around 25-30min
-
@ustk said in Compiling HISE with GitHub Actions:
Very strange, it takes about 5min with my M3, and even my ol' 2013 intel iMac took around 25-30min
How much RAM does each machine have?
I only have 8GB RAM, which I think is a limiting factor.
In Activity Monitor it's maxed out in the red during compilation.
However, I ran couple of tests in Safe Mode and compilation time was around 15 mins so even if RAM is limiting there is definitely still something running in my normal setup that causes these crazy long compile times.
I will continue to investigate but for now I'm happy to compile on GitHub and download the app.
-
@Christoph-Hart said in Compiling HISE with GitHub Actions:
@dannytaurus maybe the github action built a universal binary?
Bingo! That was it.
I changed the build script to build arm64 only and now the downloaded app is the same size as locally compiled app.
Interestingly the build time didn't decrease that much on GitHub - 13 mins down to 11 mins, but I'll take it!
-
@dannytaurus said in Compiling HISE with GitHub Actions:
I only have 8GB RAM, which I think is a limiting factor.
Try reducing the number of threads/jobs you're using to build, try no more than 1 thread per GB of RAM.
-
@d-healey said in Compiling HISE with GitHub Actions:
Try reducing the number of threads/jobs you're using to build, try no more than 1 thread per GB of RAM.
There are 8 clang threads running but combined they're using about 12GB RAM, causing a lot of swap.
I could try with fewer threads.
-
@dannytaurus said in Compiling HISE with GitHub Actions:
I could try with fewer threads.
Try 6 or 4 - this will free up RAM which might help, but using fewer threads might negate the gains.
-
@d-healey I donโt think you can set the thread count on macOS this is a Linux only feature of GCC.
-
@Christoph-Hart said in Compiling HISE with GitHub Actions:
I donโt think you can set the thread count on macOS this is a Linux only feature of GCC.
You can set it with -jobs -
as you are doing here :)Oops, according to git blame I added that
https://github.com/christophhart/HISE/blob/develop/hi_backend/backend/CompileExporter.cpp#L2584
-
@d-healey said in Compiling HISE with GitHub Actions:
Try 6 or 4 - this will free up RAM which might help, but using fewer threads might negate the gains.
Yes, will do. I'm trying compiling with the script first, since you can't set jobs in the Xcode UI anyway.
First I'll see how the script build compares to the Xcode UI build. Should be the same I'm guessing.
Then I'll reduce the threads in the script to see what effect that has.