Build pipelines
CI and exports
Run the same declared modules on a runner and export Studio actions to common CI providers.
Run a module in GitHub Actions
name: Pipeline
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fluentci-io/setup-fluentci@next
# Install the compiler/toolchain required by the selected module here.
- run: fluentci --check-update=false run ci hello
This example assumes the workspace declares ci and that the runner has its SDK
compiler tools. The setup action installs FluentCI; it does not make every
language toolchain available. Pin versions according to the project's release
policy. Precompiled modules avoid source compilation but still need the host
tools called by their jobs.
Export saved actions
Studio stores ordered project actions. Export them in the UI's CI export tab, or use the CLI after the project has been registered:
fluentci project list
fluentci project export PROJECT_NAME --github > workflow.yml
fluentci project export PROJECT_NAME --gitlab > gitlab-ci.yml
fluentci project export PROJECT_NAME --azure > azure-pipelines.yml
fluentci project export PROJECT_NAME --circleci > circleci.yml
fluentci project export PROJECT_NAME --aws > buildspec.yml
fluentci project export PROJECT_NAME --semaphore > .semaphore/semaphore.yml
The GitHub provider is the default. The project must be registered locally.
Without a name, export selects the current directory's saved project. Pass
--workflow checks to select .fluentci/workflows/checks.toml; otherwise export
uses default. Only enabled steps are exported, in order. The workflow environment
is merged with each step's environment, and working directories are preserved.
Module arguments remain literal arguments; shell actions run through Bash. A failed
command stops subsequent steps.
Events and provider setup
Configure [on], [on.push], and [on.pull_request] in the workflow file or use
Studio's visual event composer. Pull-request branch filters select the target
branch. Filters are inclusive globs using *, **, and ?; schedules are
five-field UTC cron expressions. These events never gate a manual local run.
| Provider | Trigger mapping and setup |
|---|---|
| GitHub Actions | Push, pull request, manual dispatch and schedules are in workflow YAML. |
| GitLab | Workflow rules map event sources, branches, tags and paths. Create scheduled pipelines in project settings using the cron instructions in the export. |
| Azure Pipelines | YAML contains push, PR and schedule filters. PR triggers require GitHub/Bitbucket; Azure Repos needs branch validation policies. Manual access uses pipeline permissions. |
| CircleCI | Uses GitHub App event conditions; enable matching project triggers and configure schedules separately. Static path filters are rejected. |
| Semaphore | Save .semaphore/semaphore.yml, enable selected events in project settings, and create scheduled Tasks separately. The ordered job checks event type and target branch/tag before running steps. Unmatched events skip steps. Path filters are rejected. |
| AWS CodeBuild | Buildspec controls commands. Export comments include the separate webhook filter payload and schedule/IAM instructions; apply these to the project. |
Provider YAML cannot configure every project setting. Export comments identify required external setup. See the Semaphore pipeline specification and event variables for Semaphore's runtime filter inputs.
Runner requirements
Exports install FluentCI with fluentci-io/setup-fluentci@next on GitHub and the
source installer elsewhere. The GitLab image installs curl, Git and CA certificates
first. Configure compiler tools required by source SDKs, secrets, and artifact
uploads for the chosen runner. Precompiled Wasm still requires tools called by its
jobs. Keep app passwords in CI secrets rather than workflow files.
Nix package CI
The flake exposes .#fluentci (also the default package) and .#studio for
x86_64-linux, aarch64-linux, and aarch64-darwin. Intel macOS is excluded.
Crane builds the Rust CLI and embeds Studio assets built with Bun. Dependencies
are pinned by Cargo.lock, bun.lock, and flake.lock.
nix build .#fluentci
# After changing bun.lock, refresh its Nix fetchers:
bun scripts/generate-bun-nix.mjs
The Nix build workflow pins FluentCI CLI v0.17.8, the latest published release, and uses the FluentCI cache service on Linux x86_64, Linux ARM64, and macOS. It compiles the PureScript Nix component to Wasm before running builds.
Add these GitHub Actions repository variables:
| Variable | Value |
|---|---|
FLUENTCI_CACHE_URL |
Stable DID URL from the cache page: https://cache.fluentci.io/did:plc:YOUR_DID, without /nix; legacy hash URLs remain supported |
FLUENTCI_NIX_PUBLIC_KEY |
Complete public key, such as fluentci-1:<base64> |
Add these repository secrets:
| Secret | Value |
|---|---|
FLUENTCI_CACHE_TOKEN |
Upload token generated on the cache page; valid until revoked |
FLUENTCI_NIX_SIGNING_KEY |
Complete private signing-key file contents, not a path |
Generate a matching key pair outside the checkout:
nix-store --generate-binary-cache-key fluentci-1 nix-private.key nix-public.key
Public reads require only the two variables. Uploads require both secrets. With no cache configuration the build uses default Nix substituters; incomplete configuration fails. During a build, the helper polls the valid Nix store every two seconds and publishes newly added unsigned paths, including intermediate Crane Cargo artifacts. It drains pending uploads at the end and checks the final closure for paths it has not published. Completed artifacts remain cached if a later build step fails. Each selected artifact is exported with its references, including upstream dependencies, so the published cache has a complete closure. Already published paths are reused between batches. Compressed payloads are removed locally after upload while metadata is retained for reference checks.
Every export is signed with the private key. Before uploading, the helper checks
for the configured key's signature on every narinfo and asks Nix to verify those
signatures. It uploads NARs before narinfo metadata, with at most four concurrent
HTTP uploads. Transient HTTP 408/425/429/5xx errors and transport timeouts retry
up to three times with fresh file streams and bounded backoff. Each attempt has
a 125-minute deadline; the production cache service allows two hours per upload.
Permanent errors or exhausted retries cancel the build client and fail CI; private keys
and exported files are cleaned up. The workflow limits Nix HTTP connections to 16.
Signing keys are temporary files outside the checkout and are removed after
publishing. Credentials never appear in command arguments. The workflow
preserves GitHub authentication through GH_TOKEN and NIX_CONFIG.
fluentci run nix-build build
Debian and RPM releases with Gemfury
The release workflow packages the Linux CLI and embedded Studio web interface as
Debian and RPM packages for x86_64 and arm64. It compiles the gemfury PureScript
module to Wasm once, then invokes its dependencies, package, and upload
functions on each native Linux runner. Packages and SHA-256 sidecars are also
attached to the GitHub release.
Packaging logic lives in CI.LinuxPackages, entirely in PureScript: validation,
metadata generation, native file writes, staging, verification, checksums, and
cleanup. The module calls dpkg-deb and rpmbuild directly, without a packaging
shell helper. Its github function attaches the exact package files and
checksums through the GitHub CLI.
Configure the GitHub Actions secrets FURY_USER, FURY_TOKEN, and FURY_ACCOUNT
for Gemfury. The user and token authenticate the request; the account selects
the upload destination. User and account can also be repository variables;
secrets take precedence.
Without a token, the workflow still builds and attaches the packages but skips
Gemfury uploads. With a token, missing user/account configuration and upload errors
fail the job. Credentials stay in the environment rather than command arguments.
The packages use the same Ubuntu 24.04 binaries as the release archives and
declare a glibc 2.39 minimum. Debian architecture names are amd64/arm64;
RPM architecture names are x86_64/aarch64.
Publish the Nix flake
The FlakeHub and Flakestry publishing workflows run when a release tag such as
v0.17.0 is pushed to fluentci-io/fluentci. Both also support Run workflow:
enter an existing release tag in the required tag input to publish it manually.
Forks skip publication.
The shared nix-publish.yml workflow validates the tag, compiles and tests the
nix PureScript module, and publishes the tag's exact commit through its Wasm
flakehub or flakestry function. GitHub OIDC and the job token authenticate
publication; no additional registry secret is required. Publishing is separate
from the default checks and the Nix package build workflow.
Unsupported remote execution
The unified CLI does not currently expose fluentci run --remote-exec. Run the
CLI on a CI runner instead. Existing legacy agent commands are separate from the
AT Protocol publishing account flow.