Skip to content

Introducing Low-Priority Jobs

Cirrus Runners' fixed pricing per concurrent runner provides predictable costs and aligns our interests with yours – we're motivated to make your builds as fast as possible. However, not all CI workflows are equally time-sensitive. Today, we'll explore how to optimize your runner utilization using low-priority jobs.

Not All Jobs Are Created Equal

In a typical CI/CD pipeline, different types of workflows have different urgency levels:

  • Pull Request Checks - While important for code quality, these often wait for human review anyway
  • Scheduled (Cron) Jobs - Perfect for background jobs that don't need immediate execution
  • Main Branch and Release Builds - Usually require immediate attention

Introducing Low-Priority Jobs

Cirrus Runners automatically detects when your organization is approaching its concurrency limit. When this happens, it starts prioritizing jobs without the low-priority label, ensuring your critical workflows aren't blocked by less urgent ones.

Here's how to mark a workflow as low priority by adding the low-priority label to the runs-on:

# pr.yaml
name: Example PR Workflow
on:
   pull_request:
      types: [opened, synchronize, reopened, closed]

jobs:
   build:
      runs-on: ["ghcr.io/cirruslabs/macos-runner:sequoia", "low-priority"]
      steps:
         - uses: actions/checkout@v4
         - name: Run a one-line script
           run: echo "This job has low priority"

Real-World Example

Let's say you have a subscription for 2 concurrent runners. Here's what happens:

  1. When both runners are idle, all jobs (both regular and low-priority) execute immediately
  2. When runners are busy and new jobs arrive:
  3. Regular jobs get priority
  4. Low-priority jobs wait for available capacity

This approach ensures optimal resource utilization while maintaining responsiveness for critical workflows.

Foreword

Start optimizing your CI/CD pipelines today by marking appropriate workflows as low-priority. This simple change can significantly improve your critical workflows' responsiveness while maintaining the same predictable pricing.

For implementation details and best practices, check our documentation or reach out to our support team at support@cirruslabs.org.