-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (81 loc) · 3.25 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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++ and clang
run: sudo apt-get update && sudo apt-get install -y g++ clang
- name: Compile and Run C++ Tests (Debug - GCC)
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: Compile and Run C++ Tests (Release - GCC)
run: |
g++ -std=c++20 -O3 -DNDEBUG -o crdt_release tests.cpp && ./crdt_release
g++ -std=c++20 -O3 -DNDEBUG -o list-crdt_release list_tests.cpp && ./list-crdt_release
- name: Compile and Run C++ Tests (Debug - Clang)
run: |
clang++ -std=c++20 -g -o crdt_clang tests.cpp && ./crdt_clang
clang++ -std=c++20 -g -o list-crdt_clang list_tests.cpp && ./list-crdt_clang
- name: Compile and Run C++ Tests (Release - Clang)
run: |
clang++ -std=c++20 -O3 -DNDEBUG -o crdt_clang_release tests.cpp && ./crdt_clang_release
clang++ -std=c++20 -O3 -DNDEBUG -o list-crdt_clang_release list_tests.cpp && ./list-crdt_clang_release
- 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 (Debug)
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 MSVC (Release)
run: |
cl.exe /std:c++20 /EHsc /O2 /DNDEBUG /Fe:crdt_release.exe tests.cpp && .\crdt_release.exe
cl.exe /std:c++20 /EHsc /O2 /DNDEBUG /Fe:list-crdt_release.exe list_tests.cpp && .\list-crdt_release.exe
shell: cmd
- name: Compile and Run C++ Tests with Clang (Debug)
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: Compile and Run C++ Tests with Clang (Release)
run: |
clang++ -std=c++20 -O3 -DNDEBUG -o crdt_clang_release.exe tests.cpp && .\crdt_clang_release.exe
clang++ -std=c++20 -O3 -DNDEBUG -o list-crdt_clang_release.exe list_tests.cpp && .\list-crdt_clang_release.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