RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.26k stars 1.26k forks source link

macOS x86_64 releases and CI #19057

Open jwnimmer-tri opened 1 year ago

jwnimmer-tri commented 1 year ago

See https://github.com/RobotLocomotion/drake/issues/17210 for background. Short summary: our macOS x86_64 cloud hosting is Monterey-only and unsupported beyond that, meaning that it will probably die off later this year or next year.

We need to find another way to run x86_64 for macOS -- at minimum, for monthly release packages. Ideally, for nightly packaging builds as well. And even most ideally, with nightly CI that actually runs all of the tests.

One option would be GitHub actions.

The fallback option is to take one of our Mac Mini machines, reimage it from scratch, and run it in our own closet to do manual builds on it for monthly release packages.

jwnimmer-tri commented 1 year ago

As of today at least, GitHub actions macoOS runners also top out at macOS 12. Hopefully they get macOS 13 in there before 14 is out and Drake drops support for 12.

Aha. I found it on their roadmap: https://github.com/github/roadmap/issues/620

The (small) runner currently offers:

    3-core CPU (x86_64)
    14 GB of RAM
    14 GB of SSD space

I'll see if I can get a release build ETA on that hardware profile, to see if it's plausible for us to have a GitHub action for building release binaries there.

I tested a Mac mini “Core i7” (Late 2018), 6-core Intel i5 CPU with bazel build -j 3 //:install as a rough estimate. It took 31 minutes. That does not account for homebrew setup time, that was only the build step. Looking at d-e-e setup timings, it's something like 15-20 minutes for Homebrew.

All together, it's around a hour for a packaging build. That seems plausible to run nightly.

The wheel build would be par with packaging, maybe ~2x longer due to rebuilding dependencies from source? Still plausible for nightlies, I think.

The other question is about disk footprint of a build.

The bazel build footprint is around 2.1 GiB. Wheel dependencies might add a fraction beyond that, but still well in scope of 14 GiB limit. The question would be how much space homebrew stuff takes up. Still probably fine.

jwnimmer-tri commented 1 year ago

Ah, duh. I just misread the billing terms. For public repositories, there is no minutes limit. Only private repos have the cap.

~The GitHub Actions free tier seems to be 2000 minutes. Free builds on macOS machines claim to burn at 10x rate, which means only 200 minutes per month total!~

~However, given that drake-external-examples runs a mac build every night that takes 20-30 minutes, I must be misunderstanding something or we'd be over our limit regularly.~

~Huh. RobotLocomotion is only being billed for https://github.com/RobotLocomotion/drake-jenkins-jobs (which is tiny). I wonder where the d-e-e billing is going.~

jwnimmer-tri commented 1 year ago

Aha. I found it on their roadmap: https://github.com/github/roadmap/issues/620

The issue was just finished. GitHub Actions now supports Ventura on x86_64.

jwnimmer-tri commented 6 months ago

The https://github.com/jwnimmer-tri/drake_github_workflow_prototype/ seems to be able to build x86_64 wheels OK in GHA now (for macOS 13). I had to disable IPOPT and SNOPT for now get it working, but hopefully those are not too terrible to fix.

jwnimmer-tri commented 3 months ago

I've used that prototype now to release our wheels for 1.29 and 1.30. I think it's ready for prime time. Once we have the https://github.com/RobotLocomotion/drake/issues/21574 flag in Drake, we can work on moving that repo into playbook production.

jwnimmer-tri commented 2 months ago

And for 1.31, the Drake pin was able to be the exact release tag, no special patches. So this is basically ready to go into production as part of the https://drake.mit.edu/release_playbook.html.

The goal is to take https://github.com/jwnimmer-tri/drake_github_workflow_prototype/ and move it into RobotLocomotion somewhere, either still as a separate repository, or possibly added to the drake-ci repo?

The yaml also needs a few tweaks to make it suitable for the playbook, e.g.:

jwnimmer-tri commented 2 weeks ago

One more new detail...

My prototype uses macOS 13 as its base image. The Drake release v1.33.0 today was the last one to be based on macOS 13.

The GHA yaml file will need to be changed to target macOS 14 now, to align with the rest of Drake for the next v1.34.0 release.

jwnimmer-tri commented 2 weeks ago

For the record, here is the screen where I've added a personal access token for my prototype's GHA to be able to clone snopt:

image