mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-22 01:21:20 +00:00
Merge pull request #1740 from hathach/add-HiFiPhile-selfhost
Add hifiphile self-hosted
This commit is contained in:
commit
67cda9b7f9
2
.github/workflows/build_aarch64.yml
vendored
2
.github/workflows/build_aarch64.yml
vendored
@ -41,7 +41,7 @@ jobs:
|
||||
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
|
||||
|
||||
- name: Cache Toolchain
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
id: cache-toolchain
|
||||
with:
|
||||
path: ~/cache/
|
||||
|
10
.github/workflows/build_arm.yml
vendored
10
.github/workflows/build_arm.yml
vendored
@ -123,9 +123,11 @@ jobs:
|
||||
|
||||
# ---------------------------------------
|
||||
# Build all no-family (orphaned) boards
|
||||
# disable this workflow since it is often failed randomly
|
||||
# ---------------------------------------
|
||||
build-board:
|
||||
runs-on: ubuntu-latest
|
||||
if: false
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@ -163,11 +165,11 @@ jobs:
|
||||
# - pico + pico-probe connected via USB
|
||||
# - pico-probe is /dev/ttyACM0
|
||||
# ---------------------------------------
|
||||
hw-test:
|
||||
hw-rp2040-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]
|
||||
runs-on: [self-hosted, Linux, ARM64, rp2040]
|
||||
|
||||
steps:
|
||||
- name: Clean workspace
|
||||
@ -183,9 +185,9 @@ jobs:
|
||||
|
||||
- name: Create flash.sh
|
||||
run: |
|
||||
touch flash.sh
|
||||
echo > flash.sh 'cmdout=$(openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1 reset exit")'
|
||||
echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
|
||||
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: |
|
||||
|
5
.github/workflows/build_msp430.yml
vendored
5
.github/workflows/build_msp430.yml
vendored
@ -16,9 +16,12 @@ jobs:
|
||||
family:
|
||||
# Alphabetical order
|
||||
- 'msp430'
|
||||
|
||||
steps:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Checkout TinyUSB
|
||||
uses: actions/checkout@v3
|
||||
@ -36,7 +39,7 @@ jobs:
|
||||
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=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
|
||||
|
||||
- name: Cache Toolchain
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
id: cache-toolchain
|
||||
with:
|
||||
path: ~/cache/
|
||||
|
2
.github/workflows/build_renesas.yml
vendored
2
.github/workflows/build_renesas.yml
vendored
@ -38,7 +38,7 @@ jobs:
|
||||
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@v2
|
||||
uses: actions/cache@v3
|
||||
id: cache-toolchain
|
||||
with:
|
||||
path: ~/cache/
|
||||
|
2
.github/workflows/build_riscv.yml
vendored
2
.github/workflows/build_riscv.yml
vendored
@ -39,7 +39,7 @@ jobs:
|
||||
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/download/v10.1.0-1.1/xpack-riscv-none-embed-gcc-10.1.0-1.1-linux-x64.tar.gz
|
||||
|
||||
- name: Cache Toolchain
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
id: cache-toolchain
|
||||
with:
|
||||
path: ~/cache/
|
||||
|
85
.github/workflows/test_hardware.yml
vendored
Normal file
85
.github/workflows/test_hardware.yml
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
name: Hardware Test
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
|
||||
# Hardware in the loop (HIL)
|
||||
# Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user
|
||||
# - STM32L412 Nucleo with on-board jlink as ttyACM0
|
||||
|
||||
jobs:
|
||||
stm32l412nucleo-test:
|
||||
runs-on: [self-hosted, Linux, X64, hifiphile]
|
||||
|
||||
steps:
|
||||
- name: Clean workspace
|
||||
run: |
|
||||
echo "Cleaning up previous run"
|
||||
rm -rf "${{ github.workspace }}"
|
||||
mkdir -p "${{ github.workspace }}"
|
||||
|
||||
- name: Checkout TinyUSB
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get Dependencies and Build
|
||||
run: |
|
||||
git submodule update --init lib/FreeRTOS-Kernel lib/lwip
|
||||
python3 tools/get_dependencies.py stm32l4
|
||||
python3 tools/build_family.py stm32l4
|
||||
|
||||
- name: Pick-up elf files
|
||||
run: |
|
||||
mkdir stm32l412nucleo/
|
||||
find examples/ -path "*stm32l412nucleo/*.elf" -exec mv {} stm32l412nucleo/ \;
|
||||
|
||||
- name: Create flash.sh
|
||||
run: |
|
||||
echo > flash.sh 'echo halt > flash.jlink'
|
||||
echo >> flash.sh 'echo r >> flash.jlink'
|
||||
echo >> flash.sh 'echo loadfile stm32l412nucleo/$1 >> flash.jlink'
|
||||
echo >> flash.sh 'echo r >> flash.jlink'
|
||||
echo >> flash.sh 'echo go >> flash.jlink'
|
||||
echo >> flash.sh 'echo exit >> flash.jlink'
|
||||
echo >> flash.sh 'cmdout=$(JLinkExe -device stm32l412kb -if swd -JTAGConf -1,-1 -speed auto -NoGui 1 -ExitOnError 1 -CommandFile flash.jlink)'
|
||||
echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
|
||||
chmod +x flash.sh
|
||||
|
||||
- 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"
|
||||
|
||||
# Debian does not auto mount usb drive. skip this test for now
|
||||
- name: Test cdc_msc
|
||||
if: false
|
||||
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