@@ -90,24 +90,11 @@ jobs:
9090 find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
9191 done
9292
93- # Upload binaries for rp2040/stm32l412nucleo hardware test with self-hosted
94-
95- - name : Prepare rp2040 Artifacts
96- if : contains(matrix.family, 'rp2040') && github.repository_owner == 'hathach'
97- run : find examples/ -name "*.elf" -exec mv {} . \;
98-
93+ # Upload binaries for hardware test with self-hosted
9994 - name : Prepare stm32l412nucleo Artifacts
10095 if : contains(matrix.family, 'stm32l4')
10196 run : find examples/ -path "*stm32l412nucleo/*.elf" -exec mv {} . \;
10297
103- - name : Upload Artifacts for rp2040
104- if : contains(matrix.family,'rp2040') && github.repository_owner == 'hathach'
105- uses : actions/upload-artifact@v3
106- with :
107- name : rp2040
108- path : |
109- *.elf
110-
11198 - name : Upload Artifacts for stm32l412nucleo
11299 if : contains(matrix.family, 'stm32l4') && github.repository_owner == 'hathach'
113100 uses : actions/upload-artifact@v3
@@ -116,66 +103,6 @@ jobs:
116103 path : |
117104 *.elf
118105
119- # ---------------------------------------
120- # Hardware in the loop (HIL)
121- # Current self-hosted instance is running on an RPI4 with
122- # - pico + pico-probe connected via USB
123- # - pico-probe is /dev/ttyACM0
124- # ---------------------------------------
125- hw-rp2040-test :
126- # run only with hathach's commit due to limited resource on RPI4
127- if : github.repository_owner == 'hathach'
128- needs : build-arm
129- runs-on : [self-hosted, Linux, ARM64, rp2040]
130-
131- steps :
132- - name : Clean workspace
133- run : |
134- echo "Cleaning up previous run"
135- rm -rf "${{ github.workspace }}"
136- mkdir -p "${{ github.workspace }}"
137-
138- - name : Download rp2040 Artifacts
139- uses : actions/download-artifact@v3
140- with :
141- name : rp2040
142-
143- - name : Create flash.sh
144- run : |
145- echo > flash.sh 'cmdout=$(openocd -f "interface/cmsis-dap.cfg" -f "target/rp2040.cfg" -c "adapter speed 5000" -c "program $1 reset exit")'
146- echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
147- chmod +x flash.sh
148-
149- - name : Test cdc_dual_ports
150- run : |
151- ./flash.sh cdc_dual_ports.elf
152- while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
153- test -e /dev/ttyACM1 && echo "ttyACM1 exists"
154- test -e /dev/ttyACM2 && echo "ttyACM2 exists"
155-
156- - name : Test cdc_msc
157- run : |
158- ./flash.sh cdc_msc.elf
159- readme='/media/pi/TinyUSB MSC/README.TXT'
160- while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
161- test -e /dev/ttyACM1 && echo "ttyACM1 exists"
162- test -f "$readme" && echo "$readme exists"
163- cat "$readme"
164-
165- - name : Test dfu
166- run : |
167- ./flash.sh dfu.elf
168- while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
169- dfu-util -d cafe -a 0 -U dfu0
170- dfu-util -d cafe -a 1 -U dfu1
171- grep "TinyUSB DFU! - Partition 0" dfu0
172- grep "TinyUSB DFU! - Partition 1" dfu1
173-
174- - name : Test dfu_runtime
175- run : |
176- ./flash.sh dfu_runtime.elf
177- while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done
178-
179106 # ---------------------------------------
180107 # Hardware in the loop (HIL)
181108 # Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user
0 commit comments