sdl12-compat: First shot at hooking up CI

From a7fb56762bf3657361dc2a9ee1ee667d345e65dd Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 1 Jun 2021 17:52:39 -0400
Subject: [PATCH] First shot at hooking up CI

---
 .github/workflows/main.yml | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 .github/workflows/main.yml

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..8dae769
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,33 @@
+name: Build
+
+on: [push, pull_request]
+
+jobs:
+  Build:
+    name: ${{ matrix.platform.name }}
+    runs-on: ${{ matrix.platform.os }}
+    strategy:
+      matrix:
+        platform:
+        - { name: Windows, os: windows-latest }
+        - { name: Linux,   os: ubuntu-20.04, flags: -GNinja }
+        - { name: MacOS,   os: macos-latest }
+    steps:
+    - name: Setup Linux dependencies
+      if: runner.os == 'Linux'
+      run: |
+        sudo apt-get update
+        sudo apt-get install cmake ninja-build
+    - name: Get SDL2 headers
+      uses: actions/checkout@v2
+      with:
+        name: libsdl-org/SDL
+        ref: refs/tags/release-2.0.14
+        path: SDL2
+    - name: Get sdl12-compat sources
+      uses: actions/checkout@v2
+    - name: Configure CMake
+      run: cmake -DCMAKE_C_FLAGS="-I${GITHUB_WORKSPACE}/SDL2/include" -B build ${{ matrix.platform.flags }}
+    - name: Build
+      run: cmake --build build/
+