From 302445e64fec763cfb488f0400ec3cb95e984409 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 6 Jun 2024 16:07:11 +0700 Subject: try to build rx using build_util --- .github/workflows/build.yml | 14 +++++++++----- .github/workflows/build_renesas.yml | 1 + .github/workflows/ci_set_matrix.py | 4 +++- 3 files changed, 13 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 78d95fbbc..1c0ca104a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,6 +51,7 @@ jobs: # Build CMake # --------------------------------------- cmake: + if: false needs: set-matrix uses: ./.github/workflows/build_util.yml strategy: @@ -58,7 +59,7 @@ jobs: matrix: toolchain: - 'aarch64-gcc' - # - 'arm-clang' # clang is built by circle-ci + # - 'arm-clang' is built by circle-ci - 'arm-gcc' - 'msp430-gcc' - 'riscv-gcc' @@ -73,7 +74,7 @@ jobs: # Build Make # --------------------------------------- make: - #if: github.event_name == 'pull_request' + # if: false needs: set-matrix uses: ./.github/workflows/build_util.yml strategy: @@ -81,10 +82,11 @@ jobs: matrix: toolchain: - 'aarch64-gcc' - # - 'arm-clang' # clang is built by circle-ci - - 'arm-gcc' + # 'arm-clang' is built by circle-ci + #- 'arm-gcc' - 'msp430-gcc' - 'riscv-gcc' + - 'rx-gcc' with: build-system: 'make' toolchain: ${{ matrix.toolchain }} @@ -112,6 +114,7 @@ jobs: # Build Espressif # --------------------------------------- espressif: + if: false uses: ./.github/workflows/build_util.yml strategy: fail-fast: false @@ -131,7 +134,8 @@ jobs: # Build IAR on HFP self-hosted # --------------------------------------- arm-iar: - if: github.repository_owner == 'hathach' + if: false + # if: github.repository_owner == 'hathach' needs: set-matrix runs-on: [self-hosted, Linux, X64, hifiphile] env: diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml index 3d2cbab28..085a1eda7 100644 --- a/.github/workflows/build_renesas.yml +++ b/.github/workflows/build_renesas.yml @@ -26,6 +26,7 @@ concurrency: jobs: build-rx: + if: false runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/.github/workflows/ci_set_matrix.py b/.github/workflows/ci_set_matrix.py index c6f4e8fe2..7dc9a2fa1 100644 --- a/.github/workflows/ci_set_matrix.py +++ b/.github/workflows/ci_set_matrix.py @@ -7,7 +7,8 @@ toolchain_list = { "arm-iar": "", "arm-gcc": "", "msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2", - "riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz" + "riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz", + "rx-gcc": "http://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run", } # family: [supported toolchain] @@ -27,6 +28,7 @@ family_list = { "nrf": ["arm-gcc", "arm-clang"], "ra": ["arm-gcc"], "rp2040": ["arm-gcc"], + "rx": ["rx-gcc"], "samd11 samd21 saml2x": ["arm-gcc", "arm-clang"], "samd5x_e5x samg": ["arm-gcc", "arm-clang"], "stm32f0 stm32f1 stm32f2 stm32f3": ["arm-gcc", "arm-clang", "arm-iar"], -- cgit v1.3.1 From 8df372ae7a4c9dfef1d23dc9a4562df482a4d720 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 6 Jun 2024 16:19:02 +0700 Subject: clean up --- .github/workflows/build.yml | 14 ++++---- .github/workflows/build_renesas.yml | 67 ------------------------------------- 2 files changed, 7 insertions(+), 74 deletions(-) delete mode 100644 .github/workflows/build_renesas.yml (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c0ca104a..712c7dd43 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,15 +51,15 @@ jobs: # Build CMake # --------------------------------------- cmake: - if: false + # if: false needs: set-matrix uses: ./.github/workflows/build_util.yml strategy: fail-fast: false matrix: toolchain: - - 'aarch64-gcc' # - 'arm-clang' is built by circle-ci + - 'aarch64-gcc' - 'arm-gcc' - 'msp430-gcc' - 'riscv-gcc' @@ -81,9 +81,9 @@ jobs: fail-fast: false matrix: toolchain: - - 'aarch64-gcc' # 'arm-clang' is built by circle-ci - #- 'arm-gcc' + - 'aarch64-gcc' + - 'arm-gcc' - 'msp430-gcc' - 'riscv-gcc' - 'rx-gcc' @@ -114,7 +114,7 @@ jobs: # Build Espressif # --------------------------------------- espressif: - if: false + # if: false uses: ./.github/workflows/build_util.yml strategy: fail-fast: false @@ -134,8 +134,8 @@ jobs: # Build IAR on HFP self-hosted # --------------------------------------- arm-iar: - if: false - # if: github.repository_owner == 'hathach' + # if: false + if: github.repository_owner == 'hathach' needs: set-matrix runs-on: [self-hosted, Linux, X64, hifiphile] env: diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml deleted file mode 100644 index 085a1eda7..000000000 --- a/.github/workflows/build_renesas.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Build Renesas - -on: - workflow_dispatch: - push: - paths: - - 'src/**' - - 'examples/**' - - 'lib/**' - - 'hw/**' - - 'tools/get_deps.py' - - '.github/workflows/build_renesas.yml' - pull_request: - branches: [ master ] - paths: - - 'src/**' - - 'examples/**' - - 'lib/**' - - 'hw/**' - - 'tools/get_deps.py' - - '.github/workflows/build_renesas.yml' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build-rx: - if: false - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - family: - # Alphabetical order - - 'rx' - steps: - - name: Checkout TinyUSB - uses: actions/checkout@v4 - - - name: Set Toolchain URL - run: echo >> $GITHUB_ENV TOOLCHAIN_URL=http://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run - - - name: Cache Toolchain - uses: actions/cache@v4 - id: cache-toolchain - with: - path: ~/cache/ - key: ${{ runner.os }}-21-03-30-${{ env.TOOLCHAIN_URL }} - - - name: Install Toolchain - if: steps.cache-toolchain.outputs.cache-hit != 'true' - run: | - mkdir -p ~/cache/toolchain/gnurx - wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.run - chmod +x toolchain.run - ./toolchain.run -p ~/cache/toolchain/gnurx -y - - - name: Set Toolchain Path - run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` - - - name: Get Dependencies - run: | - python3 tools/get_deps.py ${{ matrix.family }} - - - name: Build - run: python3 tools/build.py -s make ${{ matrix.family }} -- cgit v1.3.1 From 5e9ad7daeef83bf2d2079b25cedd6bcafcd30023 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 14 Jun 2024 16:09:08 +0700 Subject: add ch32v10x to ci build --- .github/workflows/ci_set_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci_set_matrix.py b/.github/workflows/ci_set_matrix.py index 7dc9a2fa1..5584b8312 100644 --- a/.github/workflows/ci_set_matrix.py +++ b/.github/workflows/ci_set_matrix.py @@ -15,7 +15,7 @@ toolchain_list = { family_list = { "broadcom_32bit": ["arm-gcc"], "broadcom_64bit": ["aarch64-gcc"], - "ch32v20x ch32v307 fomu gd32vf103": ["riscv-gcc"], + "ch32v10x ch32v20x ch32v307 fomu gd32vf103": ["riscv-gcc"], "imxrt": ["arm-gcc", "arm-clang"], "kinetis_k kinetis_kl kinetis_k32l2": ["arm-gcc", "arm-clang"], "lpc11 lpc13 lpc15": ["arm-gcc", "arm-clang"], -- cgit v1.3.1 From ef71093046c948973ff3c9bc316ca7195686835d Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 12 Jul 2024 17:20:06 +0700 Subject: add lsusb for hil pi4 --- .github/workflows/hil_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/hil_test.yml b/.github/workflows/hil_test.yml index 39a9060a2..d5bd9c200 100644 --- a/.github/workflows/hil_test.yml +++ b/.github/workflows/hil_test.yml @@ -132,9 +132,9 @@ jobs: # USB bus on rpi4 is not stable, reset it before testing - name: Reset USB bus run: | - # lsusb -t # reset VIA Labs 2.0 hub sudo usbreset 001/002 + lsusb -t - name: Checkout TinyUSB uses: actions/checkout@v4 -- cgit v1.3.1 From cc6806144fa0ff4fba4d63c8ec2cc580bb4db48a Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 15 Jul 2024 17:46:20 +0700 Subject: update hil test to run on new pi5 --- .github/workflows/hil_test.yml | 35 +++++++++++++++++++---------------- test/hil/hil_test.py | 4 +++- test/hil/pi4.json | 37 ------------------------------------- test/hil/rpi.json | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 54 deletions(-) delete mode 100644 test/hil/pi4.json create mode 100644 test/hil/rpi.json (limited to '.github/workflows') diff --git a/.github/workflows/hil_test.yml b/.github/workflows/hil_test.yml index d5bd9c200..51227d408 100644 --- a/.github/workflows/hil_test.yml +++ b/.github/workflows/hil_test.yml @@ -17,6 +17,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + HIL_JSON: test/hil/rpi.json + jobs: # --------------------------------------- # Build Non Espressif @@ -36,7 +39,7 @@ jobs: sudo apt install -y jq # Non-Espresif boards - BOARDS_LIST=$(jq -r '.boards[] | select(.flasher != "esptool") | "-b " + .name' test/hil/pi4.json | tr '\n' ' ') + BOARDS_LIST=$(jq -r '.boards[] | select(.flasher != "esptool") | "-b " + .name' ${{ env.HIL_JSON }} | tr '\n' ' ') echo "BOARDS_LIST=$BOARDS_LIST" echo "BOARDS_LIST=$BOARDS_LIST" >> $GITHUB_ENV echo "BOARDS_LIST=$BOARDS_LIST" >> $GITHUB_OUTPUT @@ -57,7 +60,7 @@ jobs: - name: Upload Artifacts for Hardware Testing uses: actions/upload-artifact@v4 with: - name: hil_pi4 + name: hil_rpi path: | cmake-build/cmake-build-*/*/*/*.elf cmake-build/cmake-build-*/*/*/*.bin @@ -78,7 +81,7 @@ jobs: run: | sudo apt install -y jq # Espressif boards - BOARDS_LIST=$(jq -r '.boards[] | select(.flasher == "esptool") | "-b " + .name' test/hil/pi4.json | tr '\n' ' ') + BOARDS_LIST=$(jq -r '.boards[] | select(.flasher == "esptool") | "-b " + .name' ${{ env.HIL_JSON }} | tr '\n' ' ') echo "BOARDS_LIST=$BOARDS_LIST" echo "BOARDS_LIST=$BOARDS_LIST" >> $GITHUB_ENV echo "BOARDS_LIST=$BOARDS_LIST" >> $GITHUB_OUTPUT @@ -102,7 +105,7 @@ jobs: - name: Upload Artifacts for Hardware Testing uses: actions/upload-artifact@v4 with: - name: hil_pi4_esp + name: hil_rpi_esp path: | cmake-build/cmake-build-*/*/*/*.bin cmake-build/cmake-build-*/*/*/bootloader/bootloader.bin @@ -112,14 +115,14 @@ jobs: # --------------------------------------- # Hardware in the loop (HIL) - # Current self-hosted instance is running on an RPI4. For attached hardware checkout test/hil/pi4.json + # self-hosted running on an RPI. For attached hardware checkout test/hil/rpi.json # --------------------------------------- - hil-pi4: + hil-rpi: if: github.repository_owner == 'hathach' needs: - build - build-esp - runs-on: [self-hosted, rp2040, nrf52840, esp32s3, hardware-in-the-loop] + runs-on: [self-hosted, ARM64, rpi, hardware-in-the-loop] env: BOARDS_LIST: "${{ needs.build.outputs.BOARDS_LIST }} ${{ needs.build-esp.outputs.BOARDS_LIST }}" steps: @@ -129,12 +132,12 @@ jobs: rm -rf "${{ github.workspace }}" mkdir -p "${{ github.workspace }}" - # USB bus on rpi4 is not stable, reset it before testing - - name: Reset USB bus - run: | - # reset VIA Labs 2.0 hub - sudo usbreset 001/002 - lsusb -t + # USB bus on rpi is not stable, reset it before testing +# - name: Reset USB bus +# run: | +# # reset VIA Labs 2.0 hub +# sudo usbreset 001/002 +# lsusb -t - name: Checkout TinyUSB uses: actions/checkout@v4 @@ -144,13 +147,13 @@ jobs: - name: Download Artifacts uses: actions/download-artifact@v4 with: - name: hil_pi4 + name: hil_rpi path: cmake-build - name: Download Artifacts uses: actions/download-artifact@v4 with: - name: hil_pi4_esp + name: hil_rpi_esp path: cmake-build - name: Test on actual hardware @@ -159,4 +162,4 @@ jobs: echo "::group::{cmake-build contents}" tree cmake-build echo "::endgroup::" - python3 test/hil/hil_test.py $BOARDS_LIST pi4.json + python3 test/hil/hil_test.py $BOARDS_LIST ${{ env.HIL_JSON }} diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index c2699cc6f..3ba84f881 100644 --- a/test/hil/hil_test.py +++ b/test/hil/hil_test.py @@ -330,7 +330,9 @@ def main(): config_file = args.config_file boards = args.board - config_file = os.path.join(os.path.dirname(__file__), config_file) + # if config file is not found, try to find it in the same directory as this script + if not os.path.exists(config_file): + config_file = os.path.join(os.path.dirname(__file__), config_file) with open(config_file) as f: config = json.load(f) diff --git a/test/hil/pi4.json b/test/hil/pi4.json deleted file mode 100644 index bdb8a5fa5..000000000 --- a/test/hil/pi4.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "boards": [ - { - "name": "raspberry_pi_pico", - "uid": "E6614C311B764A37", - "flasher": "openocd", - "flasher_sn": "E6614103E72C1D2F", - "flasher_args": "-f interface/cmsis-dap.cfg -f target/rp2040.cfg -c \"adapter speed 5000\"" - }, - { - "name": "feather_nrf52840_express", - "uid": "1F0479CD0F764471", - "flasher": "jlink", - "flasher_sn": "000682804350", - "flasher_args": "-device nrf52840_xxaa" - }, - { - "name": "itsybitsy_m4", - "uid": "D784B28C5338533335202020FF044726", - "flasher": "bossac", - "flashser_vendor": "Adafruit Industries", - "flasher_product": "ItsyBitsy M4 Express", - "flasher_reset_pin": "2", - "flasher_args": "--offset 0x4000" - }, - { - "name": "espressif_s3_devkitm", - "uid": "84F703C084E4", - "tests": [ - "cdc_msc_freertos", "hid_composite_freertos" - ], - "flasher": "esptool", - "flasher_sn": "3ea619acd1cdeb11a0a0b806e93fd3f1", - "flasher_args": "-b 1500000" - } - ] -} diff --git a/test/hil/rpi.json b/test/hil/rpi.json new file mode 100644 index 000000000..bdb8a5fa5 --- /dev/null +++ b/test/hil/rpi.json @@ -0,0 +1,37 @@ +{ + "boards": [ + { + "name": "raspberry_pi_pico", + "uid": "E6614C311B764A37", + "flasher": "openocd", + "flasher_sn": "E6614103E72C1D2F", + "flasher_args": "-f interface/cmsis-dap.cfg -f target/rp2040.cfg -c \"adapter speed 5000\"" + }, + { + "name": "feather_nrf52840_express", + "uid": "1F0479CD0F764471", + "flasher": "jlink", + "flasher_sn": "000682804350", + "flasher_args": "-device nrf52840_xxaa" + }, + { + "name": "itsybitsy_m4", + "uid": "D784B28C5338533335202020FF044726", + "flasher": "bossac", + "flashser_vendor": "Adafruit Industries", + "flasher_product": "ItsyBitsy M4 Express", + "flasher_reset_pin": "2", + "flasher_args": "--offset 0x4000" + }, + { + "name": "espressif_s3_devkitm", + "uid": "84F703C084E4", + "tests": [ + "cdc_msc_freertos", "hid_composite_freertos" + ], + "flasher": "esptool", + "flasher_sn": "3ea619acd1cdeb11a0a0b806e93fd3f1", + "flasher_args": "-b 1500000" + } + ] +} -- cgit v1.3.1 From 0e53b0b8468ab4abadb4539caec0606399c6c1e3 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 17 Jul 2024 19:45:40 +0700 Subject: update workflow build ci --- .github/workflows/ci_set_matrix.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci_set_matrix.py b/.github/workflows/ci_set_matrix.py index 5584b8312..2a00e5413 100644 --- a/.github/workflows/ci_set_matrix.py +++ b/.github/workflows/ci_set_matrix.py @@ -16,6 +16,7 @@ family_list = { "broadcom_32bit": ["arm-gcc"], "broadcom_64bit": ["aarch64-gcc"], "ch32v10x ch32v20x ch32v307 fomu gd32vf103": ["riscv-gcc"], + "da1469x": ["arm-gcc"], "imxrt": ["arm-gcc", "arm-clang"], "kinetis_k kinetis_kl kinetis_k32l2": ["arm-gcc", "arm-clang"], "lpc11 lpc13 lpc15": ["arm-gcc", "arm-clang"], @@ -36,7 +37,7 @@ family_list = { "stm32f7": ["arm-gcc", "arm-clang", "arm-iar"], "stm32g0 stm32g4 stm32h5": ["arm-gcc", "arm-clang", "arm-iar"], "stm32h7": ["arm-gcc", "arm-clang", "arm-iar"], - "stm32l4 stm32u5 stm32wb": ["arm-gcc", "arm-clang", "arm-iar"], + "stm32l0 stm32l4 stm32u5 stm32wb": ["arm-gcc", "arm-clang", "arm-iar"], "xmc4000": ["arm-gcc"], } -- cgit v1.3.1