-
Notifications
You must be signed in to change notification settings - Fork 4
138 lines (109 loc) · 3.92 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: CI
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
build-and-test:
name: ${{ matrix.toolchain }}-${{ matrix.configuration }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
toolchain:
- linux-gcc
- macos-clang
- windows-msvc
- windows-mingw
configuration:
- Debug
- Release
include:
- toolchain: linux-gcc
os: ubuntu-latest
compiler: gcc
env:
CMAKE_OPTIONS: "-DASIO_NET_ENABLE_SSL=ON"
- toolchain: macos-clang
os: macos-latest
compiler: clang
env:
CMAKE_OPTIONS: "-DASIO_NET_ENABLE_SSL=ON"
- toolchain: windows-msvc
os: windows-latest
compiler: msvc
env:
BIN_SUFFIX: ".exe"
- toolchain: windows-mingw
os: windows-latest
compiler: mingw
env:
BIN_SUFFIX: ".exe"
CMAKE_OPTIONS: "-G \"MinGW Makefiles\""
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Init ASIO
run: git clone https://github.com/chriskohlhoff/asio.git -b asio-1-32-0 --depth=1
- name: Configure (${{ matrix.configuration }})
env:
ASIO_PATH: asio/asio/include
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ${{ matrix.env.CMAKE_OPTIONS }} -DASIO_NET_DISABLE_ON_DATA_PRINT=ON
- name: Build with ${{ matrix.compiler }}
run: cmake --build build --config ${{ matrix.configuration }} -j
- name: Windows-MSVC Compatible
if: matrix.os == 'windows-latest' && matrix.compiler == 'msvc'
working-directory: build
run: Move-Item -Path .\${{ matrix.configuration }}\* -Destination .\
- name: Test TCP
working-directory: build
run: ./asio_net_test_tcp${{ matrix.env.BIN_SUFFIX }}
- name: Test TCP (big data)
working-directory: build
run: ./asio_net_test_tcp_bigdata${{ matrix.env.BIN_SUFFIX }}
- name: Test TCP (reconnect)
working-directory: build
run: ./asio_net_test_tcp_reconnect${{ matrix.env.BIN_SUFFIX }}
- name: Test UDP
working-directory: build
run: ./asio_net_test_udp${{ matrix.env.BIN_SUFFIX }}
- name: Test RPC
working-directory: build
run: ./asio_net_test_rpc${{ matrix.env.BIN_SUFFIX }}
- name: Test RPC (rpc_config)
working-directory: build
run: ./asio_net_test_rpc_config${{ matrix.env.BIN_SUFFIX }}
- name: Test RPC (reconnect)
working-directory: build
run: ./asio_net_test_rpc_reconnect${{ matrix.env.BIN_SUFFIX }}
- name: Test RPC (ssl)
if: matrix.os == 'macos-latest'
working-directory: build
run: ./asio_net_test_rpc_ssl${{ matrix.env.BIN_SUFFIX }}
- name: Test Domain TCP
if: matrix.os != 'windows-latest'
working-directory: build
run: ./asio_net_test_domain_tcp${{ matrix.env.BIN_SUFFIX }}
- name: Test Domain UDP
if: matrix.os != 'windows-latest'
working-directory: build
run: ./asio_net_test_domain_udp${{ matrix.env.BIN_SUFFIX }}
- name: Test Domain RPC
if: matrix.os != 'windows-latest'
working-directory: build
run: ./asio_net_test_domain_rpc${{ matrix.env.BIN_SUFFIX }}
- name: Test DDS
working-directory: build
run: ./asio_net_test_dds${{ matrix.env.BIN_SUFFIX }} 1
- name: Test DDS (ssl)
if: matrix.os != 'windows-latest'
working-directory: build
run: ./asio_net_test_dds_ssl${{ matrix.env.BIN_SUFFIX }} 1
- name: Test DDS (domain)
if: matrix.os != 'windows-latest'
working-directory: build
run: ./asio_net_test_domain_dds${{ matrix.env.BIN_SUFFIX }} 1