Migrate from Kokoro to GitHub Actions for CMake.

Change-Id: Id09548145c8879ca7347a6b66b5697d343cef238
Reviewed-on: https://code-review.googlesource.com/c/re2/+/57794
Reviewed-by: Paul Wankadia <junyer@google.com>
diff --git a/.github/cmake.sh b/.github/cmake.sh
new file mode 100755
index 0000000..7cc3db4
--- /dev/null
+++ b/.github/cmake.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -eux
+
+cmake -D CMAKE_BUILD_TYPE=Debug
+cmake --build . --config Debug --clean-first
+ctest -C Debug --output-on-failure -E 'dfa|exhaustive|random'
+
+cmake -D CMAKE_BUILD_TYPE=Release
+cmake --build . --config Release --clean-first
+ctest -C Release --output-on-failure -E 'dfa|exhaustive|random'
+
+exit 0
diff --git a/.github/workflows/ci-cmake.yml b/.github/workflows/ci-cmake.yml
new file mode 100644
index 0000000..a36e426
--- /dev/null
+++ b/.github/workflows/ci-cmake.yml
@@ -0,0 +1,14 @@
+name: CI (CMake)
+on:
+  push:
+    branches: [master]
+jobs:
+  build:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os: [macos-latest, ubuntu-latest, windows-latest]
+    steps:
+    - uses: actions/checkout@v2
+    - run: .github/cmake.sh
+      shell: bash
diff --git a/kokoro/cmake.sh b/kokoro/cmake.sh
deleted file mode 100755
index 7e355f8..0000000
--- a/kokoro/cmake.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-set -eux
-
-cd git/re2
-
-case "${KOKORO_JOB_NAME}" in
-  */windows-*)
-    export PATH+=':/cygdrive/c/Program Files/CMake/bin'
-    # Pin to Visual Studio 2015, which is the minimum that we support.
-    CMAKE_G_A_FLAGS=('-G' 'Visual Studio 14 2015' '-A' 'x64')
-    ;;
-  *)
-    CMAKE_G_A_FLAGS=()
-    # Work around a bug in older versions of bash. :/
-    set +u
-    ;;
-esac
-
-cmake -D CMAKE_BUILD_TYPE=Debug "${CMAKE_G_A_FLAGS[@]}" .
-cmake --build . --config Debug --clean-first
-ctest -C Debug --output-on-failure -E 'dfa|exhaustive|random'
-
-cmake -D CMAKE_BUILD_TYPE=Release "${CMAKE_G_A_FLAGS[@]}" .
-cmake --build . --config Release --clean-first
-ctest -C Release --output-on-failure -E 'dfa|exhaustive|random'
-
-exit 0
diff --git a/kokoro/macos-cmake.cfg b/kokoro/macos-cmake.cfg
deleted file mode 100644
index 5c459e7..0000000
--- a/kokoro/macos-cmake.cfg
+++ /dev/null
@@ -1 +0,0 @@
-build_file: "re2/kokoro/macos-cmake.sh"
diff --git a/kokoro/macos-cmake.sh b/kokoro/macos-cmake.sh
deleted file mode 100755
index ef4b7dc..0000000
--- a/kokoro/macos-cmake.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-set -eux
-bash git/re2/kokoro/cmake.sh
-exit $?
diff --git a/kokoro/ubuntu-cmake.cfg b/kokoro/ubuntu-cmake.cfg
deleted file mode 100644
index 63d4f91..0000000
--- a/kokoro/ubuntu-cmake.cfg
+++ /dev/null
@@ -1 +0,0 @@
-build_file: "re2/kokoro/ubuntu-cmake.sh"
diff --git a/kokoro/ubuntu-cmake.sh b/kokoro/ubuntu-cmake.sh
deleted file mode 100755
index ef4b7dc..0000000
--- a/kokoro/ubuntu-cmake.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-set -eux
-bash git/re2/kokoro/cmake.sh
-exit $?
diff --git a/kokoro/windows-cmake.bat b/kokoro/windows-cmake.bat
deleted file mode 100755
index 77a4db9..0000000
--- a/kokoro/windows-cmake.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-bash git/re2/kokoro/cmake.sh
-EXIT /B %ERRORLEVEL%
diff --git a/kokoro/windows-cmake.cfg b/kokoro/windows-cmake.cfg
deleted file mode 100644
index 4453eb6..0000000
--- a/kokoro/windows-cmake.cfg
+++ /dev/null
@@ -1 +0,0 @@
-build_file: "re2/kokoro/windows-cmake.bat"