Skip to content
Snippets Groups Projects
Verified Commit 17720fa8 authored by Clayton Craft's avatar Clayton Craft :speech_balloon: Committed by Dylan Van Assche
Browse files

gitlab-ci: disable ccache when building changed aports (MR 2020)

This disables ccache in the CI when building packages. I think ccache is
not necessary since the CI will never build a package twice in the same
pipeline, and ccache dir is not preserved for use between pipelines.
There is a real time cost to compiling with ccache enabled on the
initial compile (compressing objects for cache, etc), and some testing
with building the linux-purism-librem5 kernel in the CI shows this cost
can be significant... ~160 minutes when ccache is enabled vs ~105
minutes when it is disabled with this patch.

kernel compile CI runs referenced:
https://gitlab.com/postmarketOS/pmaports/-/jobs/1087602863
https://gitlab.com/postmarketOS/pmaports/-/jobs/1087956999

Some testing on my laptop using osk-sdl with and without ccache for
initial compile:

ccache disabled:
$ rm _build -r && CCACHE_DISABLE=1 meson _build >/dev/null && CCACHE_DISABLE=1 time meson compile -C _build
ninja: Entering directory `_build'
[10/10] Linking target osk-sdl
7.76
$ rm _build -r && CCACHE_DISABLE=1 meson _build >/dev/null && CCACHE_DISABLE=1 time meson compile -C _build
ninja: Entering directory `_build'
[10/10] Linking target osk-sdl
7.89
$ rm _build -r && CCACHE_DISABLE=1 meson _build >/dev/null && CCACHE_DISABLE=1 time meson compile -C _build
ninja: Entering directory `_build'
[10/10] Linking target osk-sdl
7.71

ccache enabled:
$ rm /tmp/ccache _build -r && CCACHE_DIR=/tmp/ccache meson _build >/dev/null&& CCACHE_DIR=/tmp/ccache time meson compile -C _build
ninja: Entering directory `_build'
[10/10] Linking target osk-sdl
8.62
$ rm /tmp/ccache _build -r && CCACHE_DIR=/tmp/ccache meson _build >/dev/null&& CCACHE_DIR=/tmp/ccache time meson compile -C _build
ninja: Entering directory `_build'
[10/10] Linking target osk-sdl
8.46
$ rm /tmp/ccache _build -r && CCACHE_DIR=/tmp/ccache meson _build >/dev/null&& CCACHE_DIR=/tmp/ccache time meson compile -C _build
ninja: Entering directory `_build'
[10/10] Linking target osk-sdl
8.54
parent 8b70a0c0
No related branches found
No related tags found
No related merge requests found
Pipeline #192543 passed
......@@ -15,8 +15,9 @@ import pmb.helpers.pmaports
def build_strict(packages, arch):
common.run_pmbootstrap(["build_init"])
common.run_pmbootstrap(["--details-to-stdout", "build", "--strict",
"--force", "--arch", arch] + list(packages))
common.run_pmbootstrap(["--details-to-stdout", "--no-ccache", "build",
"--strict", "--force",
"--arch", arch, ] + list(packages))
def verify_checksums(packages, arch):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment