-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (57 loc) · 2 KB
/
main.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
name: CI
on:
push:
branches:
- master
- ci
pull_request:
branches:
- master
jobs:
Test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macOS-13, ubuntu-latest]
version: ['5.15.2', '6.6.1']
build_type: ['Release']
steps:
-
uses: actions/checkout@v2
-
name: 📦 Cache Qt
id: cache-qt
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/Qt-${{ runner.os }}-${{ matrix.version }}
key: ${{ runner.os }}-QtCache-${{ matrix.version }}
-
name: ⬇ Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.version }}
dir: ${{ github.workspace }}/Qt-${{ runner.os }}-${{ matrix.version }}
-
name: 🔧 Configure NetTcp
run: |
mkdir -p build
cmake -DNETTCP_ENABLE_TESTS=ON -DNETTCP_ENABLE_EXAMPLES=ON -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" -B build -S .
shell: bash
-
name: 🔨 Build NetTcp
run: |
cmake --build build --target "NetTcp" --config "${{ matrix.build_type }}" -j
-
name: 🔨 Build Examples
run: |
cmake --build build --target "NetTcp_EchoClientServer" --config "${{ matrix.build_type }}" -j
cmake --build build --target "NetTcp_EchoServer" --config "${{ matrix.build_type }}" -j
cmake --build build --target "NetTcp_EchoClient" --config "${{ matrix.build_type }}" -j
cmake --build build --target "NetTcp_FuzzDisconnectionClientServer" --config "${{ matrix.build_type }}" -j
cmake --build build --target "NetTcp_FuzzDisconnectionServerClient" --config "${{ matrix.build_type }}" -j
-
name: 🔨 Unit Tests
run: cmake --build build --target "NetTcpTests" --config "${{ matrix.build_type }}" -j 8
-
name: ✅ Unit Tests
run: cd build && ctest --build-config "${{ matrix.build_type }}" --progress --verbose