C.W.K.
Stream
Lesson 05 of 12 · published

Runners

~12 min · runners, vm, self-hosted

Level 0Apprentice
0 XP0/101 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

The machine that runs the job

A runner is the machine your job actually executes on. GitHub provides hosted runners; you can also bring your own (self-hosted runners).

Hosted runners

  • ubuntu-latest — Linux. Cheapest. Default for almost everything.
  • ubuntu-22.04, ubuntu-20.04 — pinned versions.
  • windows-latest — Windows Server. 2× the minute cost.
  • macos-latest, macos-14, macos-15 — macOS. 10× the minute cost. Required for iOS / native macOS builds.
  • Larger runners: ubuntu-latest-4-cores, etc. (must be enabled per org).

Self-hosted runners

  • Tag with runs-on: [self-hosted, gpu, linux-x64] to target specific machines.
  • Used for: cost (large CI bills), specialized hardware (GPU, Apple Silicon), private network access, persistent caches.
  • You're responsible for OS, security, and uptime.

What's pre-installed on hosted runners

Quite a lot — Python, Node, Go, Rust, Docker, Java, .NET, Ruby, common build tools. Check the runner-images repo for the exact manifest. If your tool is on the list, you don't need to install it; if it isn't, install it as a step.

Code

Selecting a runner — hosted vs self-hosted·yaml
jobs:
  cheap-linux:
    runs-on: ubuntu-latest

  fast-linux:
    runs-on: ubuntu-latest-4-cores

  ios:
    runs-on: macos-15

  gpu:
    runs-on: [self-hosted, gpu, linux-x64]
    # only the runners with all three labels match.

  apple-silicon-mlx:
    runs-on: [self-hosted, macos, apple-silicon]

External links

Exercise

Open the runner-images repo, find the ubuntu-24.04 README, and confirm which Python versions are pre-installed. Try a workflow that uses one of them without setup-python — does it work? Compare that run time vs the one with setup-python.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.