https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
n

Nacho Ruiz Martin

03/17/2024, 5:35 PM
👋 Building an embedded Xcode framework takes too long for the first time. This is not a problem locally, because then the Gradle cache starts making magic and each consecutive build is good enough, but on CI this means that: 1. On GitHub: It consumes all the free monthly build minutes because Mac machines cost 10 times more in minutes 2. On Bitrise: It always encounters the timeout of 30 minutes that the free tier offers. Do you have any strategy to ease this pain point? Thanks!
h

hfhbd

03/17/2024, 5:44 PM
Do you use the Gradle build cache GutHub action? Did you also try the M1 macOS runner on GitHub?
n

Nacho Ruiz Martin

03/17/2024, 5:46 PM
Gradle build cache GutHub action
Ah, I don’t. I wasn’t aware of its existence. Is it this one?
Did you also try the M1 macOS runner on GitHub?
I think so? I added this on github actions:
Copy code
runs-on: macos-latest
h

hfhbd

03/17/2024, 5:50 PM
Nope:
macos-14
🤯 1
gratitude thank you 1
n

Nacho Ruiz Martin

03/17/2024, 5:51 PM
Nope: https://github.com/gradle/actions
I think I can’t really use this one because I’m using
Fastlane
to build my iOS App.
h

hfhbd

03/17/2024, 5:53 PM
It should work too
n

Nacho Ruiz Martin

03/17/2024, 5:54 PM
So just adding :
Copy code
- name: Setup Gradle
      uses: gradle/actions/setup-gradle@v3
Should magically cache the output from Fastlane?
h

hfhbd

03/17/2024, 5:54 PM
Yes
n

Nacho Ruiz Martin

03/17/2024, 5:54 PM
That sounds… awesome.
Thanks, mate, I’ll try 👍
h

hfhbd

03/17/2024, 5:58 PM
By default it only caches the main branch, so you need to merge/commit it in main branch first to get the effect. (And wait for a PR/change after successful run creating the cache).
n

Nacho Ruiz Martin

03/17/2024, 6:00 PM
Ok, that makes sense! 🙂 Thank you.
2 Views