Skip to content

docs: mention multi-architecture and remote builds in CI how-to - #2707

Open
dwilding wants to merge 1 commit into
canonical:mainfrom
dwilding:ci-build-guidance
Open

docs: mention multi-architecture and remote builds in CI how-to#2707
dwilding wants to merge 1 commit into
canonical:mainfrom
dwilding:ci-build-guidance

Conversation

@dwilding

@dwilding dwilding commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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


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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@benhoyt benhoyt changed the title docs: mention muti-architecture and remote builds in CI how-to docs: mention multi-architecture and remote builds in CI how-to Aug 26, 2026

@james-garner-canonical james-garner-canonical left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

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.

2 participants