Merge pull request #1880 from hathach/reduce-selfed-host-iar
Bundle mulitple familes for self-hosted iar to reduce build time
This commit is contained in:
2
.github/workflows/build_aarch64.yml
vendored
2
.github/workflows/build_aarch64.yml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_aarch64.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths:
|
paths:
|
||||||
@@ -14,6 +15,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_aarch64.yml'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
|||||||
89
.github/workflows/build_arm.yml
vendored
89
.github/workflows/build_arm.yml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_arm.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths:
|
paths:
|
||||||
@@ -14,6 +15,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_arm.yml'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
@@ -98,13 +100,12 @@ jobs:
|
|||||||
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
|
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
|
||||||
done
|
done
|
||||||
|
|
||||||
# Following steps are for Hardware Test with self-hosted
|
# Upload binaries for rp2040 hardware test with self-hosted
|
||||||
|
- name: Prepare rp2040 Artifacts
|
||||||
- name: Prepare Artifacts
|
|
||||||
if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
|
if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
|
||||||
run: find examples/ -name "*.elf" -exec mv {} . \;
|
run: find examples/ -name "*.elf" -exec mv {} . \;
|
||||||
|
|
||||||
- name: Upload Artifacts for Hardware Test
|
- name: Upload rp2040 Artifacts
|
||||||
if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
|
if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -112,6 +113,19 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
*.elf
|
*.elf
|
||||||
|
|
||||||
|
# Upload binaries for stm32l412nucleo hardware test with self-hosted
|
||||||
|
- name: Prepare stm32l412nucleo Artifacts
|
||||||
|
if: matrix.family == 'stm32l4'
|
||||||
|
run: find examples/ -path "*stm32l412nucleo/*.elf" -exec mv {} . \;
|
||||||
|
|
||||||
|
- name: Upload stm32l412nucleo Artifacts
|
||||||
|
if: matrix.family == 'stm32l4'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: stm32l412nucleo
|
||||||
|
path: |
|
||||||
|
*.elf
|
||||||
|
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# Build all no-family (orphaned) boards
|
# Build all no-family (orphaned) boards
|
||||||
# disable this workflow since it is often failed randomly
|
# disable this workflow since it is often failed randomly
|
||||||
@@ -210,8 +224,67 @@ jobs:
|
|||||||
./flash.sh dfu_runtime.elf
|
./flash.sh dfu_runtime.elf
|
||||||
while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done
|
while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done
|
||||||
|
|
||||||
# - name: Test hid_boot_interface
|
# ---------------------------------------
|
||||||
# run: |
|
# Hardware in the loop (HIL)
|
||||||
# ./flash.sh hid_boot_interface.elf
|
# Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user
|
||||||
# while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done
|
# - STM32L412 Nucleo with on-board jlink as ttyACM0
|
||||||
|
# ---------------------------------------
|
||||||
|
hw-stm32l412nucleo-test:
|
||||||
|
needs: build-arm
|
||||||
|
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: Download stm32l4 Artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: 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 $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
|
||||||
|
|||||||
2
.github/workflows/build_esp.yml
vendored
2
.github/workflows/build_esp.yml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_esp.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths:
|
paths:
|
||||||
@@ -14,6 +15,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_esp.yml'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
|||||||
22
.github/workflows/build_iar.yml
vendored
22
.github/workflows/build_iar.yml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_iar.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths:
|
paths:
|
||||||
@@ -14,6 +15,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_iar.yml'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
@@ -27,13 +29,9 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
family:
|
family:
|
||||||
# Alphabetical order
|
# Alphabetical order
|
||||||
- 'stm32f0'
|
# Note: bundle multiple families into a matrix since there is only one self-hosted instance can
|
||||||
- 'stm32f1'
|
# run IAR build. Too many matrix can hurt due to setup/teardown overhead.
|
||||||
- 'stm32f4'
|
- 'stm32f0 stm32f1 stm32f4 stm32f7 stm32g4 stm32h7 stm32l4'
|
||||||
- 'stm32f7'
|
|
||||||
- 'stm32g4'
|
|
||||||
- 'stm32h7'
|
|
||||||
- 'stm32l4'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clean workspace
|
- name: Clean workspace
|
||||||
run: |
|
run: |
|
||||||
@@ -49,11 +47,11 @@ jobs:
|
|||||||
git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel
|
git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel
|
||||||
python3 tools/get_dependencies.py ${{ matrix.family }}
|
python3 tools/get_dependencies.py ${{ matrix.family }}
|
||||||
|
|
||||||
- name: Checkout pico-sdk for rp2040
|
#- name: Checkout pico-sdk for rp2040
|
||||||
if: matrix.family == 'rp2040'
|
# if: matrix.family == 'rp2040'
|
||||||
run: |
|
# run: |
|
||||||
git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk
|
# git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk
|
||||||
echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
|
# echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: python3 tools/build_family.py ${{ matrix.family }} CC=iccarm
|
run: python3 tools/build_family.py ${{ matrix.family }} CC=iccarm
|
||||||
|
|||||||
2
.github/workflows/build_msp430.yml
vendored
2
.github/workflows/build_msp430.yml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_msp430.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths:
|
paths:
|
||||||
@@ -14,6 +15,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_msp430.yml'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
|||||||
2
.github/workflows/build_renesas.yml
vendored
2
.github/workflows/build_renesas.yml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_renesas.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths:
|
paths:
|
||||||
@@ -14,6 +15,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_renesas.yml'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
|||||||
2
.github/workflows/build_riscv.yml
vendored
2
.github/workflows/build_riscv.yml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_riscv.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths:
|
paths:
|
||||||
@@ -14,6 +15,7 @@ on:
|
|||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'hw/**'
|
- 'hw/**'
|
||||||
|
- '.github/workflows/build_riscv.yml'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
|||||||
94
.github/workflows/test_hardware.yml
vendored
94
.github/workflows/test_hardware.yml
vendored
@@ -1,94 +0,0 @@
|
|||||||
name: Hardware Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'examples/**'
|
|
||||||
- 'lib/**'
|
|
||||||
- 'hw/**'
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'examples/**'
|
|
||||||
- 'lib/**'
|
|
||||||
- 'hw/**'
|
|
||||||
|
|
||||||
# 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
|
|
||||||
Reference in New Issue
Block a user