-
Notifications
You must be signed in to change notification settings - Fork 4
79 lines (63 loc) · 1.94 KB
/
cpp.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
name: cpp
on:
push:
paths-ignore:
- '**.md'
- 'rust/**'
pull_request:
paths-ignore:
- '**.md'
- 'rust/**'
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: "-DRPC_CORE_TEST_PLUGIN=ON"
- toolchain: macos-clang
os: macos-latest
compiler: clang
env:
CMAKE_OPTIONS: "-DRPC_CORE_TEST_PLUGIN=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
- name: Configure (${{ matrix.configuration }})
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ${{ matrix.env.CMAKE_OPTIONS }}
- name: Init thirdparty
if: matrix.os != 'windows-latest'
run: cmake --build build --target rpc_core_test_init
- 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
working-directory: build
run: ./rpc_core_test${{ matrix.env.BIN_SUFFIX }}