Speed up CI: skip QML cachegen and debug info, cache builds, prebuilt image #20

Closed
opened 2026-11-14 02:25:03 +07:00 by tri · 1 comment
Owner

CI takes about 5 min 10 s per PR on vm-201 (2 vCPU, Xeon Silver 4210):

Step Time
pacman -Syu (420 MB of packages) 1 min 27 s
cmake --build 3 min 28 s
ctest 10 s

About half of the build CPU goes to qmlcachegen compiling the 39 QML files into C++. The CI tests do not load QML.

Clean builds measured locally, pinned to 2 cores to match vm-201. vm-201 is about 2.2× slower per core.

Config 2 cores (local) Estimated on vm-201
Current (Debug) 95 s 208 s (measured)
-DQT_QML_NO_CACHEGEN=ON 50 s ~110 s
+ no debug info (-DCMAKE_CXX_FLAGS_DEBUG=-O0) 39 s ~86 s
+ -DCMAKE_UNITY_BUILD=ON 35 s ~77 s (small gain)
Current, 4 cores 59 s ~130 s
Current, 8 cores 34 s ~75 s

Plan, in order of payoff:

  • CI configures with QT_QML_NO_CACHEGEN=ON and no debug info. Release and AUR builds keep cachegen.
  • ccache, kept between runs with actions/cache. Not measured yet; it should help most on PRs that touch few files.
  • paths-ignore for docs-only changes (README.md, LICENSES/).
  • A prebuilt CI image (Arch with the build deps) in the Gitea container registry, rebuilt weekly, to skip the ~1.5 min pacman step.
  • (infra) Give vm-201 4–8 vCPUs. The host has 10 cores / 20 threads. Not possible: we have no admin access to the VM host.

Estimated CI time per PR: ~3 min 20 s after the first item, ~2 min with the prebuilt image, and ~1 min 15 s with 4 vCPUs as well.

The Oracle ARM runners (4 cores, 23 GB each) are not an option while CI uses Arch, which has no arm64 image. Fedora works on arm64, but dnf install alone took 17 min there.

CI takes about 5 min 10 s per PR on vm-201 (2 vCPU, Xeon Silver 4210): | Step | Time | | --- | --- | | `pacman -Syu` (420 MB of packages) | 1 min 27 s | | `cmake --build` | 3 min 28 s | | `ctest` | 10 s | About half of the build CPU goes to qmlcachegen compiling the 39 QML files into C++. The CI tests do not load QML. Clean builds measured locally, pinned to 2 cores to match vm-201. vm-201 is about 2.2× slower per core. | Config | 2 cores (local) | Estimated on vm-201 | | --- | --- | --- | | Current (Debug) | 95 s | 208 s (measured) | | `-DQT_QML_NO_CACHEGEN=ON` | 50 s | ~110 s | | + no debug info (`-DCMAKE_CXX_FLAGS_DEBUG=-O0`) | 39 s | ~86 s | | + `-DCMAKE_UNITY_BUILD=ON` | 35 s | ~77 s (small gain) | | Current, 4 cores | 59 s | ~130 s | | Current, 8 cores | 34 s | ~75 s | Plan, in order of payoff: - [x] CI configures with `QT_QML_NO_CACHEGEN=ON` and no debug info. Release and AUR builds keep cachegen. - [x] ccache, kept between runs with `actions/cache`. Not measured yet; it should help most on PRs that touch few files. - [x] `paths-ignore` for docs-only changes (`README.md`, `LICENSES/`). - [x] A prebuilt CI image (Arch with the build deps) in the Gitea container registry, rebuilt weekly, to skip the ~1.5 min `pacman` step. - [ ] ~~(infra) Give vm-201 4–8 vCPUs. The host has 10 cores / 20 threads.~~ Not possible: we have no admin access to the VM host. Estimated CI time per PR: ~3 min 20 s after the first item, ~2 min with the prebuilt image, and ~1 min 15 s with 4 vCPUs as well. The Oracle ARM runners (4 cores, 23 GB each) are not an option while CI uses Arch, which has no arm64 image. Fedora works on arm64, but `dnf install` alone took 17 min there.
Author
Owner

Note

🤖 Claude Opus 5.5 responding on behalf of tri

Done in #22: CI per PR went from about 5 min 10 s to 1 min 49 s with a cold ccache and about 25 s with a warm one (runs 328, 332, 346).

The vCPU item for vm-201 is not done. It is an infra change outside the repo, and CI is already well under the estimate for 4 vCPUs.

> [!NOTE] > 🤖 **Claude Opus 5.5 responding on behalf of tri** Done in #22: CI per PR went from about 5 min 10 s to 1 min 49 s with a cold ccache and about 25 s with a warm one (runs 328, 332, 346). The vCPU item for vm-201 is not done. It is an infra change outside the repo, and CI is already well under the estimate for 4 vCPUs.
tri closed this issue 2026-11-14 10:42:51 +07:00
Sign in to join this conversation.