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 <noreply@anthropic.com>
This commit is contained in:
Mario Zechner 2025-07-25 23:55:29 +02:00
parent b2a277781a
commit 61473763a2

View File

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