summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-10-04 15:01:03 +0700
committerhathach <[email protected]>2024-10-04 15:01:03 +0700
commit1b295de9adbe8eb42f1590ce6b478af5c23e5f8b (patch)
treefc38ac78ad84c90d841332febb8640247c3096f8 /.github/workflows
parenteda3cceab207bce390b995462e313ed124fa7732 (diff)
add hil_ci_set_matrix.py, starting to support hil with additional build flags
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml6
-rw-r--r--.github/workflows/ci_set_matrix.py2
-rw-r--r--.github/workflows/hil_test.yml7
3 files changed, 6 insertions, 9 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 70bb3113f..8d5bcbc67 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -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: |
diff --git a/.github/workflows/ci_set_matrix.py b/.github/workflows/ci_set_matrix.py
index 8974037e4..7cc749d48 100644
--- a/.github/workflows/ci_set_matrix.py
+++ b/.github/workflows/ci_set_matrix.py
@@ -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))
diff --git a/.github/workflows/hil_test.yml b/.github/workflows/hil_test.yml
index 6ece44922..7c94fdf6a 100644
--- a/.github/workflows/hil_test.yml
+++ b/.github/workflows/hil_test.yml
@@ -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