C++
C++ CI on GitHub Actions
Every translation unit recompiles even when nothing relevant changed.
28m → 6m
Full build
28m → 90s
Incremental
88%
ccache hit
Every translation unit recompiles even when nothing relevant changed.
Why it happens
No compiler cache is configured, so ccache or sccache cannot short-circuit identical compilations.
What to change
- Add ccache or sccache and persist its cache directory between runs
- Use ninja rather than make — the dependency graph is faster and more parallel
- Cache vcpkg or Conan package directories keyed on the manifest
- Build on a 32 vCPU runner; C++ compilation parallelises almost perfectly
C++ on runnerhut
yaml
jobs: build: runs-on: runnerhut-32vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 - uses: hendrikmuhs/ccache-action@v1 - run: cmake -B build -G Ninja -DCMAKE_C_COMPILER_LAUNCHER=ccache - run: cmake --build build --parallelThe only runnerhut-specific line is `runs-on: runnerhut-32vcpu-ubuntu-2404`. Everything else is standard GitHub Actions — the same actions, the same secrets and the same permissions model you use today.
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.