From 07bbf2259da087f76052d8afa3ef718650faeb89 Mon Sep 17 00:00:00 2001 From: Gaetan Perrot Date: Wed, 28 Aug 2024 23:22:08 +0900 Subject: [PATCH] Update build-test-python.yml --- .github/workflows/build-test-python.yml | 31 +++++++++++++++++++------ 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-test-python.yml b/.github/workflows/build-test-python.yml index b79fce69c..0e602203d 100644 --- a/.github/workflows/build-test-python.yml +++ b/.github/workflows/build-test-python.yml @@ -17,6 +17,9 @@ jobs: buildsystem: - meson - cmake + use_rtable: + - true + - false runs-on: ${{ matrix.os }} steps: - name: Setup Python ${{ matrix.python-version }} @@ -55,21 +58,30 @@ jobs: - name: Build libcsp with python binding with meson if: ${{ matrix.buildsystem == 'meson' }} run: | - meson setup builddir -Denable_python3_bindings=true -Duse_rtable=true && ninja -C builddir + meson setup builddir -Denable_python3_bindings=true -Duse_rtable=${{ matrix.use_rtable }} && ninja -C builddir - name: Run ZMQ Python binding Test run: | build/examples/zmqproxy & - PYTHONPATH=builddir python3 examples/python_bindings_example_server.py -z localhost -a 3 -R "0/0 ZMQHUB" & - PYTHONPATH=builddir python3 examples/python_bindings_example_client.py -z localhost -s 3 -a 2 -R "0/0 ZMQHUB" + if [ ${{ matrix.use_rtable }} == "true" ]; then + PYTHONPATH=builddir python3 examples/python_bindings_example_server.py -z localhost -a 3 -R "0/0 ZMQHUB" & + PYTHONPATH=builddir python3 examples/python_bindings_example_client.py -z localhost -s 3 -a 2 -R "0/0 ZMQHUB" + else + PYTHONPATH=builddir python3 examples/python_bindings_example_server.py -z localhost -a 3 & + PYTHONPATH=builddir python3 examples/python_bindings_example_client.py -z localhost -s 3 -a 2 + fi pkill zmqproxy - name: Run KISS Python binding Test run: | socat -d -d -d pty,raw,echo=0,link=/tmp/pty1 pty,raw,echo=0,link=/tmp/pty2 & sleep 1 - PYTHONPATH=builddir python3 examples/python_bindings_example_server.py -k /tmp/pty2 -a 1 -R "0/0 KISS" & - PYTHONPATH=builddir python3 examples/python_bindings_example_client.py -k /tmp/pty1 -a 2 -s 1 -R "0/0 KISS" + if [ ${{ matrix.use_rtable }} == "true" ]; then + PYTHONPATH=builddir python3 examples/python_bindings_example_server.py -k /tmp/pty2 -a 1 -R "0/0 KISS" & + PYTHONPATH=builddir python3 examples/python_bindings_example_client.py -k /tmp/pty1 -a 2 -s 1 -R "0/0 KISS" + else + PYTHONPATH=builddir python3 examples/python_bindings_example_server.py -k /tmp/pty2 -a 1 & + PYTHONPATH=builddir python3 examples/python_bindings_example_client.py -k /tmp/pty1 -a 2 -s 1 pkill socat - name: Setup vcan0 @@ -85,5 +97,10 @@ jobs: - name: Run CAN Python binding Test run: | - PYTHONPATH=builddir python3 examples/python_bindings_example_server.py -c vcan0 -a 1 -R "0/0 CAN" & - PYTHONPATH=builddir python3 examples/python_bindings_example_client.py -c vcan0 -a 2 -s 1 -R "0/0 CAN" + if [ ${{ matrix.use_rtable }} == "true" ]; then + PYTHONPATH=builddir python3 examples/python_bindings_example_server.py -c vcan0 -a 1 -R "0/0 CAN" & + PYTHONPATH=builddir python3 examples/python_bindings_example_client.py -c vcan0 -a 2 -s 1 -R "0/0 CAN" + else + PYTHONPATH=builddir python3 examples/python_bindings_example_server.py -c vcan0 -a 1 & + PYTHONPATH=builddir python3 examples/python_bindings_example_client.py -c vcan0 -a 2 -s 1 + fi