Skip to content

Commit cb5a555

Browse files
committed
add hil-hfp to compile and test with IAR
tweak IAR ci
1 parent b897b7b commit cb5a555

File tree

4 files changed

+40
-21
lines changed

4 files changed

+40
-21
lines changed

.circleci/config.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
#"cmake esp-idf"
3030
)
3131
32-
RESOURCE_LARGE='["nrf", "imxrt"]'
32+
RESOURCE_LARGE='["nrf", "imxrt", "stm32f4", "stm32h7"]'
3333
3434
for e in "${BUILDSYSTEM_TOOLCHAIN[@]}"; do
3535
e_arr=($e)
@@ -53,12 +53,7 @@ jobs:
5353
echo " build-system: ['$build_system']" >> .circleci/config2.yml
5454
echo " toolchain: ['$toolchain']" >> .circleci/config2.yml
5555
echo " family: $FAMILY" >> .circleci/config2.yml
56-
# due to limit of IAR capacity, use medium resource
57-
#if [[ $toolchain == arm-iar ]]; then
58-
# echo " resource_class: ['large']" >> .circleci/config2.yml
59-
#else
6056
echo " resource_class: ['medium+']" >> .circleci/config2.yml
61-
#fi
6257
6358
# add large resources
6459
if [ "$(echo $FAMILY_LARGE | jq 'length')" -gt 0 ]; then

.github/workflows/build.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
# Build IAR on HFP self-hosted
114114
# ---------------------------------------
115115
arm-iar:
116-
if: github.repository_owner == 'hathach'
116+
if: github.repository_owner == 'hathach' && github.event_name == 'push'
117117
needs: set-matrix
118118
runs-on: [self-hosted, Linux, X64, hifiphile]
119119
env:
@@ -137,8 +137,3 @@ jobs:
137137

138138
- name: Build
139139
run: python3 tools/build.py --one-per-family --toolchain iar $BUILD_ARGS
140-
141-
- name: Test on actual hardware (hardware in the loop)
142-
if: github.event_name == 'pull_request'
143-
run: |
144-
python3 test/hil/hil_test.py hfp.json

.github/workflows/ci_set_matrix.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,6 @@ def set_matrix_json():
5555
for toolchain in toolchain_list:
5656
filtered_families = [family for family, supported_toolchain in family_list.items() if
5757
toolchain in supported_toolchain]
58-
59-
# always add board in hfp.json for arm-iar
60-
if toolchain == 'arm-iar':
61-
with open('test/hil/hfp.json') as f:
62-
hfp_data = json.load(f)
63-
hfp_boards = [f"-b{board['name']}" for board in hfp_data['boards']]
64-
filtered_families = filtered_families + hfp_boards
65-
6658
matrix[toolchain] = filtered_families
6759

6860
print(json.dumps(matrix))

.github/workflows/hil_test.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858

5959
# ---------------------------------------
6060
# Hardware in the loop (HIL)
61-
# self-hosted running on an VM. For attached hardware checkout HIL_JSON
61+
# self-hosted on local VM, for attached hardware checkout HIL_JSON
6262
# ---------------------------------------
6363
hil-tinyusb:
6464
if: github.repository_owner == 'hathach'
@@ -86,3 +86,40 @@ jobs:
8686
run: |
8787
ls cmake-build/
8888
python3 test/hil/hil_test.py ${{ env.HIL_JSON }}
89+
90+
# ---------------------------------------
91+
# Hardware in the loop (HIL)
92+
# self-hosted by HFP, build with IAR toolchain, for attached hardware checkout test/hil/hfp.json
93+
# ---------------------------------------
94+
hil-hfp:
95+
if: github.repository_owner == 'hathach'
96+
runs-on: [self-hosted, Linux, X64, hifiphile]
97+
env:
98+
# IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
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: Toolchain version
107+
run: iccarm --version
108+
109+
- name: Checkout TinyUSB
110+
uses: actions/checkout@v4
111+
112+
- name: Get build boards
113+
run: |
114+
MATRIX_JSON=$(python test/hil/hil_ci_set_matrix.py test/hil/hfp.json)
115+
BUILD_ARGS=$(echo $MATRIX_JSON | jq -r '.["arm-gcc"] | join(" ")')
116+
echo "BUILD_ARGS=$BUILD_ARGS" >> $GITHUB_ENV
117+
118+
- name: Get Dependencies
119+
run: python3 tools/get_deps.py $BUILD_ARGS
120+
121+
- name: Build
122+
run: python3 tools/build.py --toolchain iar $BUILD_ARGS
123+
124+
- name: Test on actual hardware (hardware in the loop)
125+
run: python3 test/hil/hil_test.py hfp.json

0 commit comments

Comments
 (0)