Skip to content

CI and Releases

Phillippe Pelzer edited this page Nov 24, 2026 · 4 revisions

CI and Releases

This page shows what happens from a merged change to a published release. Contributors do not run these steps. Maintainers do. Knowing them explains why a PR waits.

The short version

  1. Changes are merged into dev.
  2. A maintainer opens a PR from dev to master.
  3. CI builds all seven platforms and publishes a release candidate.
  4. The candidate is tested on real hardware. The PR checklist ticks itself.
  5. One reviewer approves. The PR is squash merged.
  6. master builds the release, deletes the candidate and publishes to npm.
  7. dev is reset to master, so both are the same.
  8. The Wiki pages for what the release changed are updated.

Branches

Only master and dev exist. A PR into master is only accepted from dev. The check guard-source-branch rejects any other source branch.

Workflows

Workflow File Job
CI/CD Pipeline main.yml Builds, tests, scans and publishes.
Detect Changes detect-changes.yml Decides what to build, computes the next version.
Reusable Docker Build reusable-docker-build.yml Builds one image. Used by main.yml.
PR Guards pr-guards.yml Checks on every PR into master or dev.
Verify RC verify-rc.yml Tests the release candidate on real hardware. Ticks the checklist.
npm Publish npm-publish.yml Publishes the npm client after a release.

What triggers a build

main.yml runs on a push to master and on a PR into master. It does not run on a PR into dev.

The builds run on the project's self-hosted runners. A PR from a fork does not build there. That is why a fork PR gets no build and a maintainer builds the change. See Contributing.

A PR into master always builds everything. On a push to master, a change that touches the build builds all seven platforms. A release always carries every platform. Workflows that cannot change a binary (for example PR Guards or Verify RC) do not cause a rebuild.

PR Guards

PR Guards run on every PR into master or dev.

Check Runs on What it checks
guard-source-branch PRs into master The source branch is dev.
checklist-complete PRs into master Every box between the checklist markers in the PR body is ticked.
checklist-scripts all The tests of the checklist scripts pass.
action-pins all No workflow references an action by branch.
pr-validation all Collects the results above.

checklist-complete reads the PR body from the PR event. When Verify RC ticks a box it edits the PR body. An edit of the PR starts PR Guards again.

The release candidate

A PR from dev to master starts the build. These jobs run in order:

  1. Detect Changes computes the next version: the newest tag, with the patch number plus one.
  2. Build the base image if it changed, then every platform.
  3. Export the archives from the images.
  4. Smoke test each archive on a matching GitHub-hosted runner. See Testing.
  5. Unit tests run on Ubuntu.
  6. Trivy scans every image. The results go to GitHub code scanning. See Security.
  7. Publish a prerelease named vX.Y.Z-rc, with the archives, a .sha256 file for each, and manifest.json.

On darwin-arm64, Metal checks run on Apple Silicon. They report; they do not block the release. The smoke test of the darwin-x86_64 archive requires the Metal backend to be in the binary.

Every push to the PR builds and publishes the candidate again. The old one is deleted first.

A PR check, pr-build, is green only when the whole path passed.

Verify RC

When the build for the PR succeeds, Verify RC runs. It tests the exact candidate that was built from the PR head.

Platform Where it runs
linux-x86_64, linux-aarch64, windows-x86_64, darwin-x86_64, darwin-arm64, freebsd-x86_64 The project's self-hosted runners.
windows-aarch64 GitHub's hosted windows-11-arm runner.

Each job does this:

  1. Downloads the archive and manifest.json from the candidate.
  2. Checks the SHA-256 of the archive against the manifest.
  3. Unpacks it and runs tests/tests.sh or tests/tests.ps1. See Testing.
  4. Writes a verdict file that names the SHA-256 of the bytes it tested.

A separate job then ticks the PR checklist. It ticks a box only from a verdict that says pass. It never ticks from a job's exit code alone.

If a runner is offline, its box stays empty and the PR cannot merge. That is the same result as nobody having tested it.

The checklist has one line per platform. It has one more line for hardware acceleration (NVENC, AMF, VPL). That line ticks when the acceleration was exercised somewhere on the test machines.

Verify RC never runs a PR from a fork.

Merging

A PR into master can merge when all of these hold:

Rule Detail
pr-validation is green Source is dev, the checklist is complete, the checklist scripts pass.
pr-build is green The build, export, smoke and unit tests passed.
One approving review Stale approvals are dismissed on a new push.
Conversations are resolved
Squash merge Squash only (repository setting).

The .github/scripts/setup-branch-protection.sh script sets the required checks, approvals and conversation resolution. The merge method is not set by that script.

One build, one release candidate

Do not push to dev while a release PR has a candidate. Each push builds again, deletes the candidate and starts verification from the beginning. Wait until the release is merged.

The release

A squash merge pushes to master. Then main.yml:

  1. Builds all platforms again.
  2. Runs the smoke tests and unit tests.
  3. Publishes the release vX.Y.Z with the version-stamped archives, .sha256 files and manifest.json.
  4. Deletes the -rc prerelease.
  5. Scans the images with Trivy.

The archives are named ffmpeg-9.1-<platform>-vX.Y.Z.<ext>. See Installation.

npm

When the pipeline finishes on master, npm Publish checks that the release job succeeded. If it did, it publishes the client for the newest full release. The client version is the release version. A candidate never becomes an npm version.

See npm-Package.

After the release

  1. dev is reset to master. Both branches are identical.
  2. The Wiki pages for what the release changed are updated. The Wiki always describes the latest release.

Mirrors

Sources the build downloads come from pinned source mirrors, with the upstream origin as a fallback. Only a file with the pinned SHA-256 is kept. See Architecture.

Clone this wiki locally