Skip to content

Fix ESP-IDF CI build#1218

Open
gmartin82 wants to merge 1 commit intoeclipse-zenoh:mainfrom
gmartin82:fix-espidf-ci
Open

Fix ESP-IDF CI build#1218
gmartin82 wants to merge 1 commit intoeclipse-zenoh:mainfrom
gmartin82:fix-espidf-ci

Conversation

@gmartin82
Copy link
Copy Markdown
Contributor

@gmartin82 gmartin82 commented May 7, 2026

Description

Fix PlatformIO source filtering so platform-specific backend files are selected consistently with the CMake platform profiles.

PlatformIO was auto-discovering sources outside src/system/**, including platform-specific transport backends under src/link/transport/**. This meant builds could include sources for the wrong platform, for example ESP-IDF builds attempting to compile Arduino ESP32 C++ transport files.

What does this PR do?

This PR updates extra_script.py to:

  • exclude platform-specific system and transport backend directories from PlatformIO’s default source discovery;
  • read the selected CMake platform profile from cmake/platforms/<platform>.cmake;
  • derive PlatformIO source-filter add-backs from the ZP_PLATFORM_SOURCE_FILES listed by that CMake profile;
  • keep the CMake platform files as the source of truth for platform-specific source composition.

Why is this change needed?

The previous PlatformIO filter treated src/system/** as the platform-specific boundary, but the platform-composition rework also has platform-specific files under src/link/transport/**, such as Arduino ESP32 Bluetooth and serial sources.

Because PlatformIO starts from +<*>, those files could be picked up even when the active platform profile did not select them. This caused incorrect cross-platform compilation, for example ESP-IDF builds trying to compile Arduino-specific C++ files.

Deriving the PlatformIO filter from the CMake platform profile avoids duplicating the source list in extra_script.py and keeps PlatformIO aligned with the existing CMake platform selection.

Related Issues

Related to PlatformIO build failures where ESP-IDF attempted to compile Arduino ESP32 transport sources.


🏷️ Label-Based Checklist

Based on the labels applied to this PR, please complete these additional requirements:

Labels: internal

🏠 Internal Change

This PR is marked as internal (not user-facing):

  • No API changes - Public APIs unchanged
  • No behavior changes - External behavior identical
  • Refactoring/maintenance - Code improvements only
  • Tests still pass - All existing tests pass without modification

Lighter review: Internal changes may have lighter review requirements.

Instructions:

  1. Check off items as you complete them (change - [ ] to - [x])
  2. The PR checklist CI will verify these are completed

This checklist updates automatically when labels change, but preserves your checked boxes.

@gmartin82 gmartin82 added the internal Changes not included in the changelog label May 7, 2026
@gmartin82 gmartin82 force-pushed the fix-espidf-ci branch 3 times, most recently from 40f117b to b7e8d55 Compare May 7, 2026 13:10
@gmartin82 gmartin82 force-pushed the fix-espidf-ci branch 2 times, most recently from a15460c to b665696 Compare May 7, 2026 14:04
@gmartin82 gmartin82 marked this pull request as ready for review May 7, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Changes not included in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant