add hil_ci_set_matrix.py, starting to support hil with additional build flags
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -65,7 +65,7 @@ jobs:
|
||||
with:
|
||||
build-system: 'cmake'
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
|
||||
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain]) }}
|
||||
one-per-family: ${{ github.event_name == 'push' }}
|
||||
|
||||
# ---------------------------------------
|
||||
@@ -89,7 +89,7 @@ jobs:
|
||||
with:
|
||||
build-system: 'make'
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
|
||||
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain]) }}
|
||||
one-per-family: true
|
||||
|
||||
# ---------------------------------------
|
||||
@@ -117,7 +117,7 @@ jobs:
|
||||
needs: set-matrix
|
||||
runs-on: [self-hosted, Linux, X64, hifiphile]
|
||||
env:
|
||||
BUILD_ARGS: ${{ join(fromJSON(needs.set-matrix.outputs.json)['arm-iar'].family, ' ') }}
|
||||
BUILD_ARGS: ${{ join(fromJSON(needs.set-matrix.outputs.json)['arm-iar'], ' ') }}
|
||||
steps:
|
||||
- name: Clean workspace
|
||||
run: |
|
||||
|
2
.github/workflows/ci_set_matrix.py
vendored
2
.github/workflows/ci_set_matrix.py
vendored
@@ -62,7 +62,7 @@ def set_matrix_json():
|
||||
hfp_boards = [f"-b{board['name']}" for board in hfp_data['boards']]
|
||||
filtered_families = filtered_families + hfp_boards
|
||||
|
||||
matrix[toolchain] = {"family": filtered_families}
|
||||
matrix[toolchain] = filtered_families
|
||||
|
||||
print(json.dumps(matrix))
|
||||
|
||||
|
7
.github/workflows/hil_test.yml
vendored
7
.github/workflows/hil_test.yml
vendored
@@ -32,10 +32,7 @@ jobs:
|
||||
- name: Generate matrix json
|
||||
id: set-matrix-json
|
||||
run: |
|
||||
MATRIX_ARMGCC=$(jq -c '{ "arm-gcc": { "family": [.boards[] | select(.flasher != "esptool" and .flasher != "openocd_wch") | "-b \(.name)"] } }' "${{ env.HIL_JSON }}")
|
||||
MATRIX_ESP=$(jq -c '{ "esp-idf": { "family": [.boards[] | select(.flasher == "esptool") | "-b \(.name)"] } }' "${{ env.HIL_JSON }}")
|
||||
MATRIX_RISCV=$(jq -c '{ "riscv-gcc": { "family": [.boards[] | select(.flasher == "openocd_wch") | "-b \(.name)"] } }' "${{ env.HIL_JSON }}")
|
||||
MATRIX_JSON=$(jq -nc --argjson arm "$MATRIX_ARMGCC" --argjson esp "$MATRIX_ESP" --argjson riscv "$MATRIX_RISCV" '$arm + $esp + $riscv')
|
||||
MATRIX_JSON=$(python test/hil/hil_ci_set_matrix.py)
|
||||
echo "matrix=$MATRIX_JSON"
|
||||
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
|
||||
|
||||
@@ -55,7 +52,7 @@ jobs:
|
||||
with:
|
||||
build-system: 'cmake'
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
|
||||
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain]) }}
|
||||
one-per-family: true
|
||||
upload-artifacts: true
|
||||
|
||||
|
Reference in New Issue
Block a user