game-music-emu: Enable CI build

From d651a7d7ea6d0923fcd539a76a888ddb7c938669 Mon Sep 17 00:00:00 2001
From: Leandro Nini <[EMAIL REDACTED]>
Date: Wed, 4 Oct 2023 12:39:41 +0200
Subject: [PATCH] Enable CI build

---
 .github/workflows/CI-build.yml | 49 ++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 .github/workflows/CI-build.yml

diff --git a/.github/workflows/CI-build.yml b/.github/workflows/CI-build.yml
new file mode 100644
index 0000000..dbba77c
--- /dev/null
+++ b/.github/workflows/CI-build.yml
@@ -0,0 +1,49 @@
+name: C/C++ CI
+
+on:
+  push:
+    branches: [ "master" ]
+  pull_request:
+    branches: [ "master" ]
+
+jobs:
+  build:
+    name: ${{ matrix.platform }} (${{ matrix.configuration }})
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        generator:
+          - Ninja
+          - Xcode
+        configuration: [Debug, Release]
+        include:
+          - generator: Ninja
+            platform: Linux
+            os: ubuntu-latest
+          - generator: Xcode
+            platform: macOS
+            os: macos-latest
+
+    steps:
+    - uses: actions/checkout@v3
+    - name: Install dependencies (Linux)
+      if: runner.os == 'Linux'
+      run: |
+          sudo apt-get update
+          sudo apt-get install build-essential g++ cmake ninja-build libsdl2-dev
+    - name: Install dependencies (macOS)
+      if: runner.os == 'macOS'
+      env:
+        HOMEBREW_NO_ANALYTICS: 1
+        HOMEBREW_NO_INSTALL_CLEANUP: 1
+      run: |
+        unset HOMEBREW_NO_INSTALL_FROM_API
+        brew update
+        brew upgrade || true
+        brew install sdl2
+    - name: Build
+      run: |
+        mkdir build
+        cd build
+        cmake -G ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DENABLE_UBSAN=OFF ..
+        cmake --build .