CI workflows and secrets¶
Workflows in ship-conda-recipes¶
build.yml: build and upload¶
Triggers on push to main, pull requests against main, the merge
queue (merge_group) and workflow_dispatch. The workflow itself is
a thin caller of the reusable
rattler-build-and-upload.yml
in ShipSoft/.github. It runs one native job per platform listed in
the platforms input (linux-64 on ubuntu-latest, linux-aarch64 on
an arm64 runner), and each job builds the whole channel with:
pixi run rattler-build build \
--recipe-dir recipes/ \
--channel https://prefix.dev/ship-experiment/stable \
--channel conda-forge \
--skip-existing=all
rattler-build resolves cross-recipe dependency order from the
requirements: blocks; nothing else needs maintaining. Recipes that
don't support a platform skip it (see Platforms).
On push to main and on manual dispatches from main, each job
uploads its output/<platform>/*.conda files, and the linux-64 job
also uploads output/noarch/, with
rattler-build upload prefix -c ship-experiment/stable --skip-existing.
The upload authenticates with trusted publishing (see
Secrets).
PR builds run the same build step but do not upload. The packages
they produce are attached to the run as one
conda-packages-<platform> artifact per platform (kept for 7 days). An All checks passed job aggregates the result
for branch protection.
lint.yml: hooks and commit messages¶
Runs the reusable prek.yml (all prek hooks, see
Add a new recipe) and commit-check.yml
(Conventional Commits) on pushes, pull requests and the merge queue.
finalize-renovate-pr.yml: refresh hashes on Renovate PRs¶
Runs on Renovate PRs that touch a recipe.yaml and pushes a commit
with the refreshed source.sha256. See
Bump a package version.
channel-drift.yml: weekly drift check¶
Mondays at 04:00 UTC. Compares the pins of every published package
against current conda-forge and opens up to two PRs (label drift):
channel-driftbumpsbuild.numberon recipes whose pins have fallen behind; merging it rebuilds them.variant-driftadvances theroot_basepin in everyvariants.yaml. That is a real ROOT upgrade, so review it on its own.
Run it locally with pixi run -e drift check-drift.
channel-snapshot.yml: weekly channel inventory¶
Mondays at 06:00 UTC. Fetches
https://prefix.dev/ship-experiment/stable/{linux-64,linux-aarch64,noarch}/repodata.json,
renders channel-snapshot.md, and opens (or updates) a
channel-snapshot PR if the contents changed. The diff is the
changelog.
Dev builds: early warning for downstream breakage¶
These jobs build downstream repositories from source against the current channel, so breakage shows up before a recipe bump:
dev-build-fairship.yml(daily, 05:00 UTC) anddev-build-aegir.yml(daily, 06:00 UTC) build themainbranch of FairShip and aegir with a fresh dependency resolve (the committedpixi.lockis deleted).workflow_dispatchtakes arefinput to build another branch.dev-source-build-aegir.yml(daily, 07:00 UTC) builds aegir's dev environment with data-model, Geometry and geometry_service as pixi source dependencies, as described in the Developer Guide. It pins pixi on purpose, to catch regressions in the preview pixi-build feature.workflow_dispatchtakesref,data_model_ref,geometry_refandgeometry_service_refinputs to try out unmerged branches.
nightly-main.yml: nightly builds of library main branches¶
Daily at 02:30 UTC. Builds the main branch of ship-random,
data-model, Geometry, geometry_service and field_service, and uploads
them to prefix.dev/ship-experiment/nightly. Each library builds
against released dependencies only (stable channel and conda-forge),
so a consumer can swap in exactly one main build. Consumer
repositories use this channel for advisory PR jobs through the
reusable pixi-main-deps.yml. Every library except the noarch
ship-random is built for both linux-64 and linux-aarch64.
workflow_dispatch takes recipe and force inputs.
splines.yml: GENIE splines¶
Manual (workflow_dispatch). Generates the production GENIE
cross-section splines in several stages, builds the
genie-splines-ship package from them and uploads it to the channel.
Inputs include the GENIE tune, the number of knots and the maximum
neutrino energy.
Maintenance¶
update-lock-files.ymlcalls the reusablepixi-lock-update.ymlon the 1st of each month at 05:00 UTC and opens anupdate-pixiPR with thepixi updatediff.update-shared-configs.ymlcalls the reusableconfig-sync.ymlon the 1st of each month at 06:00 UTC and opens a PR when the files shared across ShipSoft repositories (by default onlyAI_POLICY.md) have changed.
Secrets¶
- No prefix.dev API key.
build.yml,splines.ymlandnightly-main.ymlupload with trusted publishing: the jobs grantid-token: write, and each workflow is registered as a trusted publisher on its channel (@ship-experiment/stableor@ship-experiment/nightly) in the prefix.dev channel settings. A new workflow that uploads needs its own entry there. APP_CLIENT_ID(variable) andAPP_PRIVATE_KEY(secret) — the credentials of a GitHub App.finalize-renovate-pr.ymlcreates a short-lived app token from them and uses it to push the sha256 refresh commit. Workflows don't start on pushes made withGITHUB_TOKEN, so the app token is what makes the build and lint checks run on that commit.GITHUB_TOKEN— default per-run token. It covers the PRs opened byupdate-lock-files.yml,channel-snapshot.ymlandchannel-drift.yml. No extra configuration needed.
Triggering a targeted rebuild¶
From the GitHub Actions UI, run Build and upload conda packages
with workflow_dispatch. Two inputs help when only one recipe
needs to be rebuilt (e.g. after Renovate bumps a single upstream
version):
recipe— directory name underrecipes/, e.g.random123. Restricts the build to that recipe; its dependencies are pulled from the channel.force— drops--skip-existingso a rebuild proceeds even when an artifact with the same build number is already on the channel. Pair with abuild.numberbump in the recipe.
Reusable workflows¶
The cross-repo CI pieces live in
ShipSoft/.github.
ship-conda-recipes uses rattler-build-and-upload.yml, prek.yml,
commit-check.yml, pixi-lock-update.yml and config-sync.yml. The
full list, and which repositories call each workflow, is in
CI and repository conventions.
When adding a new ShipSoft repo, call these rather than inlining the same setup-pixi boilerplate.