浏览代码

Add macOS support to C++ compatibility workflow

- Convert to matrix build with ubuntu-latest and macos-latest
- Add platform-specific dependency installation steps
- Separate artifact names by OS for easier debugging

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Mario Zechner 1 月之前
父节点
当前提交
61473763a2
共有 1 个文件被更改,包括 12 次插入3 次删除
  1. 12 3
      .github/workflows/spine-cpp-compatibility.yml

+ 12 - 3
.github/workflows/spine-cpp-compatibility.yml

@@ -6,7 +6,10 @@ on:
 
 jobs:
   test-cpp-java-compatibility:
-    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        os: [ubuntu-latest, macos-latest]
+    runs-on: ${{ matrix.os }}
     steps:
     - uses: actions/checkout@v4
       with:
@@ -23,11 +26,17 @@ jobs:
       with:
         node-version: '18'
 
-    - name: Install build dependencies
+    - name: Install build dependencies (Ubuntu)
+      if: matrix.os == 'ubuntu-latest'
       run: |
         sudo apt-get update
         sudo apt-get install -y build-essential cmake
 
+    - name: Install build dependencies (macOS)
+      if: matrix.os == 'macos-latest'
+      run: |
+        brew install cmake
+
     - name: Cache Gradle packages
       uses: actions/cache@v4
       with:
@@ -47,6 +56,6 @@ jobs:
       if: failure()
       uses: actions/upload-artifact@v4
       with:
-        name: test-output-files
+        name: test-output-files-${{ matrix.os }}
         path: tests/output/
         retention-days: 7