summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2023-12-11 16:16:28 +0700
committerGitHub <[email protected]>2023-12-11 16:16:28 +0700
commit37158eddcbba188dd77dbb17d77a0631a32713d0 (patch)
treeba98415d3c89a65778cadc1b28cdbf5ef6f9fd7b /.github/workflows
parent4c80f5a192fdf86af995516311d9ff239a3c8484 (diff)
parentf5f087e99cae5de00dc6d0b1b2bef534f0442c95 (diff)
Merge pull request #2367 from hathach/add-hil-s3
Add esp32s3 to hardware in the loop test
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build_esp.yml49
-rw-r--r--.github/workflows/build_iar.yml2
-rw-r--r--.github/workflows/cmake_arm.yml35
3 files changed, 64 insertions, 22 deletions
diff --git a/.github/workflows/build_esp.yml b/.github/workflows/build_esp.yml
index 4568695c2..fded0e85d 100644
--- a/.github/workflows/build_esp.yml
+++ b/.github/workflows/build_esp.yml
@@ -33,7 +33,6 @@ jobs:
- 'espressif_kaluga_1'
# ESP32-S3
- 'espressif_s3_devkitc'
-
steps:
- name: Setup Python
uses: actions/setup-python@v4
@@ -48,3 +47,51 @@ jobs:
- name: Build
run: docker run --rm -v $PWD:/project -w /project espressif/idf:latest python3 tools/build_esp32.py ${{ matrix.board }}
+
+ - name: Upload Artifacts for Hardware Testing
+ if: matrix.board == 'espressif_s3_devkitc' && github.repository_owner == 'hathach'
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ matrix.board }}
+ path: |
+ cmake-build/cmake-build-${{ matrix.board }}/*/*/bootloader/bootloader.bin
+ cmake-build/cmake-build-${{ matrix.board }}/*/*/*.bin
+ cmake-build/cmake-build-${{ matrix.board }}/*/*/partition_table/partition-table.bin
+ cmake-build/cmake-build-${{ matrix.board }}/*/*/config.env
+ cmake-build/cmake-build-${{ matrix.board }}/*/*/flash_args
+
+ # ---------------------------------------
+ # Hardware in the loop (HIL)
+ # Current self-hosted instance is running on an RPI4. For attached hardware checkout hil_pi4.json
+ # ---------------------------------------
+ hil-test:
+ # run only with hathach's commit due to limited resource on RPI4
+ if: github.repository_owner == 'hathach'
+ needs: build-esp
+ runs-on: [self-hosted, esp32s3, hardware-in-the-loop]
+ strategy:
+ fail-fast: false
+ matrix:
+ board:
+ - 'espressif_s3_devkitc'
+ steps:
+ - name: Clean workspace
+ run: |
+ echo "Cleaning up previous run"
+ rm -rf "${{ github.workspace }}"
+ mkdir -p "${{ github.workspace }}"
+
+ - name: Checkout test/hil
+ uses: actions/checkout@v3
+ with:
+ sparse-checkout: test/hil
+
+ - name: Download Artifacts
+ uses: actions/download-artifact@v3
+ with:
+ name: ${{ matrix.board }}
+ path: cmake-build/cmake-build-${{ matrix.board }}
+
+ - name: Test on actual hardware
+ run: |
+ python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json
diff --git a/.github/workflows/build_iar.yml b/.github/workflows/build_iar.yml
index 1eacf90c9..b4c3052ed 100644
--- a/.github/workflows/build_iar.yml
+++ b/.github/workflows/build_iar.yml
@@ -32,7 +32,7 @@ jobs:
# Alphabetical order
# Note: bundle multiple families into a matrix since there is only one self-hosted instance can
# run IAR build. Too many matrix can hurt due to setup/teardown overhead.
- - 'lpc43 stm32f0 stm32f1 stm32f4 stm32f7 stm32g0 stm32g4 stm32h7 stm32l4'
+ - 'lpc43 stm32f0 stm32f1 stm32f7 stm32g0 stm32g4 stm32l4'
steps:
- name: Clean workspace
run: |
diff --git a/.github/workflows/cmake_arm.yml b/.github/workflows/cmake_arm.yml
index f4b93cec7..535244c47 100644
--- a/.github/workflows/cmake_arm.yml
+++ b/.github/workflows/cmake_arm.yml
@@ -86,34 +86,28 @@ jobs:
# for rp2040, there is no harm if defined for other families
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
- # Upload binaries for hardware test with self-hosted
- - name: Prepare rp2040 Artifacts
- if: contains(matrix.family, 'rp2040') && github.repository_owner == 'hathach'
- working-directory: ${{github.workspace}}/cmake-build/cmake-build-raspberry_pi_pico
- run: |
- find device/ -name "*.elf" -exec mv {} ../../ \;
- # find host/ -name "*.elf" -exec mv {} ../../ \;
- # find dual/ -name "*.elf" -exec mv {} ../../ \;
-
- - name: Upload Artifacts for rp2040
+ - name: Upload Artifacts for Hardware Testing
if: contains(matrix.family,'rp2040') && github.repository_owner == 'hathach'
uses: actions/upload-artifact@v3
with:
- name: rp2040
+ name: raspberry_pi_pico
path: |
- *.elf
+ cmake-build/cmake-build-raspberry_pi_pico/*/*/*.elf
# ---------------------------------------
# Hardware in the loop (HIL)
- # Current self-hosted instance is running on an RPI4.
- # For attached hardware checkout hil_pi4.json
+ # Current self-hosted instance is running on an RPI4. For attached hardware checkout hil_pi4.json
# ---------------------------------------
- hw-rp2040-test:
+ hil-test:
# run only with hathach's commit due to limited resource on RPI4
if: github.repository_owner == 'hathach'
needs: build-arm
runs-on: [self-hosted, rp2040, hardware-in-the-loop]
-
+ strategy:
+ fail-fast: false
+ matrix:
+ board:
+ - 'raspberry_pi_pico'
steps:
- name: Clean workspace
run: |
@@ -126,11 +120,12 @@ jobs:
with:
sparse-checkout: test/hil
- - name: Download rp2040 Artifacts
+ - name: Download Artifacts
uses: actions/download-artifact@v3
with:
- name: rp2040
+ name: ${{ matrix.board }}
+ path: cmake-build/cmake-build-${{ matrix.board }}
- - name: Test on actual hardware (hardware in the loop)
+ - name: Test on actual hardware
run: |
- python3 test/hil/hil_test.py hil_pi4.json
+ python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json