Implement serial communication functions and refactor existing code #155
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deno Integration Tests | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| jobs: | |
| deno-tests: | |
| name: Deno integration tests (deno ${{ matrix.deno }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| deno: ["2.6.0", "2.5.0"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: ${{ matrix.deno }} | |
| - name: Setup GCC | |
| uses: egor-tensin/setup-gcc@v2 | |
| with: | |
| version: '16' | |
| platform: 'x64' | |
| - name: Install build dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y cmake ninja-build socat git | |
| - name: Configure CMake | |
| run: | | |
| cmake -S . -B build -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_C_COMPILER=gcc-16 \ | |
| -DCMAKE_CXX_COMPILER=g++-16 | |
| - 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 |