← Back to issue list

environment: add build-on and build-for envvars for core20

View original Github issue

Metadata

Project
snapcraft
Number
#4313
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Merged into main. Added SNAPCRAFT_ARCH_BUILD_ON and SNAPCRAFT_ARCH_BUILD_FOR environment variables to expose build architecture details for core20. Approved, passed CI, and increased coverage.

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`? ----- New environment variables: - `SNAPCRAFT_ARCH_BUILD_ON` - `SNAPCRAFT_ARCH_TRIPLET_BUILD_ON` - `SNAPCRAFT_ARCH_BUILD_FOR` - `SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR` The build-for envvars are only available when the build-for architecture can be determined. They are not available for multi-architecture builds or for unknown build-for architectures. TODO: - [x] add spread tests - [x] s/run-on/build-for - [x] change target from `hotfix/7.5` to `main` [LP: #1997752](https://bugs.launchpad.net/bugs/1997752) (CRAFT-1498)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged into main. Added SNAPCRAFT_ARCH_BUILD_ON and SNAPCRAFT_ARCH_BUILD_FOR environment variables to expose build architecture details for core20. Approved, passed CI, and increased coverage.
qwen3.6-35b-a3b-mtp-q6 Merged into main. Adds SNAPCRAFT_ARCH_BUILD_ON and SNAPCRAFT_ARCH_BUILD_FOR environment variables for core20 builds. Updated naming from RUN_ON to BUILD_FOR and included CRAFT variants. Approved after review with 100% diff coverage.
qwen3.6-35b-a3b-mtp-q6 Merged into main. Added SNAPCRAFT_ARCH_BUILD_ON and SNAPCRAFT_ARCH_BUILD_FOR environment variables for core20 builds. Review incorporated RUN_ON to BUILD_FOR naming adjustments and CRAFT variants. Diff coverage reached 100%.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
82%
#532 environment: add build-on and build-for architectures craft-parts merged Merged following approval and CI checks. Introduces CRAFT_ARCH_BUILD_ON and CRAFT_ARCH_BUILD_FOR environment variables to standardize architecture naming, deprecating CRAFT_TARGET_ARCH and CRAFT_ARCH_TRIPLET. Resolves #514.
76%
#4332 environment: error when build-for arch variable cannot be evaluated snapcraft merged Merged. Resolves #4314 by raising an error instead of silently evaluating to None when SNAPCRAFT_ARCH_BUILD_FOR or SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR cannot be determined for core20 snaps. Approved by three reviewers and passed CI.
75%
#2720 remote build: switch from core to core18 snapcraft merged Merged change switches remote build base from core to core18, aligning with snapcraft edge. Approved, passed CI, and modified one file.
72%
#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.
72%
#1576 docker: add the environment variable to setup core snapcraft merged Merged a one-line Dockerfile update adding the SNAPCRAFT_SETUP_CORE environment variable to enable straightforward snapcraft builds with classic confinement. The change was approved, passed CI checks, and successfully integrated.
71%
#3579 snap: move base to core20 (CRAFT-509) snapcraft merged Merged updates the snap base to core20. Approved by two reviewers with passing CI checks. Changes affect 13 files, increase coverage by 0.07%, and update initialization templates to core20.
71%
#3583 build providers: snapcraft's new base is core20 (CRAFT-544) snapcraft merged Merged into master. Replaced core18 injection with core20 as the new snapcraft base. Approved by one reviewer, passed CI, and achieved 100% diff coverage.
71%
#2122 many: introduce variables for part src and build snapcraft merged Merged following approval. Introduces new environment variables and replacements for part src and build directories, resolving LP #1763028. Consolidates SNAPCRAFT_* environment handling into a single location. Approved by one reviewer with passing CI checks.
71%