diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce14484..85048f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,12 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - # For more specific OS versions, you can specify them explicitly: - # os: [ubuntu-20.04, windows-2019, macos-11] + compiler: [msvc, clang] # Test with both MSVC and Clang on Windows + include: + - os: ubuntu-latest + compiler: clang + - os: macos-latest + compiler: clang steps: - name: Checkout code @@ -29,8 +33,11 @@ jobs: if: runner.os == 'Windows' run: | choco install -y ninja - choco install -y llvm # Clang on Windows if needed - # choco install -y visualstudio2019community + if (${{ matrix.compiler }} == 'clang') { + choco install -y llvm # Install Clang on Windows if needed + } else { + choco install -y visualstudio2022community --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64" + } shell: pwsh - name: Install dependencies (Ubuntu) @@ -47,8 +54,11 @@ jobs: - name: Configure CMake run: | - cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++ - # Or specify other options as needed + if (runner.os == 'Windows' && ${{ matrix.compiler }} == 'msvc') { + cmake -S . -B build -G Ninja -A x64 -T host=x64 -DCMAKE_CXX_COMPILER=cl + } else { + cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++ + } - name: Build run: cmake --build build