[libcxx-commits] [libcxx] 370b788 - [libc++] Add a script to setup CI on macOS nodes

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 6 12:34:36 PDT 2020


Author: Louis Dionne
Date: 2020-10-06T15:34:09-04:00
New Revision: 370b7887e5af413e06cb0bdb23f502ca7a56280d

URL: https://github.com/llvm/llvm-project/commit/370b7887e5af413e06cb0bdb23f502ca7a56280d
DIFF: https://github.com/llvm/llvm-project/commit/370b7887e5af413e06cb0bdb23f502ca7a56280d.diff

LOG: [libc++] Add a script to setup CI on macOS nodes

Added: 
    libcxx/utils/ci/macos-ci-setup

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/ci/macos-ci-setup b/libcxx/utils/ci/macos-ci-setup
new file mode 100755
index 000000000000..d6e9c8aa3f65
--- /dev/null
+++ b/libcxx/utils/ci/macos-ci-setup
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+# This simple script can be used to set up a CI node running MacOS.
+# An additional requirement that is *not* handled by this script is the
+# installation of Xcode, which requires manual intervention.
+
+source secrets.env
+
+# Install Homebrew
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
+
+# Install the required tools to run CI
+brew install sphinx-doc python3 buildkite-agent ninja cmake
+
+CFG_DIR="$(brew --prefix)/etc/buildkite-agent"
+
+# Setup the CONDUIT_TOKEN in the BuildKite Agent, and install the Phabricator
+# Python module to allow reporting results back to Phabricator.
+mv "${CFG_DIR}/hooks/environment.sample" "${CFG_DIR}/hooks/environment"
+echo "export CONDUIT_TOKEN=${CONDUIT_TOKEN}" >> "${CFG_DIR}/hooks/environment"
+pip3 install --user phabricator
+
+# Setup the tags of the agent
+echo 'tags="queue=libcxx-macos-builders"' >> "${CFG_DIR}/buildkite-agent.cfg"
+
+# Setup the BuildKite Agent token
+sed -i '' "s/xxx/${BUILDKITE_AGENT_TOKEN}/g" "${CFG_DIR}/buildkite-agent.cfg"


        


More information about the libcxx-commits mailing list