← Back to issue list

Feature/meta: architectures

View original Github issue

Metadata

Project
snapcraft
Number
#3712
Type
pull request
State
closed
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Closed as outdated on 2022-07-05 after being split into sub-PRs; schema support merged in #3812 (629e4ce51) and the remaining core22 build-on/build-for work merged in #3821 (4876b53).

Resolution: closed superseded

Reason: Author mr-cal closed the PR stating it had been broken into sub-tasks, listing PRs #3812-#3821. The schema portion landed via #3812 and the main architecture implementation via merged PR #3821 (commit 4876b53), so #3712's scope was delivered elsewhere.

Evaluated by: mr-cal-bot

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 `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh tests/unit`? ----- - Add support for `build-on` and `build-for` for `core22` snaps. - Add environmental variable `SNAPCRAFT_BUILD_FOR` to limit which snaps are built Note: For `core22` snaps, `run-on` has been replaced with `build-for`. ### Examples These example `snapcraft.yaml` snippets show how to use architectures. #### Single architecture Building on `amd64` will produce 1 snap for `amd64`. ``` architectures: - build-on: amd64 build-for: amd64 ``` #### Single architecture, shorthand This is the same as the previous example, but in a shorthand format. ``` architectures: - amd64 ``` #### Multiple architectures - Building on `amd64` will produce 1 snap for `amd64`. - Building on `arm64` will produce 1 snap for `arm64`. ``` architectures: - build-on: amd64 build-for: amd64 - build-on: arm64 build-for: arm64 ``` #### Multiple architectures, shorthand This is the same as the previous example, but in a shorthand format. ``` architectures: - amd64 - arm64 ``` #### Multiple architecture, cross-compiling - Building on `amd64` will produce 2 snaps, 1 snap for `amd64` and 1 snap for `arm64`. - Building on `arm64` will produce 1 snap for `arm64`. ``` architectures: - build-on: amd64 build-for: amd64 - build-on: [amd64, arm64] build-for: arm64 ``` #### Architecture independent For snaps that can run on any architecture (e.g. python or shell scripts), use `build-for: all`. ``` architectures: - build-on: amd64 build-for: all ``` #### Limiting builds with environmental variable The environmental variable `SNAPCRAFT_BUILD_FOR` can be used so that only 1 snap package is produced. - Running `snapcraft` on `amd64` will produce 2 snaps, 1 snap for `amd64` and 1 snap for `arm64`. - Running `SNAPCRAFT_BUILD_FOR=arm64 snapcraft` will produce 1 snap for `arm64`. ``` architectures: - build-on: amd64 build-for: amd64 - build-on: amd64 build-for: arm64 ``` (CRAFT-954)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Closed as outdated on 2022-07-05 after being split into sub-PRs; schema support merged in #3812 (629e4ce51) and the remaining core22 build-on/build-for work merged in #3821 (4876b53).
stealth/space-bunny-alpha — closed superseded Original core22 build-on/build-for architectures PR (CRAFT-954) closed unmerged on 2022-07-05 by mr-cal as outdated and split into 7 sub-PRs; final piece #3821 landed as commit 4876b5368 (merge 37fe38a8c).
stealth/space-bunny-alpha — closed superseded Closed as outdated after being split into smaller PRs; schema work merged in #3812 (629e4ce51), and the remaining core22 architecture implementation merged in #3821 (4876b53).
qwen/qwen3.6-35b-a3b — — Closed and superseded by a series of smaller pull requests (3812-3821) that split the architecture feature work. The original PR was abandoned as the maintainer refactored the changes into separate, completed tasks.
qwen3.6-35b-a3b-mtp-q6 — — Closed and superseded by PRs #3812-#3821. The scope was reduced and split into subtasks to address pending work, with most subtasks merged independently.

Update history

No update history recorded yet.

Related work

  • Superseded By: snapcore/snapcraft#3821 (confidence 98%)

    'meta: architectures' sub-task merged; delivered build-on/build-for plus SNAPCRAFT_BUILD_FOR (4876b53)

  • Superseded By: snapcore/snapcraft#3812 (confidence 95%)

    Architectures pydantic schema support merged (629e4ce51)

  • Superseded By: snapcore/snapcraft#3814 (confidence 80%)

    Extensions validated with pydantic sub-task from the split

  • Superseded By: snapcore/snapcraft#3820 (confidence 75%)

    Providers sub-task specifying build-on/build-for in instance name

Related issues

No related issues found above the similarity threshold.