docs: mention multi-architecture and remote builds in CI how-to - #2707
docs: mention multi-architecture and remote builds in CI how-to#2707dwilding wants to merge 1 commit into
Conversation
|
|
||
| This guide demonstrates how to automatically run your charm's tests against any PR into the main branch of your GitHub repository. | ||
|
|
||
| The sample integration testing job includes a packing step, but this guide doesn't demonstrate how to pack your charm for multiple architectures. If you need to pack for multiple architectures, consider {external+charmcraft:ref}`building the charm remotely <how-to-build-remotely>` on Canonical's infrastructure. |
There was a problem hiding this comment.
The link points to Build a charm remotely in the Charmcraft docs. That how-to-guide doesn't talk about how you'd use charmcraft remote-build in CI - at minimum you'd need a login token, I think? I'm not aware of any doc that covers this aspect.
For now, an extra addition here could be a link to a real charm's CI that shows the pattern in a straightforward way.
There was a problem hiding this comment.
I can't find a charm with CI that clearly demonstrates this. So I'll leave my changes as-is, unless anyone else has a better idea.
james-garner-canonical
left a comment
There was a problem hiding this comment.
Pointing people to remote-build seems reasonable to me, though you're definitely right about the CI gap -- the Charmcraft doc is very much for interactive use (press y to confirm, you'll be prompted to log in, etc).
However, the story does seem to be a bit more complicated than "just use remote-build", reading https://canonical.com/juju/docs/charmcraft/4/howto/select-platforms/
Additionally, charmcraft pack can be explicitly instructed to build for one specific platform only. So an alternative might be a matrix job with a dynamic runs-on, calling charmcraft pack --platform ... and then running the tests.
Our how-to guide about CI is focused on how to run tests and only mentions packing in passing. But charmers may have a need to pack for multiple architectures for their tests. This PR adds a paragraph that links to Charmcraft's guide about remote builds.
Preview doc