architectures: add schema support
Metadata
Current evaluation
Merged after approval and passing CI. Added schema support for defining architectures in snapcraft.yaml as part one for core22. Coverage increased by 0.09%, and the build_to parameter was renamed to build_for during review.
Suggested action: —
No scores available.
Issue body
- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [X] Have you successfully run `make lint`?
- [X] Have you successfully run `pytest tests/unit`?
-----
Add support for defining architectures in snapcraft.yaml.
Part 1 of supporting architectures for core22. Full code change is proposed [here](https://github.com/snapcore/snapcraft/pull/3712).
(CRAFT-1163)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged after approval and passing CI. Added schema support for defining architectures in snapcraft.yaml as part one for core22. Coverage increased by 0.09%, and the build_to parameter was renamed to build_for during review. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into main, adding schema support for defining architectures in snapcraft.yaml as part of core22 implementation. The build_to parameter was renamed to build_for. The change passed all checks and improved test coverage. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds schema support for defining architectures in snapcraft.yaml as the first step for core22. The maintainer renamed the build_to field to build_for prior to integration. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1685 Implement support for architecture in snapcraft.yaml | snapcraft | closed | Implemented architecture support in snapcraft.yaml after initial redesign delays. The feature landed in the core tool, though integration with build.snapcraft.io and a Python 2-compatible parser require follow-up work. | |
| #2338 schema, meta: support layout | snapcraft | merged | Merged to add schema and meta support for the snapd layout property. Resolves LP #1754639 by exposing the feature in the snapcraft CLI and relying on snap pack --check-skeleton for validation. Approved and passed CI. | |
| #3821 meta: architectures | snapcraft | merged | Merged adding build-on and build-for architecture support for core22 snaps. Introduced the SNAPCRAFT_BUILD_FOR environment variable to limit builds. Temporarily drafted to fix a duplicate build regression before final merge. | |
| #5606 schema: add build-for in architectures for core22 | snapcraft | merged | Merged update adding the build-for field to the core22 architectures schema. The change aligns the schema with official documentation and passed all review and CI checks. | |
| #1681 Design/document support for architecture selection during builds | snapcraft | closed | Closed after scope expanded beyond initial grammar changes. Proposal discussions and final documentation were moved to the Snapcraft forum, formally documenting the architecture selection feature for build.snapcraft.io. |