How CI Router works
What happens to a job from the moment GitHub queues it until its machine is destroyed.
#The path of one job
- GitHub queues a job whose
runs-online isci-router. The GitHub App tells CI Router. - CI Router checks that your team can pay for the job: the usage included in your plan, or credit you bought.
- CI Router reads what the job needs from its labels and its workflow. It picks a provider and a size among the machines that have it.
- A fresh machine boots with a runner registered for this one job. If the machine fails to boot, CI Router tries the next provider.
- The runner takes the job and runs it. Logs, artifacts and checks go to GitHub, as with any runner.
- When the job ends, the runner reports the CPU and memory the job used. The machine and its disk are destroyed.
- The job is charged for the machine's lifetime, per second where the provider supports it. See Plans and credit.
#How the route is chosen
A route is a provider and a size. CI Router picks one for each job, among your allowed providers and the machines that have what the job needs. The mode decides whether cost or speed comes first. A size tag fixes the size. See Modes and sizes.
A job's first route comes from its mode and what it runs, such as a compile or a lint. CI Router then measures every run. It moves the job when another route measures faster or cheaper, or when a run runs out of memory or disk. Each change is listed on the run's Routing tab. See Runs and diagnostics.
#When a job does not start
Some jobs cannot run: funds are missing, public repositories are off, or no allowed machine has what the job needs. CI Router starts no machine for them. The job stays queued on GitHub and nothing is charged. The dashboard's Runs page shows the reason. See Troubleshooting.
When no provider can boot a machine, CI Router keeps retrying. If none succeeds, it holds the job and the dashboard shows a notice. Re-run the job when a provider is back.
#Terms
| Term | Meaning |
|---|---|
| Job | One job of a GitHub Actions workflow that asked for a ci-router runner. |
| Run | One attempt to run a job on a machine. A job that is retried has several runs. |
| Route | The provider and size a job runs on. |
| Mode | cheap, auto, fast: whether a job favors cost, a balance, or speed. |
| Team | Your GitHub organizations, members, API keys, settings and billing. |