try to run arm-iar with circleci with new token (#2890)

* try to run arm-iar with circleci with new token
* limit iar ci parallel build to 4 for medium+ and 6 for large
* add hil-hfp to compile and test with IAR
This commit is contained in:
Ha Thach
2024-12-05 18:01:16 +07:00
committed by GitHub
parent eabf68bd91
commit 310b8657f0
6 changed files with 93 additions and 41 deletions

View File

@@ -113,13 +113,12 @@ jobs:
# Build IAR on HFP self-hosted
# ---------------------------------------
arm-iar:
if: github.repository_owner == 'hathach'
if: github.repository_owner == 'hathach' && github.event_name == 'push'
needs: set-matrix
runs-on: [self-hosted, Linux, X64, hifiphile]
env:
BUILD_ARGS: ${{ join(fromJSON(needs.set-matrix.outputs.json)['arm-iar'], ' ') }}
IAR_LMS_CLOUD_URL: https://license.cloud.iar.com
IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
# IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
steps:
- name: Clean workspace
run: |
@@ -138,8 +137,3 @@ jobs:
- name: Build
run: python3 tools/build.py --one-per-family --toolchain iar $BUILD_ARGS
- name: Test on actual hardware (hardware in the loop)
if: github.event_name == 'pull_request'
run: |
python3 test/hil/hil_test.py hfp.json

View File

@@ -55,14 +55,6 @@ def set_matrix_json():
for toolchain in toolchain_list:
filtered_families = [family for family, supported_toolchain in family_list.items() if
toolchain in supported_toolchain]
# always add board in hfp.json for arm-iar
if toolchain == 'arm-iar':
with open('test/hil/hfp.json') as f:
hfp_data = json.load(f)
hfp_boards = [f"-b{board['name']}" for board in hfp_data['boards']]
filtered_families = filtered_families + hfp_boards
matrix[toolchain] = filtered_families
print(json.dumps(matrix))

View File

@@ -58,7 +58,7 @@ jobs:
# ---------------------------------------
# Hardware in the loop (HIL)
# self-hosted running on an VM. For attached hardware checkout HIL_JSON
# self-hosted on local VM, for attached hardware checkout HIL_JSON
# ---------------------------------------
hil-tinyusb:
if: github.repository_owner == 'hathach'
@@ -86,3 +86,41 @@ jobs:
run: |
ls cmake-build/
python3 test/hil/hil_test.py ${{ env.HIL_JSON }}
# ---------------------------------------
# Hardware in the loop (HIL)
# self-hosted by HFP, build with IAR toolchain, for attached hardware checkout test/hil/hfp.json
# ---------------------------------------
hil-hfp:
if: github.repository_owner == 'hathach'
runs-on: [self-hosted, Linux, X64, hifiphile]
#env:
# IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
steps:
- name: Clean workspace
run: |
echo "Cleaning up previous run"
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
- name: Toolchain version
run: iccarm --version
- name: Checkout TinyUSB
uses: actions/checkout@v4
- name: Get build boards
run: |
MATRIX_JSON=$(python test/hil/hil_ci_set_matrix.py test/hil/hfp.json)
BUILD_ARGS=$(echo $MATRIX_JSON | jq -r '.["arm-gcc"] | join(" ")')
echo "BUILD_ARGS=$BUILD_ARGS"
echo "BUILD_ARGS=$BUILD_ARGS" >> $GITHUB_ENV
- name: Get Dependencies
run: python3 tools/get_deps.py $BUILD_ARGS
- name: Build
run: python3 tools/build.py --toolchain iar $BUILD_ARGS
- name: Test on actual hardware (hardware in the loop)
run: python3 test/hil/hil_test.py hfp.json