Skip to content

Start working

Start working #32

Workflow file for this run

name: CI
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
deno-tests:
name: Deno integration tests (deno ${{ matrix.deno }})
runs-on: ubuntu-latest
strategy:
matrix:
deno: ["2.6.0", "2.5.0"]
container:
image: denoland/deno:${{ matrix.deno }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install build dependencies
run: |
apt-get update
apt-get install -y cmake ninja-build g++ 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 Deno integration tests
working-directory: integration_tests
env:
SERIAL_TEST_PORT: /tmp/ttyCI_A
run: |
deno task test