mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-16 05:42:56 +00:00
try to build hil in parallel
This commit is contained in:
parent
6fdf206f11
commit
9985b9faf4
58
.github/workflows/hil_test.yml
vendored
58
.github/workflows/hil_test.yml
vendored
@ -21,51 +21,53 @@ env:
|
|||||||
HIL_JSON: test/hil/rpi.json
|
HIL_JSON: test/hil/rpi.json
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ---------------------------------------
|
set-matrix:
|
||||||
# Build Non Espressif
|
|
||||||
# ---------------------------------------
|
|
||||||
build:
|
|
||||||
if: github.repository_owner == 'hathach'
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
BOARDS_LIST: ${{ steps.parse_hil_json.outputs.BOARDS_LIST }}
|
json: ${{ steps.set-matrix-json.outputs.matrix }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout TinyUSB
|
- name: Checkout TinyUSB
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Parse HIL json
|
- name: Generate matrix json
|
||||||
id: parse_hil_json
|
id: set-matrix-json
|
||||||
run: |
|
run: |
|
||||||
sudo apt install -y jq
|
MATRIX_JSON=$(jq -c '{ "arm-gcc": [.boards[] | select(.flasher != "esptool" and .flasher != "openocd_wch") | .name] }' ${{ env.HIL_JSON }})
|
||||||
|
echo "matrix=$MATRIX_JSON"
|
||||||
|
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Non-Espresif boards
|
# ---------------------------------------
|
||||||
BOARDS_LIST=$(jq -r '.boards[] | select(.flasher != "esptool") | "-b " + .name' ${{ env.HIL_JSON }} | tr '\n' ' ')
|
# Build arm-gcc
|
||||||
echo "BOARDS_LIST=$BOARDS_LIST"
|
# ---------------------------------------
|
||||||
echo "BOARDS_LIST=$BOARDS_LIST" >> $GITHUB_ENV
|
build:
|
||||||
echo "BOARDS_LIST=$BOARDS_LIST" >> $GITHUB_OUTPUT
|
if: github.repository_owner == 'hathach'
|
||||||
|
needs: set-matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
board: ${{ fromJSON(needs.set-matrix.outputs.json)['arm-gcc'] }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout TinyUSB
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup arm-gcc toolchain
|
- name: Setup arm-gcc toolchain
|
||||||
uses: ./.github/actions/setup_toolchain
|
uses: ./.github/actions/setup_toolchain
|
||||||
with:
|
with:
|
||||||
toolchain: 'arm-gcc'
|
toolchain: 'arm-gcc'
|
||||||
|
|
||||||
- name: Setup risv-gcc toolchain
|
|
||||||
uses: ./.github/actions/setup_toolchain
|
|
||||||
with:
|
|
||||||
toolchain: 'riscv-gcc'
|
|
||||||
|
|
||||||
- name: Get Dependencies
|
- name: Get Dependencies
|
||||||
uses: ./.github/actions/get_deps
|
uses: ./.github/actions/get_deps
|
||||||
with:
|
with:
|
||||||
arg: ${{ env.BOARDS_LIST }}
|
arg: -b${{ matrix.board }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: python tools/build.py $BOARDS_LIST
|
run: python tools/build.py -b${{ matrix.board }}
|
||||||
|
|
||||||
- name: Upload Artifacts for Hardware Testing
|
- name: Upload Artifacts for Hardware Testing
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: hil_rpi
|
name: ${{ matrix.board }}
|
||||||
path: |
|
path: |
|
||||||
cmake-build/cmake-build-*/*/*/*.elf
|
cmake-build/cmake-build-*/*/*/*.elf
|
||||||
cmake-build/cmake-build-*/*/*/*.bin
|
cmake-build/cmake-build-*/*/*/*.bin
|
||||||
@ -76,11 +78,8 @@ jobs:
|
|||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
hil-rpi:
|
hil-rpi:
|
||||||
if: github.repository_owner == 'hathach'
|
if: github.repository_owner == 'hathach'
|
||||||
needs:
|
needs: build
|
||||||
- build
|
|
||||||
runs-on: [self-hosted, ARM64, rpi, hardware-in-the-loop]
|
runs-on: [self-hosted, ARM64, rpi, hardware-in-the-loop]
|
||||||
env:
|
|
||||||
BOARDS_LIST: "${{ needs.build-esp.outputs.BOARDS_LIST }} ${{ needs.build.outputs.BOARDS_LIST }}"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clean workspace
|
- name: Clean workspace
|
||||||
run: |
|
run: |
|
||||||
@ -107,9 +106,4 @@ jobs:
|
|||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Test on actual hardware
|
- name: Test on actual hardware
|
||||||
run: |
|
run: python3 test/hil/hil_test.py ${{ env.HIL_JSON }}
|
||||||
echo "BOARDS_LIST=$BOARDS_LIST"
|
|
||||||
echo "::group::{cmake-build contents}"
|
|
||||||
tree cmake-build
|
|
||||||
echo "::endgroup::"
|
|
||||||
python3 test/hil/hil_test.py $BOARDS_LIST ${{ env.HIL_JSON }}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user