Announcing the beta for macOS Runners in Bitbucket Pipelines

We are happy to announce that Bitbucket Pipelines now supports macOS self-hosted runners. This is currently in beta.

You can now create a self-hosted runner and run it on your macOS infrastructure to run macOS and iOS builds. Since you’re using your own runner, you won't be charged for Bitbucket Pipelines build minutes.

This self-hosted runner will be non-containerised allowing your CI/CD step to access the host's hardware, such as the graphics card or any connected external devices. Given that the runner will run directly on a macOS instance, we also don't put restrictions on a step's memory usage.

Get Started

To get started, go to your repository or workspace settings, and click on the Runners tab in the left navigation menu. Select macOS from the dropdown and specify a runner name and labels.

Just as with Linux and Windows runners, if you choose to create a workspace runner, that runner can be used to run builds for any repository in that workspace.

Configuring your bitbucket-pipelines.yaml

To use your macOS runner, in your Pipelines yaml file, add a runs-on parameter with a macos label to a step, and that step will run on the next available macOS Runner that has all the required label/s. If all your macOS Runners are busy, then your step will be queued until one becomes available.

  pipelines:
  default:
    - parallel:
        - step:
            name: Build and Test
            runs-on:
              - macos
            script:
              - swift build
              - swift test
        - step:
            name: Code linting
            runs-on:
              - macos
            script:
              - swiftlint

This macOS build template will also be available when you create your bitbucket-pipelines.yaml when onboarding with Bitbucket Pipelines.

To learn more about how to set up and use your own runners, check out this demo den on how to use Bitbucket Pipelines Runners and execute your Bitbucket pipelines builds on your own infrastructure, so you have more control over your server configurations. To learn more, refer to the technical documentation.

Bitbucket Pipelines Runners – Demo Den – August 2021