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