.github/workflows/nightly.yml
;scheduling=flex to a job’s runs-on label and it starts within 24 hours, when our fleet has spare capacity, for 60% of the price.
Enable flex scheduling
Append;scheduling=flex to any Blacksmith runner label. Nothing else in the workflow changes.
Supported runners
Every size of every runner tag has a flex version. The machine is the one the label names: same vCPUs, memory, storage and image.What to expect
A flex job shows as Queued in GitHub until Blacksmith has spare capacity for it, then starts like any other job. How long that takes depends on how busy our fleet is. It can be minutes or most of a day, and it isn’t tied to a time of day. A large batch of flex jobs may start over a period of time and not all at once. What you can count on:- It starts within 24 hours. Every flex job starts within 24 hours of being queued, however busy the fleet is.
- It’s never preempted. Once a flex job starts, we don’t pause it or stop it to make room for other jobs. It runs until it finishes or reaches the 8 hour limit.
- It costs 40% less. Every minute the job runs is billed at the flex price, and waiting is free.
What to run on flex
Flex scheduling fits a job when nobody is waiting on its result and it finishes in under 8 hours. A few places that describes:Nightly and scheduled suites
A full end-to-end or regression run that starts at 2am is read the next morning. If it finishes at 6am, nothing changes for the team..github/workflows/nightly.yml
concurrency with cancel-in-progress: true, the newer run cancels the one still waiting.
Post-merge work on main
Long integration suites, benchmarks and performance regression runs often trigger on every merge, after the pull request has already shipped. The result feeds a dashboard or an alert, not a person watching a spinner. A team that merges 40 times a day and runs a 25 minute benchmark onblacksmith-16vcpu-ubuntu-2404 uses 1,000 minutes a day: $32.00 at list price, $19.20 with flex scheduling.
Batch and backfill jobs
Data processing, dependency update sweeps and bulk re-runs across many repositories are large and rarely urgent. Queue them all at once. They start over time, and every one of them starts within 24 hours.Slow, non-blocking checks
Security and license scans, fuzzing, mutation testing and the long tail of a compatibility matrix (older OS versions, extra architectures) report problems that someone fixes tomorrow. Keep the fast checks that gate a merge on standard runners and move these.Release candidates and nightly artifacts
A nightly build that produces an installer, a container image or an iOS archive for testers is needed by the morning, not the minute it is triggered. This is where macOS minutes add up fastest..github/workflows/nightly-ios.yml
Mixing standard and flex jobs in one workflow
Flex scheduling is chosen per job, so one workflow can use both. Keep the jobs a pull request waits on as they are, and move the rest:.github/workflows/ci.yml
needs: one, or both wait with it.
When not to use it
- Pull request checks a developer is waiting on. The wait can be minutes or most of a day.
- Deploys and releases with a deadline. Anything that must start sooner than 24 hours from now belongs on a standard runner.
- Jobs longer than 8 hours. They fail at the limit.
Limits
- Maximum runtime: 8 hours, or your organization’s job timeout if that is shorter. A job still running at the limit fails: we shut its runner down and GitHub marks the job as failed. The minutes it ran are billed.
timeout-minutesin your workflow counts from when the job starts, so the wait doesn’t use it up. - Runner size: a flex job always runs on the size in its label. Free upgrades don’t apply.
Pricing
Flex minutes cost 40% less than the same runner’s list price. You pay only for the minutes a job runs. Time spent waiting in the queue is free.- Linux x64
- Linux ARM
- Windows (Public Beta)
- macOS
FAQ
What does a flex job look like while it waits?
What does a flex job look like while it waits?
It shows as Queued in GitHub, the same as any job waiting for a runner. It moves to in progress when it starts. You can cancel it while it waits, and a cancelled job that never started costs nothing.
How long will my job wait?
How long will my job wait?
It depends on how busy the fleet is, and it can be minutes or most of a day. The only number we commit to is 24 hours, so plan around that.
What happens if my job is still running after 8 hours?
What happens if my job is still running after 8 hours?
It fails: we shut its runner down and GitHub marks the job as failed. The minutes it ran are billed. Split it into shards that each finish inside the limit, or run it on a standard runner.
Do flex minutes use my free minutes?
Do flex minutes use my free minutes?
Yes, at the flex price. Free minutes are a monthly credit worth the same number of x64 2 vCPU minutes at list price, so a flex minute uses 40% less of it than a standard one. The 3,000 free minutes cover 5,000 flex x64 2 vCPU minutes.
Can I switch a job back?
Can I switch a job back?
Yes. Remove
;scheduling=flex from the label and the next run starts on demand at list price.