Commit graph

17 commits

Author SHA1 Message Date
Clayton Craft
17720fa870
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
2021-03-11 19:40:43 +01:00
Oliver Smith
45657e430c
CI: bump copyright to 2021 2021-01-08 00:16:08 +01:00
Oliver Smith
3731ba09ea
CI: build_changed_aports: fix checksum for 0 pkgs (MR 1705)
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
2020-11-11 22:49:10 +03:00
Oliver Smith
e5b8b8631f
CI: build packages on all arches (MR 802)
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>
2020-09-10 22:22:57 -07:00
Oliver Smith
388e593ab1
Change copyright to 2020 2020-01-06 02:47:56 +01:00
Oliver Smith
debf530c78
CI: add common.py (from build_changed_aports.py)
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
2019-05-24 22:48:05 +02:00
Oliver Smith
21852b3cc6
CI: verify sources when ci:skip-build (!371)
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
2019-05-24 19:37:13 +00:00
Oliver Smith
1031ff82a6
CI: enable crossdirect again
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.
2019-04-14 04:11:01 +02:00
Oliver Smith
6e3252e401 CI: disable crossdirect for now (!301)
Disable it, until more bugs are ironed out (see pmaports issues,
everything related to crossdirect that is still open). Will be enabled
again soon.
2019-04-06 00:17:55 +02:00
Oliver Smith
946328507b CI: add "ci:ignore-count" and "ci:skip-build" (!210)
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.
2019-02-28 09:34:43 +01:00
Oliver Smith
b95b73e26c
Update copyright to 2019
Happy new year! \o/
2019-01-02 09:29:47 +01:00
Oliver Smith
6179f45791
build_changed_aports: allow existing remote
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.
2018-12-13 07:35:58 +01:00
Oliver Smith
683bc62f96
build_changed_aports: don't build deleted aports
Do not attempt to build deleted aports and fail on them. In the
overview of changed files, note which ones have been deleted.
2018-12-13 07:35:58 +01:00
Oliver Smith
c7b42e9ed6
Cosmetic: build_changed_aports: improve comments
* 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).
2018-12-13 07:35:58 +01:00
Oliver Smith
36f4e86688 CI package build: don't buffer output and silent "git fetch" 2018-09-26 05:57:29 +00:00
Luca Weiss
25380ced2f Fix detecting changed aports 2018-09-25 05:29:15 +00:00
Oliver Smith
0d5e2fae31
Add test cases and .gitignore
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>
2018-09-04 08:46:17 +02:00