The cleanest solution, presuming you have both AMD64 and ARM64 systems, is to build the snap on both systems producing two separate snap files, one containing AMD64 binaries, the other containing ARM64 binaries. The store will automatically deliver the correct file to the client as appropriate. Both architectures will have the same name in the store.
To make your snapcraft.yaml
work with this, you likely want something similar to:
parts:
google-cloud-cli:
plugin: dump
source:
- on amd64: amd64-source
- on arm64: arm64-source
Whilst it’s not impossible to have snaps that work across architectures with one single build, it’s primarily intended for content-snaps that would have no architecture-specific quirks (e.g, dictionary files, themes, etc).