Skip to content

Commit

Permalink
MSVC added.
Browse files Browse the repository at this point in the history
  • Loading branch information
vidanovic committed Oct 16, 2024
1 parent 0d50397 commit 0531c98
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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

Expand Down

0 comments on commit 0531c98

Please sign in to comment.