mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-24 07:43:38 +00:00
move test_hardware into build_arm
This commit is contained in:
parent
ca4ae61c1c
commit
5d13eb8e7a
72
.github/workflows/build_arm.yml
vendored
72
.github/workflows/build_arm.yml
vendored
@ -126,7 +126,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
GH_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
||||||
run: gh workflow run test_hardware.yml -r $GITHUB_REF
|
run: gh workflow run test_hardware.yml -r $GITHUB_REF
|
||||||
|
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# Build all no-family (orphaned) boards
|
# Build all no-family (orphaned) boards
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
@ -145,7 +145,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
|
||||||
- name: Install ARM GCC
|
- name: Install ARM GCC
|
||||||
uses: carlosperate/arm-none-eabi-gcc-action@v1
|
uses: carlosperate/arm-none-eabi-gcc-action@v1
|
||||||
@ -160,3 +162,69 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: python3 tools/build_board.py ${{ matrix.example }}
|
run: python3 tools/build_board.py ${{ matrix.example }}
|
||||||
|
|
||||||
|
# ---------------------------------------
|
||||||
|
# Hardware in the loop (HIL)
|
||||||
|
# Current self-hosted instance is running on an RPI4 with
|
||||||
|
# - pico + pico-probe connected via USB
|
||||||
|
# - pico-probe is /dev/ttyACM0
|
||||||
|
# ---------------------------------------
|
||||||
|
hw-test:
|
||||||
|
# Limit the run to only hathach due to limited resource on RPI4
|
||||||
|
if: github.repository_owner == 'hathach'
|
||||||
|
needs: build-arm
|
||||||
|
runs-on: [self-hosted, Linux, ARM64]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clean workspace
|
||||||
|
run: |
|
||||||
|
echo "Cleaning up previous run"
|
||||||
|
rm -rf "${{ github.workspace }}"
|
||||||
|
mkdir -p "${{ github.workspace }}"
|
||||||
|
|
||||||
|
- name: Download rp2040 Artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: rp2040
|
||||||
|
|
||||||
|
- name: Create flash.sh
|
||||||
|
run: |
|
||||||
|
touch flash.sh
|
||||||
|
chmod +x flash.sh
|
||||||
|
echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1 reset exit"'
|
||||||
|
|
||||||
|
- name: Test cdc_dual_ports
|
||||||
|
run: |
|
||||||
|
./flash.sh cdc_dual_ports.elf
|
||||||
|
while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 5 ]; do :; done
|
||||||
|
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
|
||||||
|
test -e /dev/ttyACM2 && echo "ttyACM2 exists"
|
||||||
|
|
||||||
|
- name: Test cdc_msc
|
||||||
|
run: |
|
||||||
|
./flash.sh cdc_msc.elf
|
||||||
|
readme='/media/pi/TinyUSB MSC/README.TXT'
|
||||||
|
while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 5 ]; do :; done
|
||||||
|
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
|
||||||
|
test -f "$readme" && echo "$readme exists"
|
||||||
|
cat "$readme"
|
||||||
|
|
||||||
|
- name: Test dfu
|
||||||
|
run: |
|
||||||
|
./flash.sh dfu.elf
|
||||||
|
while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 5 ]; do :; done
|
||||||
|
dfu-util -d cafe -a 0 -U dfu0
|
||||||
|
dfu-util -d cafe -a 1 -U dfu1
|
||||||
|
grep "TinyUSB DFU! - Partition 0" dfu0
|
||||||
|
grep "TinyUSB DFU! - Partition 1" dfu1
|
||||||
|
|
||||||
|
- name: Test dfu_runtime
|
||||||
|
run: |
|
||||||
|
./flash.sh dfu_runtime.elf
|
||||||
|
while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done
|
||||||
|
|
||||||
|
# - name: Test hid_boot_interface
|
||||||
|
# run: |
|
||||||
|
# ./flash.sh hid_boot_interface.elf
|
||||||
|
# while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done
|
||||||
|
|
||||||
|
69
.github/workflows/test_hardware.yml
vendored
69
.github/workflows/test_hardware.yml
vendored
@ -1,69 +0,0 @@
|
|||||||
name: Hardware Test
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# Hardware in the loop (HIL)
|
|
||||||
# Current self-hosted instance is running on an RPI4 with
|
|
||||||
# - pico + pico-probe connected via USB
|
|
||||||
# - pico-probe is /dev/ttyACM0
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
hw-test:
|
|
||||||
# Limit the run to only hathach due to limited resource on RPI4
|
|
||||||
if: github.repository_owner == 'hathach'
|
|
||||||
runs-on: [self-hosted, Linux, ARM64]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clean workspace
|
|
||||||
run: |
|
|
||||||
echo "Cleaning up previous run"
|
|
||||||
rm -rf "${{ github.workspace }}"
|
|
||||||
mkdir -p "${{ github.workspace }}"
|
|
||||||
|
|
||||||
- name: Download rp2040 Artifacts
|
|
||||||
uses: dawidd6/action-download-artifact@v2
|
|
||||||
with:
|
|
||||||
workflow: build_arm.yml
|
|
||||||
name: rp2040
|
|
||||||
|
|
||||||
- name: Create flash.sh
|
|
||||||
run: |
|
|
||||||
touch flash.sh
|
|
||||||
chmod +x flash.sh
|
|
||||||
echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1 reset exit"'
|
|
||||||
|
|
||||||
- name: Test cdc_dual_ports
|
|
||||||
run: |
|
|
||||||
./flash.sh cdc_dual_ports.elf
|
|
||||||
while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 5 ]; do :; done
|
|
||||||
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
|
|
||||||
test -e /dev/ttyACM2 && echo "ttyACM2 exists"
|
|
||||||
|
|
||||||
- name: Test cdc_msc
|
|
||||||
run: |
|
|
||||||
./flash.sh cdc_msc.elf
|
|
||||||
readme='/media/pi/TinyUSB MSC/README.TXT'
|
|
||||||
while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 5 ]; do :; done
|
|
||||||
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
|
|
||||||
test -f "$readme" && echo "$readme exists"
|
|
||||||
cat "$readme"
|
|
||||||
|
|
||||||
- name: Test dfu
|
|
||||||
run: |
|
|
||||||
./flash.sh dfu.elf
|
|
||||||
while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 5 ]; do :; done
|
|
||||||
dfu-util -d cafe -a 0 -U dfu0
|
|
||||||
dfu-util -d cafe -a 1 -U dfu1
|
|
||||||
grep "TinyUSB DFU! - Partition 0" dfu0
|
|
||||||
grep "TinyUSB DFU! - Partition 1" dfu1
|
|
||||||
|
|
||||||
- name: Test dfu_runtime
|
|
||||||
run: |
|
|
||||||
./flash.sh dfu_runtime.elf
|
|
||||||
while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done
|
|
||||||
|
|
||||||
# - name: Test hid_boot_interface
|
|
||||||
# run: |
|
|
||||||
# ./flash.sh hid_boot_interface.elf
|
|
||||||
# while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user