game-music-emu: Split workflow based on OS

From 64606e067a00692573db990bf7f8d2bc11162d2e Mon Sep 17 00:00:00 2001
From: Leandro Nini <[EMAIL REDACTED]>
Date: Wed, 4 Oct 2023 15:37:09 +0200
Subject: [PATCH] Split workflow based on OS

---
 .github/workflows/CI-Linux.yml                | 31 +++++++++++++++++++
 .../workflows/{CI-build.yml => CI-MacOS.yml}  | 21 +++----------
 2 files changed, 35 insertions(+), 17 deletions(-)
 create mode 100755 .github/workflows/CI-Linux.yml
 rename .github/workflows/{CI-build.yml => CI-MacOS.yml} (54%)
 mode change 100644 => 100755

diff --git a/.github/workflows/CI-Linux.yml b/.github/workflows/CI-Linux.yml
new file mode 100755
index 0000000..187408b
--- /dev/null
+++ b/.github/workflows/CI-Linux.yml
@@ -0,0 +1,31 @@
+name: CI Linux
+
+on:
+  push:
+    branches: [ "master" ]
+  pull_request:
+    branches: [ "master" ]
+
+jobs:
+  build:
+    name: Linux (${{ matrix.configuration }})
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        configuration: [Debug, Release]
+        include:
+          - generator: Ninja
+            os: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v3
+    - name: Install dependencies
+      run: |
+          sudo apt-get update
+          sudo apt-get install build-essential g++ cmake ninja-build libsdl2-dev
+    - name: Build
+      run: |
+        mkdir build
+        cd build
+        cmake -G ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ..
+        cmake --build .
diff --git a/.github/workflows/CI-build.yml b/.github/workflows/CI-MacOS.yml
old mode 100644
new mode 100755
similarity index 54%
rename from .github/workflows/CI-build.yml
rename to .github/workflows/CI-MacOS.yml
index dbba77c..00646cf
--- a/.github/workflows/CI-build.yml
+++ b/.github/workflows/CI-MacOS.yml
@@ -1,4 +1,4 @@
-name: C/C++ CI
+name: CI macOS
 
 on:
   push:
@@ -8,31 +8,18 @@ on:
 
 jobs:
   build:
-    name: ${{ matrix.platform }} (${{ matrix.configuration }})
+    name: macOS (${{ 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'
+    - name: Install dependencies
       env:
         HOMEBREW_NO_ANALYTICS: 1
         HOMEBREW_NO_INSTALL_CLEANUP: 1
@@ -45,5 +32,5 @@ jobs:
       run: |
         mkdir build
         cd build
-        cmake -G ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DENABLE_UBSAN=OFF ..
+        cmake -G ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ..
         cmake --build .