Hello everyone, I have been working on a KMP proje...
# multiplatform
s
Hello everyone, I have been working on a KMP project, and it is growing in size, requiring me to spend a significant amount of time on the macOS runner in my CI. Which is very expensive. I'm not sure if I can achieve this, but my thought is to build shared code on Linux Runner and then cache it to use on macOS runner. This will save a significant amount of time.
Copy code
- name: Build Shared iOS Framework for Xcode
        run: ./gradlew shared:embedAndSignAppleFrameworkForXcode
      - name: Upload Shared Framework for iOS
        uses: actions/upload-artifact@v4
        with:
          name: ios-shared-framework
          path: shared/build/xcode-frameworks/
I want something like above, but the problem is I can not run ./gradlew shared:embedAndSignAppleFrameworkForXcode on the Linux runner. So is there an alternative to do this, or is it something not possible?
j
Having a remote build cache node might help you, it could also benefit your developers https://hub.docker.com/r/gradle/build-cache-node/
💡 2
s
@Jack Boswell Thanks for the reply. Remote cache should work. But I'm researching options and want to know if I can build shared code and generate binaries on the Linux runner and then use them on macos runner. The reason I came to this thought is by reading about the klib artifact, which is for kmp libraries, but not sure if I can do it for the kmp project. https://kotlinlang.org/docs/whatsnew21.html#ability-to-publish-kotlin-libraries-from-any-host
j
I'm not sure if it'll work off the top of my head, but if you set up a remote build cache you should get insights into what gets reused across platforms
👍 1