3232 # Alphabetical order
3333 # Note: bundle multiple families into a matrix since there is only one self-hosted instance can
3434 # run IAR build. Too many matrix can hurt due to setup/teardown overhead.
35- - ' stm32f0 stm32f1 stm32f7 stm32g0 stm32g4 stm32h7 stm32l4'
35+ - ' stm32f0 stm32f1 stm32f4 stm32f7 stm32g0 stm32g4 stm32h7 stm32l4'
3636 steps :
3737 - name : Clean workspace
3838 run : |
@@ -49,82 +49,85 @@ jobs:
4949 - name : Build
5050 run : python3 tools/build_cmake.py ${{ matrix.family }} -DTOOLCHAIN=iar -DCMAKE_BUILD_TYPE=MinSizeRel
5151
52- # Upload binaries for hardware test with self-hosted
53- - name : Prepare stm32l412nucleo Artifacts
54- if : contains(matrix.family, 'stm32l4')
55- working-directory : ${{github.workspace}}/cmake-build/cmake-build-stm32l412nucleo
52+ - name : Test on actual hardware (hardware in the loop)
5653 run : |
57- find device/ -name "*.elf" -exec mv {} ../../ \;
58-
59- - name : Upload Artifacts for stm32l412nucleo
60- if : contains(matrix.family, 'stm32l4') && github.repository_owner == 'hathach'
61- uses : actions/upload-artifact@v3
62- with :
63- name : stm32l4
64- path : |
65- *.elf
54+ python3 tools/hitl_test.py hitl_hfp.json
55+
56+ # # Upload binaries for hardware test with self-hosted
57+ # - name: Prepare stm32l412nucleo Artifacts
58+ # if: contains(matrix.family, 'stm32l4')
59+ # working-directory: ${{github.workspace}}/cmake-build/cmake-build-stm32l412nucleo
60+ # run: |
61+ # find device/ -name "*.elf" -exec mv {} ../../ \;
62+ #
63+ # - name: Upload Artifacts for stm32l412nucleo
64+ # if: contains(matrix.family, 'stm32l4') && github.repository_owner == 'hathach'
65+ # uses: actions/upload-artifact@v3
66+ # with:
67+ # name: stm32l4
68+ # path: |
69+ # *.elf
6670
6771 # ---------------------------------------
6872 # Hardware in the loop (HIL)
6973 # Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user
70- # - STM32L412 Nucleo with on-board jlink as ttyACM0
7174 # ---------------------------------------
72- hw-stm32l412nucleo-test :
73- needs : cmake
74- runs-on : [self-hosted, Linux, X64, hifiphile]
75-
76- steps :
77- - name : Clean workspace
78- run : |
79- echo "Cleaning up previous run"
80- rm -rf "${{ github.workspace }}"
81- mkdir -p "${{ github.workspace }}"
82-
83- - name : Download stm32l4 Artifacts
84- uses : actions/download-artifact@v3
85- with :
86- name : stm32l4
87-
88- - name : Create flash.sh
89- run : |
90- echo > flash.sh 'echo halt > flash.jlink'
91- echo >> flash.sh 'echo r >> flash.jlink'
92- echo >> flash.sh 'echo loadfile $1 >> flash.jlink'
93- echo >> flash.sh 'echo r >> flash.jlink'
94- echo >> flash.sh 'echo go >> flash.jlink'
95- echo >> flash.sh 'echo exit >> flash.jlink'
96- echo >> flash.sh 'cmdout=$(JLinkExe -USB 774470029 -device stm32l412kb -if swd -JTAGConf -1,-1 -speed auto -NoGui 1 -ExitOnError 1 -CommandFile flash.jlink)'
97- echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
98- chmod +x flash.sh
99-
100- - name : Test cdc_dual_ports
101- run : |
102- ./flash.sh cdc_dual_ports.elf
103- while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
104- test -e /dev/ttyACM1 && echo "ttyACM1 exists"
105- test -e /dev/ttyACM2 && echo "ttyACM2 exists"
106-
107- # Debian does not auto mount usb drive. skip this test for now
108- - name : Test cdc_msc
109- if : false
110- run : |
111- ./flash.sh cdc_msc.elf
112- readme='/media/pi/TinyUSB MSC/README.TXT'
113- while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
114- test -e /dev/ttyACM1 && echo "ttyACM1 exists"
115- test -f "$readme" && echo "$readme exists"
116- cat "$readme"
117-
118- - name : Test dfu
119- run : |
120- ./flash.sh dfu.elf
121- while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
122- dfu-util -d cafe -a 0 -U dfu0
123- dfu-util -d cafe -a 1 -U dfu1
124- grep "TinyUSB DFU! - Partition 0" dfu0
125- grep "TinyUSB DFU! - Partition 1" dfu1
126-
127- - name : Test dfu_runtime
128- run : |
129- ./flash.sh dfu_runtime.elf
130- while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done
75+ # hw-stm32l412nucleo-test:
76+ # needs: cmake
77+ # runs-on: [self-hosted, Linux, X64, hifiphile]
78+ #
79+ # steps:
80+ # - name: Clean workspace
81+ # run: |
82+ # echo "Cleaning up previous run"
83+ # rm -rf "${{ github.workspace }}"
84+ # mkdir -p "${{ github.workspace }}"
85+ #
86+ # - name: Download stm32l4 Artifacts
87+ # uses: actions/download-artifact@v3
88+ # with:
89+ # name: stm32l4
90+ #
91+ # - name: Create flash.sh
92+ # run: |
93+ # echo > flash.sh 'echo halt > flash.jlink'
94+ # echo >> flash.sh 'echo r >> flash.jlink'
95+ # echo >> flash.sh 'echo loadfile $1 >> flash.jlink'
96+ # echo >> flash.sh 'echo r >> flash.jlink'
97+ # echo >> flash.sh 'echo go >> flash.jlink'
98+ # echo >> flash.sh 'echo exit >> flash.jlink'
99+ # echo >> flash.sh 'cmdout=$(JLinkExe -USB 774470029 -device stm32l412kb -if swd -JTAGConf -1,-1 -speed auto -NoGui 1 -ExitOnError 1 -CommandFile flash.jlink)'
100+ # echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
101+ # chmod +x flash.sh
102+ #
103+ # - name: Test cdc_dual_ports
104+ # run: |
105+ # ./flash.sh cdc_dual_ports.elf
106+ # while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
107+ # test -e /dev/ttyACM1 && echo "ttyACM1 exists"
108+ # test -e /dev/ttyACM2 && echo "ttyACM2 exists"
109+ #
110+ # # Debian does not auto mount usb drive. skip this test for now
111+ # - name: Test cdc_msc
112+ # if: false
113+ # run: |
114+ # ./flash.sh cdc_msc.elf
115+ # readme='/media/pi/TinyUSB MSC/README.TXT'
116+ # while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
117+ # test -e /dev/ttyACM1 && echo "ttyACM1 exists"
118+ # test -f "$readme" && echo "$readme exists"
119+ # cat "$readme"
120+ #
121+ # - name: Test dfu
122+ # run: |
123+ # ./flash.sh dfu.elf
124+ # while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
125+ # dfu-util -d cafe -a 0 -U dfu0
126+ # dfu-util -d cafe -a 1 -U dfu1
127+ # grep "TinyUSB DFU! - Partition 0" dfu0
128+ # grep "TinyUSB DFU! - Partition 1" dfu1
129+ #
130+ # - name: Test dfu_runtime
131+ # run: |
132+ # ./flash.sh dfu_runtime.elf
133+ # while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done
0 commit comments