# How to support ROS2 on MacOS?

**URL:** <https://discourse.openrobotics.org/t/how-to-support-ros2-on-macos/10451>\
**Category:** ROS General\
**Created:** [August 26, 2019, 11:57pm UTC](https://discourse.openrobotics.org/t/how-to-support-ros2-on-macos/10451 "2019-08-26T23:57:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkhansen](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/mkhansen/32/3748_2.png) [@mkhansen](https://discourse.openrobotics.org/u/mkhansen)\
**Post date:** [August 26, 2019, 11:57pm UTC](https://discourse.openrobotics.org/t/how-to-support-ros2-on-macos/10451/1 "2019-08-26T23:57:38Z")

</div>

We have at least one user of Navigation2 who is trying to run on MacOS. We haven’t had the resources to set up any CI or do any testing using MacOS.

So, I wanted to start the discussion of how we can support this in the most scalable way? I believe that the ROS build farm is building packages for Mac, but I’m not sure what testing is being done? Ideally, I’d like to leverage the build farm and not have to test every change on a Mac as well as Ubuntu.

If anyone has a solution for this that doesn’t involve a lot of manual setup and support, I’d love to hear it.

---

<div class="post-metadata">

**Author:** ![wjwwood](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/wjwwood/32/13715_2.png) [@wjwwood](https://discourse.openrobotics.org/u/wjwwood)\
**Post date:** [August 27, 2019, 12:30am UTC](https://discourse.openrobotics.org/t/how-to-support-ros2-on-macos/10451/2 "2019-08-27T00:30:23Z")

</div>

> [@mkhansen](#):
>
> I believe that the ROS build farm is building packages for Mac, but I’m not sure what testing is being done?

macOS is a “tier 1” platform, see: [REP 2000 -- ROS 2 Releases and Target Platforms (ROS.org)](https://www.ros.org/reps/rep-2000.html#dashing-diademata-may-2019-may-2021)

[https://ci.ros2.org/](https://ci.ros2.org/) builds an archive every night and every release for macOS. Also, pull requests for any change to repositories in the `ros2.repos` file must pass on macOS as well. We have nightly jobs for macOS also. We treat macOS the same as Linux and Windows in that respect.

Currently we’re using an old version of macOS, but we have plans to update our farm’s machines in the near future.

> [@mkhansen](#):
>
> Ideally, I’d like to leverage the build farm and not have to test every change on a Mac as well as Ubuntu.

I’m not sure what you’re asking for here, you mean depend on the build farm testing all of your dependencies or…?

If you’re going to support macOS you’ll either have to build every change against macOS (to prevent regressions) or build periodically (nightlys) and tackle regressions as they come up.

> [@mkhansen](#):
>
> If anyone has a solution for this that doesn’t involve a lot of manual setup and support, I’d love to hear it.

Travis offers builds for macOS. I haven’t tried it, but it might be possible to just download our nightly archive ([https://ci.ros2.org/view/packaging/job/packaging\_osx/lastSuccessfulBuild/artifact/ws/ros2-package-osx-x86\_64.tar.bz2](https://ci.ros2.org/view/packaging/job/packaging_osx/lastSuccessfulBuild/artifact/ws/ros2-package-osx-x86_64.tar.bz2)) and do the steps in our “binary install for macOS” tutorial ([https://index.ros.org/doc/ros2/Installation/Dashing/OSX-Install-Binary/](https://index.ros.org/doc/ros2/Installation/Dashing/OSX-Install-Binary/)).

I think there are some other options as well, e.g. setting up an appveyor server on your own hardware: [Getting started with AppVeyor Server | AppVeyor](https://www.appveyor.com/docs/server/#macos).

---

<div class="post-metadata">

**Author:** ![mkhansen](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/mkhansen/32/3748_2.png) [@mkhansen](https://discourse.openrobotics.org/u/mkhansen)\
**Post date:** [August 28, 2019, 6:43pm UTC](https://discourse.openrobotics.org/t/how-to-support-ros2-on-macos/10451/3 "2019-08-28T18:43:26Z")

</div>

Thanks for the help William!

So If we want our code to build automatically on macOS in the build farm, we need to add our project to the ros2.repos file, is that correct? If so, we can submit a PR for that.

---

<div class="post-metadata">

**Author:** ![wjwwood](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/wjwwood/32/13715_2.png) [@wjwwood](https://discourse.openrobotics.org/u/wjwwood)\
**Post date:** [August 28, 2019, 7:48pm UTC](https://discourse.openrobotics.org/t/how-to-support-ros2-on-macos/10451/4 "2019-08-28T19:48:41Z")

</div>

> [@mkhansen](#):
>
> So If we want our code to build automatically on macOS in the build farm, we need to add our project to the ros2.repos file, is that correct? If so, we can submit a PR for that.

I believe there was talk of adding a new nightly job on [ci.ros2.org](http://ci.ros2.org) that additionally tests the navigation stack, rather than adding it to the `ros2.repos` file, simply because our CI is already over 2 hours, so we’re trying to keep the list short until we have a more scalable solution (people are working on that for [build.ros2.org](http://build.ros2.org)).

@nuclearsandwich were we not talking about a navigation nightly at one point? Or am I imagining that?

As for packaging, I suppose we could try to add it to packaging but not CI, which is the case for the ros1 bridge for example. We also have some “supplemental” repos files which can be used in various ways when running jobs on [ci.ros2.org](http://ci.ros2.org), e.g.: [https://github.com/ros2/ros2/blob/master/cyclonedds.repos](https://github.com/ros2/ros2/blob/master/cyclonedds.repos)

---

<div class="post-metadata">

**Author:** ![dirk-thomas](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/dirk-thomas/32/4328_2.png) [@dirk-thomas](https://discourse.openrobotics.org/u/dirk-thomas)\
**Post date:** [August 28, 2019, 8:01pm UTC](https://discourse.openrobotics.org/t/how-to-support-ros2-on-macos/10451/5 "2019-08-28T20:01:34Z")

</div>

> [@wjwwood](#):
>
> were we not talking about a navigation nightly at one point?

[http://build.ros2.org/view/Eci/job/Eci\_\_nightly\_navigation2\_prerequisites\_ubuntu\_bionic\_amd64/](http://build.ros2.org/view/Eci/job/Eci__nightly_navigation2_prerequisites_ubuntu_bionic_amd64/) and [http://build.ros2.org/view/Eci/job/Eci\_\_nightly\_navigation2\_ubuntu\_bionic\_amd64/](http://build.ros2.org/view/Eci/job/Eci__nightly_navigation2_ubuntu_bionic_amd64/)

---

<div class="post-metadata">

**Author:** ![nuclearsandwich](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/nuclearsandwich/32/559_2.png) [@nuclearsandwich](https://discourse.openrobotics.org/u/nuclearsandwich)\
**Post date:** [August 28, 2019, 8:31pm UTC](https://discourse.openrobotics.org/t/how-to-support-ros2-on-macos/10451/6 "2019-08-28T20:31:24Z")

</div>

> [@wjwwood](#):
>
> @nuclearsandwich were we not talking about a navigation nightly at one point?

We’ve been working on CI jobs for navigation2 but not via [ci.ros2.org](http://ci.ros2.org).  
We’ve been using the CI jobs feature of ros\_buildfarm to run builds here: [http://build.ros2.org/view/Eci/job/Eci\_\_nightly\_navigation2\_ubuntu\_bionic\_amd64/](http://build.ros2.org/view/Eci/job/Eci__nightly_navigation2_ubuntu_bionic_amd64/)

Our efforts have been on getting ros\_buildfarm into a state where we can formalize that job and improve the CI experience on [build.ros2.org](http://build.ros2.org) rather than putting more onto [ci.ros2.org](http://ci.ros2.org). [build.ros2.org](http://build.ros2.org) doesn’t currently have support for non-Linux platforms.

* * *

I don’t think that we have the capacity to sustainably build community projects on [ci.ros2.org](http://ci.ros2.org) as part of the omnibus packages ether via a broader repos file for packaging jobs or via an additional “layer” of builds on top of the current packaging jobs. This is due in part because of raw compute resources available and in part because managing that in the medium term sounds like it would eventually turn into re-implementing a bunch of what we have for rosdistro distribution management and if we’re going to do that I would rather focus on the long term goal of migrating all packaging from being .repos file based on ros2/ci to being rosdistro distribution.yaml-based via ros\_buildfarm.

---

<div class="post-metadata">

**Author:** ![mkhansen](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/mkhansen/32/3748_2.png) [@mkhansen](https://discourse.openrobotics.org/u/mkhansen)\
**Post date:** [August 29, 2019, 8:27pm UTC](https://discourse.openrobotics.org/t/how-to-support-ros2-on-macos/10451/7 "2019-08-29T20:27:47Z")

</div>

I don’t know your CI infrastructure very well (bare minimum TBH), so can someone tell me how I should proceed? If adding to the ros2.repos file is not the way to go, then what is?

---

<div class="post-metadata">

**Author:** ![wjwwood](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/wjwwood/32/13715_2.png) [@wjwwood](https://discourse.openrobotics.org/u/wjwwood)\
**Post date:** [August 29, 2019, 10:05pm UTC](https://discourse.openrobotics.org/t/how-to-support-ros2-on-macos/10451/8 "2019-08-29T22:05:00Z")

</div>

> [@mkhansen](#):
>
> I don’t know your CI infrastructure very well (bare minimum TBH), so can someone tell me how I should proceed?

I think @nuclearsandwich’s point is that we don’t have the resources to provide macOS jobs for everyone in the community, and I agree. We’re already running into cases where nightly jobs don’t finish until well into the workday for us.

I was thinking a single nightly job might be possible, but the reality is that we’re pretty much at capacity and don’t have plans to expand it.

On the other hand, [build.ros2.org](http://build.ros2.org) is meant for the whole community (and is where the nav nightly’s are run), but it currently doesn’t support anything but Linux. I think the plan is to eventually have Windows and even macOS for [build.ros2.org](http://build.ros2.org), and in a way that can scale properly, but not in the near future.

> [@mkhansen](#):
>
> If adding to the ros2.repos file is not the way to go, then what is?

I don’t have a solution for you other than to point you to resources that might help you setup your own macOS testing (travis, appveyor, or your own instance of our [ci.ros2.org](http://ci.ros2.org)).

---

<div class="post-metadata">

**Author:** ![mkhansen](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/mkhansen/32/3748_2.png) [@mkhansen](https://discourse.openrobotics.org/u/mkhansen)\
**Post date:** [August 29, 2019, 11:43pm UTC](https://discourse.openrobotics.org/t/how-to-support-ros2-on-macos/10451/9 "2019-08-29T23:43:01Z")

</div>

OK, I’ll look into the Travis option for now.

Then maybe we can discuss getting Windows and MacOS support into [build.ros2.org](http://build.ros2.org) soon. 🙂
