Add Buildkite configs for tracing and runtime builds.
diff --git a/build_tools/buildkite/cmake/build_configurations.yml b/build_tools/buildkite/cmake/build_configurations.yml
new file mode 100644
index 0000000..fb79ee9
--- /dev/null
+++ b/build_tools/buildkite/cmake/build_configurations.yml
@@ -0,0 +1,24 @@
+# Copyright 2021 The IREE Authors
+#
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+steps:
+ - label: "Build with tracing enabled"
+ commands:
+ - "./scripts/git/submodule_versions.py init"
+ - "docker run --user=$(id -u):$(id -g) --volume=\\$PWD:\\$IREE_DOCKER_WORKDIR --workdir=\\$IREE_DOCKER_WORKDIR --rm gcr.io/iree-oss/cmake@sha256:9d9953acf5ca0cf1ff3e8de32f10f24dfab1c4e8ec5d1fc047f556024ee4bed6 ./build_tools/cmake/build_tracing.sh"
+ env:
+ IREE_DOCKER_WORKDIR: "/usr/src/github/iree"
+ agents:
+ - "queue=build"
+
+ - label: "Build the runtime only"
+ commands:
+ - "./scripts/git/submodule_versions.py init"
+ - "docker run --user=$(id -u):$(id -g) --volume=\\$PWD:\\$IREE_DOCKER_WORKDIR --workdir=\\$IREE_DOCKER_WORKDIR --rm gcr.io/iree-oss/cmake@sha256:9d9953acf5ca0cf1ff3e8de32f10f24dfab1c4e8ec5d1fc047f556024ee4bed6 ./build_tools/cmake/build_runtime.sh"
+ env:
+ IREE_DOCKER_WORKDIR: "/usr/src/github/iree"
+ agents:
+ - "queue=build"
diff --git a/build_tools/cmake/build_runtime.sh b/build_tools/cmake/build_runtime.sh
new file mode 100755
index 0000000..fadca1d
--- /dev/null
+++ b/build_tools/cmake/build_runtime.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# Copyright 2021 The IREE Authors
+#
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+# Build IREE's runtime using CMake. Designed for CI, but can be run manually.
+# This uses previously cached build results and does not clear build
+# directories.
+
+set -e
+set -x
+
+ROOT_DIR=$(git rev-parse --show-toplevel)
+cd ${ROOT_DIR?}
+
+CMAKE_BIN=${CMAKE_BIN:-$(which cmake)}
+"${CMAKE_BIN?}" --version
+ninja --version
+
+if [ -d "build-runtime" ]
+then
+ echo "build-runtime directory already exists. Will use cached results there."
+else
+ echo "build-runtime directory does not already exist. Creating a new one."
+ mkdir build-runtime
+fi
+cd build-runtime
+
+"${CMAKE_BIN?}" -G Ninja .. \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DIREE_BUILD_COMPILER=OFF \
+ -DIREE_ENABLE_MLIR=OFF
+"${CMAKE_BIN?}" --build .
diff --git a/build_tools/cmake/build_tracing.sh b/build_tools/cmake/build_tracing.sh
new file mode 100755
index 0000000..0380b45
--- /dev/null
+++ b/build_tools/cmake/build_tracing.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+# Copyright 2021 The IREE Authors
+#
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+# Build IREE using CMake with tracing enabled. Designed for CI, but can be run
+# manually. This uses previously cached build results and does not clear build
+# directories.
+
+set -e
+set -x
+
+ROOT_DIR=$(git rev-parse --show-toplevel)
+cd ${ROOT_DIR?}
+
+CMAKE_BIN=${CMAKE_BIN:-$(which cmake)}
+"${CMAKE_BIN?}" --version
+ninja --version
+
+if [ -d "build-tracing" ]
+then
+ echo "build-tracing directory already exists. Will use cached results there."
+else
+ echo "build-tracing directory does not already exist. Creating a new one."
+ mkdir build-tracing
+fi
+cd build-tracing
+
+"${CMAKE_BIN?}" -G Ninja .. \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DIREE_ENABLE_RUNTIME_TRACING=ON \
+ -DIREE_BUILD_TESTS=OFF \
+ -DIREE_BUILD_SAMPLES=OFF
+"${CMAKE_BIN?}" --build .