Skip to content

ci: add Clang compilation and testing #29

ci: add Clang compilation and testing

ci: add Clang compilation and testing #29

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-test-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install g++
run: sudo apt-get update && sudo apt-get install -y g++
- name: Compile and Run C++ Tests
run: |
g++ -std=c++20 -g -o crdt tests.cpp && ./crdt
g++ -std=c++20 -g -o list-crdt list_tests.cpp && ./list-crdt
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
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: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: Setup Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
- name: Install LLVM and Clang
uses: crazy-max/ghaction-chocolatey@v2
with:
args: install llvm
- name: Compile and Run C++ Tests with MSVC
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: Compile and Run C++ Tests with Clang
run: |
clang++ -std=c++20 -g -o crdt_clang.exe tests.cpp && .\crdt_clang.exe
clang++ -std=c++20 -g -o list-crdt_clang.exe list_tests.cpp && .\list-crdt_clang.exe
shell: cmd
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
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