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/1087602863https://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
When using '[ci:skip-build]' without any changed packages, do not
attempt to run "pmbootstrap checksum" without any package arguments.
This may happen, because CI in MRs runs across all patches in the MR,
but CI on branches (master, v20.05) only run on the last commit.
Prevents CI failures like this one:
9a48b41a23
Split the aports-build job into arch-specific build-x86_64,
build-aarch64, ... jobs. Extend build_changed_aports.py to accept the
architecture as argument, and to build all packages for that arch where
possible.
Import and use pmbootstrap code for APKBUILD parsing etc, as we do this
already in various testcases running in this repository.
Co-Authored-By: Bart Ribbers <bribbers@disroot.org>
Move most code from build_changed_aports.py to common.py. Another patch
will follow soon, which uses common.py to check the versions of changed
aports.
Related: #187
Instead of simply skipping the build check, when ci:skip-build is in
the last commit message (in brackets), download the sources and verify
their checksums.
Depends: pmbootstrap!1788
All bugs should be ironed out now. Let's get some more testing by
enabling crossdirect in CI again. The crossdirect feature is still only
in pmbootstrap master, not in the latest pmbootstrap release. But if it
works without problems for some time, we're ready to make a release.
This reverts commit 6e3252e401.
Allow skipping the "too many packages changed" check by specifying
"ci:ignore-count" in the commit message.
Allow skipping the package build step by specifying "ci:skip-build"
in the commit message. In contrary to the usual "skip ci" method,
this will still run all the other CI checks.
In this CI test, we add the upstrem postmarketOS/pmaports.git
remote to the checked out git repository. Do not crash when it exists
already, so we don't need to remove it before each run when testing
locally.
* Move a comment that was after a line of code above that line. That
line was very long compared to all others in the file, and now the
file fits in 80 characters in every line, like PEP-8 recommends.
* Replace "folder" with "dir" in the comments (as I learned lately
that "folder" is only a Windows concept).
Copy all test cases from the pmbootstrap repository, that are actually
testing the aports. They were all adjusted to work nicely in this
repository, together with a brand new set of gitlab-ci configs.
This also includes the changes from this merge request, that had a
better detection of changed packages:
<https://gitlab.com/postmarketOS/pmbootstrap/merge_requests/1621>