Skip to content

feat(s3): Split libs for each SoC and add S3 support#12219

Merged
me-no-dev merged 1 commit intomasterfrom
feat/aws_s3
Jan 14, 2026
Merged

feat(s3): Split libs for each SoC and add S3 support#12219
me-no-dev merged 1 commit intomasterfrom
feat/aws_s3

Conversation

@lucasssvaz
Copy link
Member

@lucasssvaz lucasssvaz commented Jan 9, 2026

Description of Change

This pull request significantly refactors and improves the GitHub Actions release scripts for the ESP32 Arduino core. The main focus is on modularizing shared logic, supporting per-SoC (System on Chip) library packaging and publishing, and enhancing the maintainability and flexibility of the release process. The changes introduce a new shared library for GitHub release functions, update the release workflow to generate and upload per-SoC library ZIPs, and streamline the JSON package generation and upload steps.

Key changes:

Modularization and Shared Logic

  • Introduced a new shared script, lib-github-release.sh, containing reusable functions for file size calculation, asset uploading, and GitHub Pages publishing. This reduces code duplication and centralizes maintenance of common release logic. (.github/scripts/lib-github-release.sh, .github/scripts/on-release.sh) [1] [2] [3] [4]

Per-SoC Library Packaging and Publishing

  • Added support for building and uploading per-SoC library ZIPs for all supported SoC variants, using the new CORE_VARIANTS array defined in socs_config.sh. Each SoC variant gets its own ZIP archive, which is uploaded either to S3 (if configured) or GitHub Releases. The package JSON template is updated to reference these per-SoC tools, improving granularity and future extensibility. (.github/scripts/on-release.sh, .github/scripts/socs_config.sh) [1] [2] [3]

Improvements to Release and Package Generation

  • Changed the package naming convention from esp32-$RELEASE_TAG to esp32-core-$RELEASE_TAG for clarity and consistency. (.github/scripts/on-release.sh)
  • Enhanced the script logic for updating and generating package JSONs, including a new replace_literal_skip_n function for portable and flexible string replacement, and improved handling of download URLs for mirrors. (.github/scripts/on-release.sh) [1] [2]

Platform File and Miscellaneous Fixes

  • Updated platform.txt generation to use new variable references and improve compatibility with per-variant library paths. (.github/scripts/on-release.sh)
  • Fixed script path handling in find_all_boards.sh for better portability. (.github/scripts/find_all_boards.sh)

Workflow and Testing Adjustments

  • Removed in-script arduino-cli installation and package testing, delegating these steps to the GitHub Actions workflow for better separation of concerns and reliability. The script now focuses solely on building and uploading artifacts. (.github/scripts/on-release.sh)

These changes collectively modernize the release process, make it easier to add new SoC variants, and improve maintainability for future development.

Test Scenarios

CI tested in my fork and libs tested locally

https://github.com/lucasssvaz/arduino-esp32/actions/runs/20955954431

Generated JSON:

https://raw.githubusercontent.com/lucasssvaz/arduino-esp32/gh-pages/package_esp32_dev_index.json

@lucasssvaz lucasssvaz changed the title Feat/aws s3 feat(s3): Split libs for each SoC and move to S3 Jan 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello lucasssvaz, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 4044b54

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Test Results

 90 files   90 suites   34m 53s ⏱️
 67 tests  62 ✅ 0 💤 5 ❌
751 runs  745 ✅ 0 💤 6 ❌

For more details on these failures, see this check.

Results for commit 849d6ec.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32💚 -1600.000.00000.000.00
ESP32C3000.000.00000.000.00
ESP32C5000.000.00000.000.00
ESP32C6000.000.00000.000.00
ESP32H2000.000.00000.000.00
ESP32P4000.000.00000.000.00
ESP32S2000.000.00000.000.00
ESP32S3000.000.00000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32ESP32C3ESP32C5ESP32C6ESP32H2ESP32P4ESP32S2ESP32S3
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/BLE/examples/Server💚 -16000----0000----
libraries/ESP32/examples/Camera/CameraWebServer💚 -160----------00--
ESP32/examples/Camera/CameraWebServer (2)💚 -160----------00--
libraries/Insights/examples/MinimalDiagnostics💚 -16000--------00--
libraries/NetworkClientSecure/examples/WiFiClientSecure0000------0000--
ESP32/examples/Camera/CameraWebServer (3)----------------

@lucasssvaz lucasssvaz self-assigned this Jan 11, 2026
@lucasssvaz lucasssvaz added Type: CI & Testing Related to continuous integration, automated testing, or test infrastructure. Area: Tools & Build System Issue is related to tools and/or the build system labels Jan 11, 2026
@lucasssvaz lucasssvaz marked this pull request as ready for review January 12, 2026 00:00
@lucasssvaz lucasssvaz requested review from a team and me-no-dev as code owners January 12, 2026 00:00
@lucasssvaz lucasssvaz added the Status: Review needed Issue or PR is awaiting review label Jan 12, 2026
@lucasssvaz lucasssvaz force-pushed the feat/aws_s3 branch 7 times, most recently from 878d715 to 2ce14e9 Compare January 13, 2026 12:26
@lucasssvaz lucasssvaz changed the title feat(s3): Split libs for each SoC and move to S3 feat(s3): Split libs for each SoC and add S3 support Jan 13, 2026
@SuGlider SuGlider self-requested a review January 13, 2026 15:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the ESP32 Arduino core release pipeline to support per-SoC (System on Chip) library packaging, with a focus on modularization and improved maintainability. The changes introduce a shared library for GitHub release operations, split the release workflow into separate build/test/upload stages, and enable optional S3 storage for library artifacts.

Changes:

  • Extracted common GitHub release functions into a shared library (lib-github-release.sh)
  • Modified release workflow to build and upload per-SoC library ZIPs instead of a single monolithic library package
  • Split the workflow into separate jobs: build, test-package (cross-platform), upload-and-finalize, and upload-hosted-binaries

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
.github/workflows/release.yml Restructured workflow with separate build, test, and upload jobs; added S3 configuration and cross-platform testing
.github/scripts/on-release.sh Major refactoring to create per-SoC library ZIPs, update package JSONs, add S3 support, and remove inline testing
.github/scripts/lib-github-release.sh New shared library with reusable functions for file uploads to GitHub releases and Pages
.github/scripts/upload-release-assets.sh New script to handle package JSON upload and version commit logic separately from build
.github/scripts/test-package-json.sh New script for testing package installation across multiple operating systems
.github/scripts/socs_config.sh Added CORE_VARIANTS array to define SoCs for per-variant library packaging
.github/scripts/find_all_boards.sh Updated script path handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@me-no-dev
Copy link
Member

@P-R-O-C-H-Y PTAL

Copy link
Member

@P-R-O-C-H-Y P-R-O-C-H-Y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@P-R-O-C-H-Y P-R-O-C-H-Y added Status: Pending Merge Pull Request is ready to be merged and removed Status: Review needed Issue or PR is awaiting review labels Jan 14, 2026
@me-no-dev me-no-dev merged commit 66c45f0 into master Jan 14, 2026
26 checks passed
@me-no-dev me-no-dev deleted the feat/aws_s3 branch January 14, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Tools & Build System Issue is related to tools and/or the build system Status: Pending Merge Pull Request is ready to be merged Type: CI & Testing Related to continuous integration, automated testing, or test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants