blob: d6e9c8aa3f65f43849e9e9070e28b03941150543 [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
13brew install sphinx-doc python3 buildkite-agent ninja cmake
14
15CFG_DIR="$(brew --prefix)/etc/buildkite-agent"
16
17# Setup the CONDUIT_TOKEN in the BuildKite Agent, and install the Phabricator
18# Python module to allow reporting results back to Phabricator.
19mv "${CFG_DIR}/hooks/environment.sample" "${CFG_DIR}/hooks/environment"
20echo "export CONDUIT_TOKEN=${CONDUIT_TOKEN}" >> "${CFG_DIR}/hooks/environment"
21pip3 install --user phabricator
22
23# Setup the tags of the agent
24echo 'tags="queue=libcxx-macos-builders"' >> "${CFG_DIR}/buildkite-agent.cfg"
25
26# Setup the BuildKite Agent token
27sed -i '' "s/xxx/${BUILDKITE_AGENT_TOKEN}/g" "${CFG_DIR}/buildkite-agent.cfg"