Migrate conda packaging to rattler-build (v1 recipe format) for GitHub Actions CI - #3031
Open
ekomarova wants to merge 7 commits into
Open
Migrate conda packaging to rattler-build (v1 recipe format) for GitHub Actions CI#3031ekomarova wants to merge 7 commits into
ekomarova wants to merge 7 commits into
Conversation
ekomarova
requested review from
antonwolfy,
ndgrigorian and
vlad-perevezentsev
as code owners
August 17, 2026 22:25
Collaborator
ekomarova
force-pushed
the
rattler-build-migration
branch
from
August 18, 2026 14:29
3991bb9 to
ee3ec67
Compare
ekomarova
force-pushed
the
rattler-build-migration
branch
from
August 18, 2026 17:12
b9750b9 to
b2a68e2
Compare
Member
Author
|
@antonwolfy @ndgrigorian It looks like I've managed to stabilize GitHub CI, so please take a look at it when you have time. I would also consider getting rid of installing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add rattler-build support for GitHub Actions CI
Summary
This PR adds rattler-build as the package-building tool for the Conda package GitHub Actions workflow, alongside a new
recipe.yaml(v1 recipe schema) generated from the existingmeta.yaml.meta.yamlis left untouched and fully functional. This PR only changes what runs on GitHub Actions; it does not retire or replace theconda-buildpath.What changed
.github/workflows/conda-package.yml: build steps now call rattler-build instead of conda-buildconda-recipe/recipe.yaml: new file, the rattler-build (v1 schema) equivalent ofmeta.yaml. A handful of things had to be restructured becauserecipe.yamlmust always be valid plain YAML (no Jinja control-flow blocks)environments/build_conda_pkg.yml: now installs rattler-build instead ofconda-build/conda-verifyconda-recipe/bld.bat: unchanged, still the source file forconda-build; a CI step copies it tobuild.baton Windows runners since that's the filenamerattler-buildexpectsWhy these specific changes were needed
CONDA_BLD path —
rattler-buildoutputs tooutput/<platform>/relative to the working directory by default, unlikeconda-build's $CONDA_PREFIX/conda-bld/Compute version from git describestep —conda-buildrunsgit describeinternally before rendering to populate GIT_DESCRIBE_TAG/GIT_DESCRIBE_NUMBER.rattler-buildhas no equivalent, sorecipe.yamlnow reads these viaenv.get(...), and we compute + export them ourselves beforehand.Prepare build.bat for rattler-buildstep —rattler-buildexpectsbuild.bat(symmetric withbuild.sh), whileconda-build(still used in non-GitHub CI) only recognizesbld.bat. Rather than duplicating the file,bld.batstays the single source and gets copied tobuild.batat CI time on Windows.RATTLER_CHANNELS array —
channels-listincludes--override-channels, whichrattler-build's CLI doesn't recognize, so it's stripped before use. Expanded into a bash array (instead of a bare $VAR) so each-c <channel>reachesrattler-buildas a separate argument — also fixes a shellcheck SC2086 warning.Removed
conda-verify=3.4.2— it's a conda-build-specific post-build checker;rattler-buildvalidates internally, so it's no longer needed.Removed the two guard blocks and the
pyproject.tomlloop inrecipe.yaml—recipe.yamlmust always be valid plain YAML, so Jinja control-flow ({% if %}/{% for %}) isn't supported. The version guard checks are dropped (an invalid override still fails to build, just via a less friendly solver error instead of a custom message), and the dependency list previously generated frompyproject.toml's [build-system]requires is now static — it needs manual updates if those requirements change.Added
tests: - script: ...block — v1 schema requires an explicit test type; the oldtest: requires:block installed test deps without running anything, which isn't valid anymore. Added a minimal import/version smoke testReplace
minicondawithrattler-buildaction in the build job —rattler-buildis a standalone binary with no conda/Python dependency, so building conda packages with it doesn't need a full conda distribution on the runner. The installation takes about 1s