With proper configuration, each of our build jobs can generate code for the CPU architectures we are interested in on that platform (e.g. a single Linux build could generate the amd64 and arm64 binaries). This is possible thanks to Kotlin's support for cross-compilation. See this recent SO answer for a possible set of Gradle incantations (it's surprisingly straightforward, but not "simple", because nothing that interacts with Gradle is simple 🥲).
Additional details:
- This issue does not mention compiling to Windows arm64, because that target is not supported yet by Kotlin Native (see related issue).
- In theory, it's even possible to cross-compile from one operating system to another, so we could (again, in theory) have a single build job for all platforms. In practice, however, cross compilation across operating systems is tricky (see e.g. this issue) and, what's worse, it's not properly documented (the docs mention in passing that cross compilation is possible, but don't provide any details whatsoever).