Kokoro: Enable macos CI tests

Change-Id: I83a615291e32e3d08e63a84a71ee1de7641c5bef
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29068
Presubmit-Ready: Ben Clayton <bclayton@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/tests/kokoro/macos/continuous.sh b/tests/kokoro/macos/continuous.sh
index 805a8ba..9773c5a 100755
--- a/tests/kokoro/macos/continuous.sh
+++ b/tests/kokoro/macos/continuous.sh
@@ -1,3 +1,32 @@
 #!/bin/bash
 
-# TODO(b/130343040): Stub implementation.
\ No newline at end of file
+# Fail on any error.
+set -e
+# Display commands being run.
+set -x
+
+cd git/SwiftShader
+
+git submodule update --init
+
+mkdir -p build && cd build
+
+if [[ -z "${REACTOR_BACKEND}" ]]; then
+  REACTOR_BACKEND="LLVM"
+fi
+
+cmake .. "-DREACTOR_BACKEND=${REACTOR_BACKEND}"
+make -j$(sysctl -n hw.logicalcpu)
+
+# Run the reactor unit tests.
+./ReactorUnitTests
+
+cd .. # Tests must be run from project root
+
+# Run the OpenGL ES and Vulkan unit tests.
+build/gles-unittests
+
+if [ "${REACTOR_BACKEND}" != "Subzero" ]; then
+  # Currently vulkan does not work with Subzero.
+  build/vk-unittests
+fi