sdl2-compat: actions: Added a basic GitHub Actions config for building sdl2-compat.

From 84c1fcac91babd707decf0b2bdd375d09d0b6a9b Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 29 Nov 2022 21:44:24 -0500
Subject: [PATCH] actions: Added a basic GitHub Actions config for building
 sdl2-compat.

---
 .github/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 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..4987c8d
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,32 @@
+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 libgl1-mesa-dev libglu1-mesa-dev
+    - name: Get sdl2-compat sources
+      uses: actions/checkout@v2
+    - name: Get SDL3 headers
+      uses: actions/checkout@v2
+      with:
+        repository: libsdl-org/SDL
+        ref: main
+        path: SDL3
+    - name: Configure CMake
+      run: cmake -DSDL3_INCLUDE_DIR="${{ github.workspace }}/SDL3/include" -B build ${{ matrix.platform.flags }}
+    - name: Build
+      run: cmake --build build/