blob: f59f50db8ac1ee3e8262413907e65cf66ec730d1 [file] [log] [blame]
Louis Dionnecc7d0842020-10-06 14:13:55 -04001#!/usr/bin/env bash
2
3# This simple script can be used to set up a CI node running MacOS.
4# An additional requirement that is *not* handled by this script is the
5# installation of Xcode, which requires manual intervention.
6
7source secrets.env
8
9# Install Homebrew
10/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
11
12# Install the required tools to run CI
Louis Dionne87da9ed2020-12-11 14:06:24 -050013brew install sphinx-doc python3 ninja cmake clang-format buildkite/buildkite/buildkite-agent
Louis Dionnecc7d0842020-10-06 14:13:55 -040014
15CFG_DIR="$(brew --prefix)/etc/buildkite-agent"
16
Louis Dionne6a3ffe22021-02-02 14:59:35 -050017version="$(sw_vers -productVersion | sed -E 's/([0-9]+).([0-9]+).[0-9]+/\1.\2/')"
18
Louis Dionnecc7d0842020-10-06 14:13:55 -040019# Setup the tags of the agent
Louis Dionne6a3ffe22021-02-02 14:59:35 -050020echo 'tags="queue=libcxx-builders-macos,queue=libcxx-builders-macos${version}"' >> "${CFG_DIR}/buildkite-agent.cfg"
Louis Dionnecc7d0842020-10-06 14:13:55 -040021
22# Setup the BuildKite Agent token
23sed -i '' "s/xxx/${BUILDKITE_AGENT_TOKEN}/g" "${CFG_DIR}/buildkite-agent.cfg"