-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (77 loc) · 2.68 KB
/
ci_tests.yaml
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
name: run CI tests
on:
push:
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
jobs:
tests:
name: Executing ${{ matrix.test_name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test_name:
- simple_transport_test
- hon_test
- smartair2_test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{github.workspace}}/test/${{ matrix.test_name }}/bin -S ${{github.workspace}}/test/${{ matrix.test_name }} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build CMake
run: cmake --build ${{github.workspace}}/test/${{ matrix.test_name }}/bin --config ${{env.BUILD_TYPE}}
- name: Run test
working-directory: ${{github.workspace}}/test/${{ matrix.test_name }}/bin
run: ./${{ matrix.test_name }}
tools_windows:
name: Building ${{ matrix.project_name }} in Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
project_name:
- remote_serial_bridge
- smartair2_simulator
- hon_simulator
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup MSVC
uses: ilammy/[email protected]
with:
vsversion: 2022
arch: amd64
- name: Configure CMake
run: cmake -B ${{github.workspace}}/tools/${{ matrix.project_name }}/bin -S ${{github.workspace}}/tools/${{ matrix.project_name }} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "Visual Studio 17 2022"
- name: Build CMake
run: cmake --build ${{github.workspace}}/tools/${{ matrix.project_name }}/bin --config ${{env.BUILD_TYPE}}
tools_ubuntu:
name: Building ${{ matrix.project_name }} in Ubuntu
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project_name:
- remote_serial_bridge
- smartair2_simulator
- hon_simulator
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{github.workspace}}/tools/${{ matrix.project_name }}/bin -S ${{github.workspace}}/tools/${{ matrix.project_name }} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build CMake
run: cmake --build ${{github.workspace}}/tools/${{ matrix.project_name }}/bin --config ${{env.BUILD_TYPE}}
lib:
name: Building library
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{github.workspace}}/bin -S ${{github.workspace}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build CMake
run: cmake --build ${{github.workspace}}/bin --config ${{env.BUILD_TYPE}}