Swatantra-66 opened a new pull request, #20787:
URL: https://github.com/apache/nuttx/pull/20787
## Summary
Implements Phase 2 of #20483 ("Improve and optimize NuttX CI").
### Background & Problem
- Previously, ARM testlists (`arm-01` through `arm-14`) partitioned 1,230
defconfigs alphanumerically, resulting in significant compile duration
imbalance (e.g. `arm-04` and `arm-10` built only ~41 defconfigs while `arm-13`
built 199), causing faster runners to sit idle waiting for the slowest
container.
- Any PR touching an ARM chip triggered all 14 containers regardless of
whether changes were isolated to a specific vendor/chip family.
### Key Changes
1. **Balanced Family Testlists (`tools/ci/testlist/`)**:
- Replaced `arm-01..14` with **13 balanced vendor/family-based
testlists** (~60 to 120 defconfigs each):
- `arm-imxrt.dat`: i.MX RT and i.MX6/9/8 (76 defconfigs)
- `arm-nrf.dat`: nRF52, nRF53, nRF54L, nRF91 (89 defconfigs)
- `arm-nxp.dat`: LPC, Kinetis, S32K, LC823450 (114 defconfigs)
- `arm-rp2040.dat`: RP2040 and RP2350 (130 defconfigs)
- `arm-sam.dat`: SAM34, SAMA5, SAMD/E/V (88 defconfigs)
- `arm-ti-cxd56.dat`: Tiva, RM57, TMS570, CXD56xx (73 defconfigs)
- `arm-stm32f4-1.dat` & `arm-stm32f4-2.dat`: STM32F4 (split 50/50: 65 &
77 defconfigs)
- `arm-stm32f0-f3.dat`: STM32F0, F1, F2, F3 (109 defconfigs)
- `arm-stm32h7.dat`: STM32H7 (97 defconfigs)
- `arm-stm32l-u-g.dat`: STM32L, U, G, WB, WL (80 defconfigs)
- `arm-stm32-other.dat`: STM32F7, H5, C0, C5, N6 (53 defconfigs)
- `arm-other.dat`: Niche/generic ARM chips (GD32, AT32, MPS, Max326,
RTL872x, etc.)
- Preserves 100% parity across all 1,230 defconfigs, 209 CMake builds,
and 14 blacklist entries (0 missing).
2. **Chip-Isolated Build Filtering (`.github/workflows/arch.yml`)**:
- In `get-arch`, if a PR touches only a single ARM family (under
`arch/arm/src/<chip>/` and/or `boards/arm/<chip>/`), CI sets `arm_family` to
compile only that family's container (e.g. PR on i.MX RT only runs `arm-imxrt`).
- Safely falls back to full ARM regression (all 13 containers) if:
- Common/core files (`arch/arm/src/common`, `arch/arm/src/stm32/`,
`sched/`, `drivers/`, etc.) are touched
- Multiple chip families are modified
- A diff exceeds 100 files, GitHub CLI is unavailable, or changed-file
list is incomplete / count is unknown
3. **Workflow Integration (`.github/workflows/build.yml`)**:
- Updated `Linux-Arch` input array to match the 13 family targets.
- Updated reusable workflow calls to local `./.github/workflows/arch.yml`.
Fixes #20483.
## Impact
- **Is new feature added?**: Yes (CI optimization)
- **Impact on user**: None.
- **Impact on build**: Significantly reduces CI runner time for
chip-isolated PRs (saving 11–12 containers per PR) and balances runner workload
across jobs.
- **Impact on hardware**: None.
- **Impact on documentation**: None.
- **Impact on security**: None.
- **Impact on compatibility**: 100% backward compatible. Full regression
suite is retained.
## Testing
I confirm that changes are verified on local setup:
- **Build Host**: Windows 11 / Linux, Python 3.10+
- **Target(s)**: CI Workflows (`.github/workflows/`) and Testlists
(`tools/ci/testlist/`)
### Verification Details:
1. Validated YAML syntax with `yaml.safe_load` across both modified workflow
files (`arch.yml`, `build.yml`).
2. Verified Python family resolution with test cases:
- Single family (`arch/arm/src/imxrt/...` -> `arm-imxrt`)
- Multi-family / common files (`arch/arm/src/common/...` -> all 13
containers)
- Diff truncation / count unknown / large PR edge cases -> safe fallback
to all 13 containers
3. Audited defconfig resolution across all 1,230 ARM defconfigs:
- 0 missing defconfigs compared to master
- All 209 CMake configurations preserved
- All 14 blacklist entries preserved
4. Confirmed zero CRLF line endings (pure Unix LF) across all modified and
new files.
5. GitHub Actions CI will automatically validate execution upon PR creation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]