GitHub Action reference#
cx provides a composite GitHub Action and a reusable workflow for building custom cx binaries with your own package set.
Composite action#
The composite action builds a cx binary for the current runner’s platform. Use a matrix strategy for multi-platform builds.
uses: jezdez/conda-express@<ref>
Inputs#
packagesoptionalComma-separated conda package specs to include in the bootstrapper. When empty, uses the default packages from conda-express.
Example:
"python >=3.12, conda >=25.1, numpy, pandas"channelsoptionalComma-separated conda channels. When empty, uses the default (
conda-forge).Example:
"conda-forge, bioconda"excludeoptionalComma-separated packages to exclude from the bootstrapper, along with their exclusive dependencies. When empty, uses the default exclusions.
Example:
"conda-libmamba-solver"refoptional default: mainGit ref of conda-express to build from (tag, branch, or SHA).
Outputs#
binary-pathAbsolute path to the built cx binary on the runner.
asset-namePlatform-qualified asset name (e.g.
cx-aarch64-apple-darwin).
What it does#
Checks out conda-express into
.cx-build/Sets up pixi (Rust toolchain from conda-forge)
Sets up Rust build caching
Builds the cx binary with
CX_PACKAGES,CX_CHANNELS, andCX_EXCLUDEenvironment variable overrides (see build-time configuration)Stages the binary with a platform-qualified name and SHA256 checksum
Reusable workflow#
The reusable workflow builds cx for all 5 supported platforms in a single call, using the composite action internally.
uses: jezdez/conda-express/.github/workflows/build.yml@<ref>
Inputs#
All inputs from the composite action are supported, plus:
retention-daysoptional default: 7Number of days to retain build artifacts.
Artifacts#
The workflow uploads one artifact per platform, each containing the binary
and its .sha256 checksum:
Artifact |
Platform |
|---|---|
|
Linux x86_64 |
|
Linux ARM64 |
|
macOS Intel |
|
macOS Apple Silicon |
|
Windows x86_64 |
Environment variables#
The action passes its inputs to the cx build system via environment variables. These are the same variables you can set when building from source:
Input |
Environment variable |
Effect |
|---|---|---|
|
|
Replaces |
|
|
Replaces |
|
|
Replaces |