Skip to content

Commit 7fb74a3

Browse files
committed
forgot to move hw test
1 parent 7ac85d0 commit 7fb74a3

File tree

2 files changed

+74
-74
lines changed

2 files changed

+74
-74
lines changed

.github/workflows/build_arm.yml

Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -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

.github/workflows/cmake_arm.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,76 @@ jobs:
7070
env:
7171
# for rp2040, there is no harm if defined for other families
7272
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
73+
74+
# Upload binaries for hardware test with self-hosted
75+
- name: Prepare rp2040 Artifacts
76+
if: contains(matrix.family, 'rp2040') && github.repository_owner == 'hathach'
77+
run: find examples/ -name "*.elf" -exec mv {} . \;
78+
79+
- name: Upload Artifacts for rp2040
80+
if: contains(matrix.family,'rp2040') && github.repository_owner == 'hathach'
81+
uses: actions/upload-artifact@v3
82+
with:
83+
name: rp2040
84+
path: |
85+
*.elf
86+
87+
# ---------------------------------------
88+
# Hardware in the loop (HIL)
89+
# Current self-hosted instance is running on an RPI4 with
90+
# - pico + pico-probe connected via USB
91+
# - pico-probe is /dev/ttyACM0
92+
# ---------------------------------------
93+
hw-rp2040-test:
94+
# run only with hathach's commit due to limited resource on RPI4
95+
if: github.repository_owner == 'hathach'
96+
needs: build-arm
97+
runs-on: [self-hosted, Linux, ARM64, rp2040]
98+
99+
steps:
100+
- name: Clean workspace
101+
run: |
102+
echo "Cleaning up previous run"
103+
rm -rf "${{ github.workspace }}"
104+
mkdir -p "${{ github.workspace }}"
105+
106+
- name: Download rp2040 Artifacts
107+
uses: actions/download-artifact@v3
108+
with:
109+
name: rp2040
110+
111+
- name: Create flash.sh
112+
run: |
113+
echo > flash.sh 'cmdout=$(openocd -f "interface/cmsis-dap.cfg" -f "target/rp2040.cfg" -c "adapter speed 5000" -c "program $1 reset exit")'
114+
echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
115+
chmod +x flash.sh
116+
117+
- name: Test cdc_dual_ports
118+
run: |
119+
./flash.sh cdc_dual_ports.elf
120+
while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
121+
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
122+
test -e /dev/ttyACM2 && echo "ttyACM2 exists"
123+
124+
- name: Test cdc_msc
125+
run: |
126+
./flash.sh cdc_msc.elf
127+
readme='/media/pi/TinyUSB MSC/README.TXT'
128+
while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
129+
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
130+
test -f "$readme" && echo "$readme exists"
131+
cat "$readme"
132+
133+
- name: Test dfu
134+
run: |
135+
./flash.sh dfu.elf
136+
while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
137+
dfu-util -d cafe -a 0 -U dfu0
138+
dfu-util -d cafe -a 1 -U dfu1
139+
grep "TinyUSB DFU! - Partition 0" dfu0
140+
grep "TinyUSB DFU! - Partition 1" dfu1
141+
142+
- name: Test dfu_runtime
143+
run: |
144+
./flash.sh dfu_runtime.elf
145+
while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done

0 commit comments

Comments
 (0)