summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml24
-rw-r--r--.github/workflows/build_util.yml16
2 files changed, 28 insertions, 12 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2ee124cb3..39a4e7afd 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -68,9 +68,14 @@ jobs:
with:
fetch-depth: 0
+ # The `ci-full` PR label turns the scoping off for one PR: no selection file is
+ # written, so both matrices and every rig job fall back to the unscoped behaviour.
+ # An escape hatch is the point - a selector bug under-selects SILENTLY, and without
+ # a label the only routes back to a full matrix are accidental (touch an
+ # unclassified path, or break the selector badly enough that it falls open).
- name: CI selection (PR only)
id: hil-select
- if: github.event_name == 'pull_request'
+ if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci-full')
env:
BASE_REF: ${{ github.base_ref }}
run: |
@@ -166,8 +171,6 @@ jobs:
fi
fi
[ -z "$MATRIX_JSON" ] && MATRIX_JSON=$(python .github/scripts/ci_set_matrix.py)
- echo "matrix=$MATRIX_JSON"
- echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
# Build-axis extras: the per-family example map rides as a side channel
# (a value inside matrix entries would break CircleCI's family parameter
@@ -188,12 +191,23 @@ jobs:
# silently match another family's baseline
case "$FAM_REGEX" in
*[!-A-Za-z0-9_\|]*)
- echo "::warning::unexpected characters in the family list - unscoped metrics"
+ echo "::warning::unexpected characters in the family list - dropping the scoping"
FAM_REGEX='' ;;
esac
- [ -z "$FAM_REGEX" ] && BUILD_FILTERED='false'
+ if [ -z "$FAM_REGEX" ]; then
+ # all three drop together, as CircleCI's fall-open does. Resetting only
+ # build_filtered leaves the build scoped while code-metrics takes the
+ # UNSCOPED branch, diffing a 1-family run against the full averaged
+ # baseline and publishing that as the PR's code-size impact.
+ BUILD_FILTERED='false'
+ EXAMPLE_MAP='{}'
+ MATRIX_JSON=$(python .github/scripts/ci_set_matrix.py)
+ fi
fi
fi
+ # emitted once, after every path that can still change it
+ echo "matrix=$MATRIX_JSON"
+ echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
echo "example_map=$EXAMPLE_MAP" >> $GITHUB_OUTPUT
echo "build_filtered=$BUILD_FILTERED" >> $GITHUB_OUTPUT
echo "build_families_regex=$FAM_REGEX" >> $GITHUB_OUTPUT
diff --git a/.github/workflows/build_util.yml b/.github/workflows/build_util.yml
index dfbd83ee2..52999616d 100644
--- a/.github/workflows/build_util.yml
+++ b/.github/workflows/build_util.yml
@@ -126,14 +126,16 @@ jobs:
MEMBROWSE_API_KEY: ${{ secrets.MEMBROWSE_API_KEY }}
run: |
# if code-changed is false --> there is no elf -> membrowse target upload with --identical flag
- # Deliberately NOT scoped by $EX_ARGS: <TARGET>-membrowse-upload has no
- # DEPENDS (hw/bsp/family_support.cmake), so the aggregate rebuilds nothing -
- # it just records every example, reporting the ones with an elf and
- # --identical for the rest. Filtering it here would drop the excluded
- # examples from the dataset membrowse-comment.yml reports against, instead
- # of recording them as unchanged.
+ # $EX_ARGS is passed for the BOARD it picks, not to scope the targets:
+ # --one-first now chooses a board that can build the -e set (tools/build.py),
+ # so omitting it here would configure a DIFFERENT, empty build dir and upload
+ # --identical for a board that was never compiled. The target list is not
+ # scoped by it - `examples-membrowse-upload` is not `all`, so it passes
+ # through as the aggregate, which has no DEPENDS (hw/bsp/family_support.cmake):
+ # it rebuilds nothing and still records every example, --identical for the
+ # ones without an elf.
BUILD_PY_ARGS="-s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }}"
- python tools/build.py $BUILD_PY_ARGS --target examples-membrowse-upload -j 1 ${{ matrix.arg }}
+ python tools/build.py $BUILD_PY_ARGS --target examples-membrowse-upload -j 1 ${{ matrix.arg }} $EX_ARGS
shell: bash
- name: Upload Artifacts for Metrics