-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (40 loc) · 1.14 KB
/
cpp-tests.yml
File metadata and controls
52 lines (40 loc) · 1.14 KB
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
name: C++ Tests
on:
push:
branches: [ main, master ]
pull_request:
jobs:
cpp-tests:
name: C++ tests (gcc)
runs-on: ubuntu-latest
container:
image: fedora:43
env:
SERIAL_TEST_PORT: /tmp/ttyCI_A
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install build dependencies (gcc)
run: |
dnf -y update
dnf -y install cmake ninja-build gcc-c++ socat git
- name: Configure CMake
env:
CXX: g++
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
cmake --build build --config Release
- name: Start virtual serial echo (socat)
run: |
socat -d -d pty,raw,echo=0,link=/tmp/ttyCI_A,mode=666 pty,raw,echo=0,link=/tmp/ttyCI_B,mode=666 &
sleep 2
stdbuf -i0 -o0 cat < /tmp/ttyCI_B > /tmp/ttyCI_B &
sleep 1
- name: Run C++ unit/integration tests
working-directory: build
env:
SERIAL_TEST_PORT: /tmp/ttyCI_A
run: |
./cpp_bindings_linux_tests --gtest_color=yes