From 5fef3e93ee02bfe2d26974f8490e9abe514dd7c2 Mon Sep 17 00:00:00 2001 From: PonomarevDA Date: Sun, 28 Jan 2024 18:47:16 +0300 Subject: [PATCH] [temp] update tools (dev version) --- .github/workflows/cyphal.yml | 30 ++++++++++++++++++++++++------ .github/workflows/dronecan.yml | 21 +++++++++++++-------- Makefile | 6 +++--- scripts/tools | 2 +- 4 files changed, 41 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cyphal.yml b/.github/workflows/cyphal.yml index b18b005..0999a5b 100644 --- a/.github/workflows/cyphal.yml +++ b/.github/workflows/cyphal.yml @@ -11,19 +11,27 @@ jobs: fetch-depth: 0 - name: Install dependencies - run: ./scripts/tools/install_for_ubuntu.sh --yes + run: | + pip install pyserial python-can pydronecan pycyphal pytest pytest-asyncio yakut + pip install -i https://test.pypi.org/simple/ raccoonlab-tools + pip install -U nunavut + sudo apt-get install -y gcc-arm-none-eabi stlink-tools + + - run: make cyphal - name: Archive .bin file uses: actions/upload-artifact@v3 with: name: cyphal_firmware.bin path: build/obj/example.bin + if-no-files-found: error - name: Archive .elf file uses: actions/upload-artifact@v3 with: name: cyphal_firmware.elf path: build/obj/example.elf + if-no-files-found: error sitl: runs-on: ubuntu-22.04 @@ -34,14 +42,24 @@ jobs: submodules: recursive fetch-depth: 0 + - name: Clone Cyphal DSDL + run: | + mkdir -p /home/runner/.cyphal/zubax_dsdl + git clone https://github.com/Zubax/zubax_dsdl.git /home/runner/.cyphal/zubax_dsdl + + mkdir -p /home/runner/.cyphal/public_regulated_data_types + git clone https://github.com/OpenCyphal/public_regulated_data_types.git /home/runner/.cyphal/public_regulated_data_types + - name: Install dependencies run: | - ./scripts/tools/install_for_ubuntu.sh --yes - pip install pytest + pip install pyserial python-can pydronecan pycyphal pytest pytest-asyncio yakut + pip install -i https://test.pypi.org/simple/ raccoonlab-tools + pip install -U nunavut + sudo apt-get install -y linux-modules-extra-$(uname -r) + - run: make sitl_cyphal - run: | - export REG_DATA_TYPE_PATH="$PWD/Libs/Cyphal/Libs/public_regulated_data_types/uavcan $PWD/Libs/Cyphal/Libs/public_regulated_data_types/reg" make run & - cd scripts/tools/cyphal + cd scripts/tools/scripts/cyphal source init.sh -i slcan0 -n 127 -v - ./specification_checker.py + rl-test-cyphal-specification -k "not test_unique_id" diff --git a/.github/workflows/dronecan.yml b/.github/workflows/dronecan.yml index 8b07084..5ea4670 100644 --- a/.github/workflows/dronecan.yml +++ b/.github/workflows/dronecan.yml @@ -18,8 +18,9 @@ jobs: - name: Checkout Dronecan run: cd Libs/Dronecan && git checkout bb50fad # v0.3.1 - - name: Install dependencies - run: ./scripts/tools/install_for_ubuntu.sh --yes + - name: Inscripts/tools/stall dependencies + run: | + sudo apt-get install -y gcc-arm-none-eabi stlink-tools - run: make dronecan @@ -41,10 +42,14 @@ jobs: run: cd Libs/Dronecan && git checkout bb50fad # v0.3.1 - name: Install dependencies - run: ./scripts/tools/install_for_ubuntu.sh --yes - - - name: Build SITL DroneCAN - run: make sitl_dronecan + run: | + pip install pyserial python-can pydronecan pycyphal pytest pytest-asyncio yakut + pip install -i https://test.pypi.org/simple/ raccoonlab-tools + sudo apt-get install -y linux-modules-extra-$(uname -r) - - name: Run SITL for 5 seconds - run: timeout 5s make run || res=$?; if [[ $res -ne 124 && $res -ne 0 ]]; then exit $res; fi + - run: make sitl_dronecan + - run: | + make run & + cd scripts/tools/scripts/cyphal + source init.sh -i slcan0 -n 127 -v + rl-test-dronecan-specification diff --git a/Makefile b/Makefile index 0da05a1..254b92e 100644 --- a/Makefile +++ b/Makefile @@ -41,13 +41,13 @@ check_submodules: echo "[INFO] Directory is fine"; \ fi upload: - ./scripts/tools/stm32/flash.sh ${BUILD_OBJ_DIR}/example.bin + rl-upload-firmware --binary ${BUILD_OBJ_DIR}/example.bin run: - ./scripts/tools/can/vcan.sh slcan0 + ./scripts/tools/scripts/can/create_slcan.sh -i slcan0 -v ./build/obj/example.out autogenerate_git_related_headers: mkdir -p ${BUILD_DIR}/src - ./scripts/tools/stm32/generate_software_version.sh ${BUILD_DIR}/src + ./scripts/tools/scripts/stm32/generate_software_version.sh ${BUILD_DIR}/src clean: -rm -fR ${BUILD_OBJ_DIR}/ distclean: diff --git a/scripts/tools b/scripts/tools index 3c17c06..8939238 160000 --- a/scripts/tools +++ b/scripts/tools @@ -1 +1 @@ -Subproject commit 3c17c06bb3cc0a28166a74ee6dea38b3dda10598 +Subproject commit 89392388677ad9b7dd393a9b65a6e185c415522a