diff --git a/.github/workflows/ifx_package_core.yml b/.github/workflows/ifx_package_core.yml index 2f1b64814..db7ac5fe5 100644 --- a/.github/workflows/ifx_package_core.yml +++ b/.github/workflows/ifx_package_core.yml @@ -91,10 +91,13 @@ jobs: # Set up basic environment for later steps CORE_VER=$(extra/get_core_version.sh) ALL_BOARD_DATA=$(extra/get_board_details.sh | jq -c 'sort_by(.variant)') - if [[ "${{ github.event_name }}" == "push" ]]; then - # limit direct pushes to this board family's own boards; PRs still - # validate the full board matrix before merge - ALL_BOARD_DATA=$(jq -c 'map(select(.feature_board == true))' <<< "${ALL_BOARD_DATA}") + # limit builds/tests to this board family's own boards, for both + # direct pushes and PRs. Only apply the filter if it leaves at + # least one board, so branches with no feature_board opted in yet + # keep building the full board set. + FEATURE_BOARD_DATA=$(jq -c 'map(select(.feature_board == true))' <<< "${ALL_BOARD_DATA}") + if [[ "$(jq 'length' <<< "${FEATURE_BOARD_DATA}")" -gt 0 ]]; then + ALL_BOARD_DATA="${FEATURE_BOARD_DATA}" fi echo "CORE_HASH=$(git describe --always $HEAD_REF)" >> "$GITHUB_ENV" echo "ALL_BOARD_DATA=${ALL_BOARD_DATA}" >> "$GITHUB_ENV"