Switch CI board manager URL to the CN package index#219
Merged
Conversation
The M5Stack board manager index at https://static-cdn.m5stack.com/resource/arduino/package_m5stack_index.json currently returns 404, which breaks the Arduino build CI for the m5stack:esp32 matrix entries. Switch to package_m5stack_index_cn.json, which is reachable (HTTP 200) and contains both platform versions used by the CI matrix (2.1.4 and 3.2.5). The package and tool download URLs it references (static-cdn.m5stack.com, m5stack.oss-cn-shenzhen.aliyuncs.com, dl.espressif.cn) were all verified reachable as well.
The CN index renames all tools with a "-cn" suffix but the toolsDependencies of older platforms (2.x and <= 3.2.1) still reference the pre-rename versions, so arduino-cli fails to install m5stack:esp32@2.1.4 with "tool version esp-2021r2-patch5-8.4.0 not found" (155 such stale entries in the index overall). Fetch the index in CI, rewrite those dependencies to their "-cn" equivalents, and use the patched file as a local (file://) index. Verified locally: dependency resolution succeeds and the toolchain download starts with the patched index.
lovyan03
pushed a commit
to ainyan03/M5Unified
that referenced
this pull request
Jul 7, 2026
The CN index renames all tools with a "-cn" suffix but the toolsDependencies of older platforms (2.x and <= 3.2.1) still reference the pre-rename versions, so arduino-cli fails to install m5stack:esp32@2.1.4 with "tool version esp-2021r2-patch5-8.4.0 not found" (155 such stale entries in the index overall). Fetch the index in CI, rewrite those dependencies to their "-cn" equivalents, and use the patched file as a local (file://) index. Verified locally: dependency resolution succeeds and the toolchain download starts with the patched index. Same fix as m5stack/M5GFX#219.
Instead of hardcoding the CN index, keep the primary index URL in the matrix and fall back to the "_cn" variant only when the primary is unreachable. When the upstream index recovers, CI automatically returns to it with no further changes. The patch script runs on whichever index was fetched and is a no-op when the index is consistent. Verified locally: with the primary currently 404, the loop falls back to the CN index and the patch step fixes its 155 stale entries.
lovyan03
pushed a commit
to ainyan03/M5Unified
that referenced
this pull request
Jul 7, 2026
Instead of hardcoding the CN index, keep the primary index URL in the matrix and fall back to the "_cn" variant only when the primary is unreachable. When the upstream index recovers, CI automatically returns to it with no further changes. The patch script runs on whichever index was fetched and is a no-op when the index is consistent. Verified locally: with the primary currently 404, the loop falls back to the CN index and the patch step fixes its 155 stale entries. Same fix as m5stack/M5GFX#219.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The M5Stack board manager index used by the Arduino build CI,
https://static-cdn.m5stack.com/resource/arduino/package_m5stack_index.json, currently returns 404, breaking allm5stack:esp32matrix entries.This PR makes the CI resilient to that outage without changing the matrix URLs:
_cnvariant (package_m5stack_index_cn.json, currently reachable). When the upstream index recovers, CI automatically returns to the primary with no further changes.-cnsuffix, but thetoolsDependenciesof older platforms (2.x and <= 3.2.1) still reference the pre-rename versions, som5stack:esp32@2.1.4fails withtool version esp-2021r2-patch5-8.4.0 not found(155 such stale entries overall). A small script rewrites those dependencies to their-cnequivalents; it is a no-op on a consistent index. The fetched index is used locally viafile://.Verification
2.1.4,3.2.5); all download hosts it references verified reachable.arduino-cli core install m5stack:esp32@2.1.4resolves dependencies and starts the toolchain download (verified locally); the unpatched CN index fails dependency resolution.3.2.5passed with the CN index,2.1.4failed exactly on the stale dependency.Note: since CI is currently broken on
develop, merging this first will let other open PRs (e.g. #218) run a meaningful Arduino build check.