Skip to content

Conversation

@Jonty
Copy link
Member

@Jonty Jonty commented Aug 14, 2025

This caches all of the main ESP dependencies as well as the cross-compiler, dropping build times by almost three minutes.

@Jonty Jonty force-pushed the cache-deps-in-build branch from 7aafd5c to 4174b2b Compare August 14, 2025 17:56
@Jonty Jonty changed the title First pass at dep caching Cache dependencies in Actions builds Aug 14, 2025
@Jonty Jonty requested a review from MatthewWilkes August 14, 2025 17:57
This caches all of the main ESP dependencies as well as the
cross-compiler, dropping build times by over two minutes.
@Jonty Jonty force-pushed the cache-deps-in-build branch from 3db0a0c to 89edeca Compare August 14, 2025 18:13
key: esp-idf-${{ env.ESP_IDF_VERSION }}
- name: Check out ESP IDF
if: steps.esp-idf-cache.outputs.cache-hit != 'true'
id: esp-idf

Choose a reason for hiding this comment

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

nit: It doesn't look like esp-idf (or install-sdk) IDs are used in other checks? I'm still quite new to GitHub Actions, but it seems like these don't need to be included, since there are quite a few other steps that also don't have ids? Would it make sense to only include ids that are used?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good spot, thanks for reviewing! They're the vestigial remains of an earlier in-progress version that needed them.

We're actually likely not to merge this now, as @thinkl33t got an automated build container sorted so I'll switch the firmware build over as it'll have the same impact as caching, and allow for easily locally reproducible builds.

@ChrisDick
Copy link
Contributor

Can we close this PR now that @thinkl33t has done the build container?

@Jonty Jonty closed this Dec 4, 2025
@hughrawlinson
Copy link
Contributor

@ChrisDick don't we need to use the build container in the build workflow?

@ChrisDick
Copy link
Contributor

I'm not familiar with the workflow, so I don't know. I'll reopen so we don't miss it.

@ChrisDick ChrisDick reopened this Dec 6, 2025
@hughrawlinson
Copy link
Contributor

I'm not familiar with this flow specifically, but looking at how the .github/workflows directory works, we have the build-container.yaml workflow which builds and publishes a build container, and build.yaml, which hasn't been updated since build-container.yaml was created, doesn't seem to refer to the image, and seems to run a firmware build directly on the actions runner rather than in the container. It might be that we now should use the build container in CI rather than merge this PR which optimizes the build on the actions runner - but either way I think there's still something to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants