ci: clone ColdCard repo only once#820
Conversation
.github/actions/build-sim/action.yml
Outdated
| # Remove .git directories to shrink the archive | ||
| find test/work/firmware -name ".git" -type d -exec rm -rf {} + 2>/dev/null || true | ||
| # Archive the full firmware directory | ||
| tar -czf "${{ inputs.archive }}.tar.gz" test/work/firmware |
There was a problem hiding this comment.
Shouldn't this be updating paths in .github/sim-build-map.json?
Looking at that, it seems like all of the other devices are including the full repos, not sure why coldcard was different in that regard.
There was a problem hiding this comment.
I guess it was trying to keep the archive small.
I replaced the special handling for ColdCard with just updating this map.
.github/actions/build-sim/action.yml
Outdated
| # This avoids re-cloning the large repo with many submodules in every test job | ||
| if [ "${{ inputs.name }}" = "coldcard" ]; then | ||
| # Remove .git directories to shrink the archive | ||
| find test/work/firmware -name ".git" -type d -exec rm -rf {} + 2>/dev/null || true |
There was a problem hiding this comment.
Maybe this step should be done for all repos?
a42c71c to
bd6bb91
Compare
|
Rebased, applied .git stripping to all devices and updated the the sim build map. That's a lot simpler. |
| ], | ||
| "coldcard": [ | ||
| { "name": "coldcard", "archive": "coldcard-mpy", "paths": "test/work/firmware/external/micropython/ports/unix/coldcard-mpy test/work/firmware/unix/coldcard-mpy test/work/firmware/unix/l-mpy test/work/firmware/unix/l-port" } | ||
| { "name": "coldcard", "archive": "coldcard-firmware", "paths": "test/work/firmware" } |
There was a problem hiding this comment.
We could expand this JSON to include paths that can be pruned before archiving, if storage costs are an issue. But that's tedious to maintain.
Avoids spurious CI failures by not re-cloning the large repo with many submodules in every test job. Additionally, stip .git folder(s) for all devices to shrink archives.
bd6bb91 to
bc7f751
Compare
|
Had to make an exception for Speculos, because setuptools_scm uses .git for version detection. |
|
ACK bc7f751 |
Based on #818.