Skip to content

Commit

Permalink
ci: add Windows build and separate Ubuntu job
Browse files Browse the repository at this point in the history
Splits CI workflow into Ubuntu and Windows jobs. Adds C++ compilation
and test execution for Windows. Retains .NET setup and tests for both.
  • Loading branch information
sinkingsugar committed Oct 9, 2024
1 parent 76fdfe9 commit 7612d1c
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ master ]

jobs:
build-and-test:
build-and-test-ubuntu:
runs-on: ubuntu-latest

steps:
Expand All @@ -24,7 +24,36 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x' # Updated to .NET 8.0
dotnet-version: '8.0.x'

- name: Restore dependencies
run: dotnet restore

- name: Build C# project
run: dotnet build --no-restore

- name: Run C# Tests
run: dotnet run --project crdt-lite.csproj

build-and-test-windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Setup MSVC
uses: microsoft/[email protected]

- name: Compile and Run C++ Tests
run: |
cl.exe /std:c++20 /EHsc /Fe:crdt.exe tests.cpp && .\crdt.exe
cl.exe /std:c++20 /EHsc /Fe:list-crdt.exe list_tests.cpp && .\list-crdt.exe
shell: cmd

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'

- name: Restore dependencies
run: dotnet restore
Expand Down

0 comments on commit 7612d1c

Please sign in to comment.