-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (60 loc) · 2.01 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
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:
name: Building ${{ matrix.project_name }}
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}}
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}}