application-services icon indicating copy to clipboard operation
application-services copied to clipboard

Enable taskcluster to publish M1 artifacts

Open tarikeshaq opened this issue 3 years ago • 1 comments

Right now, the artifacts generated by taskcluster are all built for Intel Macs (note that the rust.targets there only have darwin)

If we would like our android release to be accessible by M1s, we should probably change our taskcluster configs a little. I'm not sure the full extent of what's needed, but at the minimum:

  • Most likely need to split the taskcluster job for desktop-macos into two, one for M1s and one for Intel (including modifying the desktop-macos script to handle M1s.
  • Include darwin-aarch64 in https://github.com/mozilla/application-services/blob/main/taskcluster/ci/module-build/kind.yml#L43
  • Add a rust add target aarch64-apple-darwin in https://github.com/mozilla/application-services/blob/main/taskcluster/scripts/toolchain/cross-compile-setup.sh#L33
  • Properly set the environment variables like is done in https://github.com/mozilla/application-services/blob/main/taskcluster/scripts/toolchain/cross-compile-setup.sh#L2-L11 (this will probably look something like:
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_AARCH64_APPLE_DARWIN_NSS_STATIC=1
.
.
  • There are most likely more changes that need to be done, but this is hitting the end of my familiarity with taskcluster
  • Check-in with the taskcluster team to make sure all is OK, but if we can get an M1 to run a release megazord artifact, then we should be good

┆Issue is synchronized with this Jira Task ┆Epic: Important backlog

tarikeshaq avatar Feb 05 '22 21:02 tarikeshaq

Couple notes on this one since I've been working on this lately:

  • I think https://github.com/mozilla/application-services/pull/5543 and https://github.com/mozilla/application-services/pull/5563 will affect this.
  • Those PRs run rustup add target aarch64-apple-darwin (source), so I don't think that will be needed anymore

Will this affect the binary size of the final Fenix build? I hope it would get optimized out at some point, but we should double check that. If it doesn't get optimized out, then maybe we need to handle this another way.

bendk avatar May 10 '23 15:05 bendk

Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1889970

tarikeshaq avatar Apr 05 '24 15:04 tarikeshaq