Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
distro: ${{ fromJSON(needs.plan.outputs.distros) }}
env:
DISTRO: ${{ matrix.distro }}
# while uploads go to a test channel, packages already there aren't built again
ROBOSTACK_UPLOAD_CHANNEL: ${{ vars.ROBOSTACK_UPLOAD_CHANNEL }}
DRY_RUN: ${{ inputs.dry_run || 'false' }}
steps:
- name: Bot token (pushing workflow files needs more than GITHUB_TOKEN)
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/testpr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
env:
DISTRO: ${{ matrix.distro }}
PLATFORM: ${{ matrix.target.platform }}
# while uploads go to a test channel, packages already there aren't built again
ROBOSTACK_UPLOAD_CHANNEL: ${{ vars.ROBOSTACK_UPLOAD_CHANNEL }}
# rattler-build writes to distros/<d>/work/output, or to CONDA_BLD_PATH (win-64)
CACHE_DIR: ${{ matrix.target.platform == 'win-64' && 'C:/bld/win-64' || format('distros/{0}/work/output/{1}', matrix.distro, matrix.target.platform) }}
steps:
Expand Down
18 changes: 13 additions & 5 deletions tools/robostack.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,13 @@ def prepare(distro: str) -> Path:
shutil.rmtree(w / stale, ignore_errors=True)
for stale in ("pkg_additional_info.yaml", "robostack.yaml", "packages_ignore.yaml", "packages-ignore.yaml"):
(w / stale).unlink(missing_ok=True)
# packages already on the channel aren't built again; while uploads go to another
# channel (ROBOSTACK_UPLOAD_CHANNEL, e.g. a test channel), those count too
skip = [channel_url(distro)] + ([extra] if (extra := upload_channel_url()) else [])
(w / "vinca.yaml").write_text(
f"# Generated by `pixi run rs {distro} prepare`; edit distros/{distro}/vinca.yaml or shared/vinca.yaml.\n"
"extends: ../vinca.yaml\n"
f"skip_existing:\n - {channel_url(distro)}/\n"
"skip_existing:\n" + "".join(f" - {url}/\n" for url in skip)
)
# vinca-gha inlines ./.scripts/build_win.bat into the Windows workflow
shutil.rmtree(w / ".scripts", ignore_errors=True)
Expand Down Expand Up @@ -288,10 +291,15 @@ def task(distro: str, name: str, args: list[str]) -> int:
return run(py + [str(TOOLS / "check_dependency_compat.py"), *args], w)
if name == "gap-report":
return run(py + [str(TOOLS / "build_gap_report.py"), *args], w)
if name in ("build", "build-one") and not any((w / "recipes").glob("*/recipe.yaml")):
print(f"No recipes in {(w / 'recipes').relative_to(ROOT)}: run `pixi run rs {distro} generate-recipes` first",
file=sys.stderr)
return 1
if name in ("build", "build-one"):
if not (w / "recipes").is_dir():
print(f"No {(w / 'recipes').relative_to(ROOT)}: run `pixi run rs {distro} generate-recipes` first",
file=sys.stderr)
return 1
if not any((w / "recipes").glob("*/recipe.yaml")):
# generated, but every package is already built (on the channel)
print(f"Nothing to build: {(w / 'recipes').relative_to(ROOT)} is empty")
return 0
if name == "build":
return run(rattler_build(distro, ["--recipe-dir", "./recipes", *args]), w)
if name == "build-ci": # used by .scripts/build_unix.sh / build_win.bat
Expand Down
Loading