313 Commits
Author SHA1 Message Date
Pablo Correa Gómez e41cce98e8 ci: use functools.cache instead of implementing custom cache global
Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7649>
2025-12-27 01:19:44 +00:00
Pablo Correa Gómez 51a7792aac ci: get supported arches from pmbootstrap instead of hard-coding
supported_binary reads the pmaports.cfg file, and if that is changed
in the future, we can be pretty sure we will get what we expect.

Fixes #4195

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7648>
2025-12-26 18:29:12 +00:00
Pablo Correa Gómez 93dfbad7ba ci: remove unused imports
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7590>
2025-12-26 13:29:15 +00:00
Pablo Correa Gómez 41d7b0c4b7 ci: improve dependency resolution in build-jobs.yaml.j2
The gitlab issue is now resolved! Although we still need gitlab 18.6
to test it.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7590>
2025-12-26 13:29:15 +00:00
Pablo Correa Gómez 939405962d ci: fix test_ui failing on removing UI packages
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7498>
2025-12-06 16:50:50 +00:00
Luca Weiss cabfabb88c ci: build_changed_aports: Skip packages in 'archived' category
Per definition, those might not be buildable anymore, so stop trying to
validate building them.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-04 21:00:29 +09:00
Aster Boese 2115bee6b7 ci: disallow installing to /etc/modprobe.d and /etc/modules-load.d
Prevents having to occasionally fix packages installing to these directories instead of their
`/usr/lib` counterparts on accident. Catches these issues in CI instead of manually.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Stefan Hansson d945124004 CI: Don't stop on first Pytest failure
This makes it easier to see everything that needs to be fixed in case of
multiple issues.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7384>
2025-11-26 12:13:25 +00:00
Jens Reidel 6e0d8aa09a ci: Raise pmb timeout to 1 hour
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7391>
2025-11-26 12:05:05 +00:00
Pablo Correa Gómez 6d879111b1 docs: add auto-generated deviceinfo reference
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7414>
2025-11-23 20:26:30 +00:00
Stefan Hansson b47edd33af CI: Remove obsolete deviceinfo validation
This functionality is now handled by dint.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7378>
2025-11-15 18:06:12 +00:00
Stefan Hansson 9f355d95a2 CI: Don't check kconfig for archived kernels
It doesn't make any sense to require people to fix the kconfig just
because they want to move a device into archived or fix some minor issue
in an archived device. So, let's not enforce this on archived devices
since that's supposed to be where broken devices go.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7338>
2025-11-12 23:52:42 +00:00
Stefan Hansson 53a56f7c37 CI: Allow skipping archived in get_changed_packages()
Packages can be moved to archive because they don't meet a certain
quality standard, so it is useful to be able to exclude them from
certain checks as to not block packages from being moved there just
because they don't comply with our standards.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7338>
2025-11-12 23:52:42 +00:00
Clayton Craft 30e0f6d779 ci: deviceinfo_linting: add support for ci:skip-dint
Sometimes we just want to merge when deviceinfo is failing linting (e.g.
when moving a device pkg from a higher category to a lower one)

This should be used sparingly...

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7311>
2025-11-10 19:54:29 +00:00
Jens Reidel a9be71b496 ci: Build docs with Sphinx
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7295>
2025-11-05 11:21:33 +00:00
Clayton Craft 7c137628be ci: shellcheck: add device-apple-mac-aarch64 scripts
There are a few of these, and they're probably complicated enough to
justify shellchecking them.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7112>
2025-10-28 09:38:56 +00:00
Clayton Craft 671da45525 ci: shellcheck: add os-installer's setup script
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7112>
2025-10-28 09:38:56 +00:00
Jens Reidel 5d45751d38 ci: Add tag to skip kconfig checks
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7220>
2025-10-20 19:26:35 +02:00
Robert Eckelmann d251d507d1 CI: correct description of docs build tools
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7151>
2025-10-07 14:30:44 +00:00
Jens Reidel d173406ed9 ci: lib: Run jobs for ppc64le
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7140>
2025-10-04 15:53:42 +00:00
Clayton Craft bde9dca58c ci: apkbuild lint: allow all valid kconfigcheck categories
This only allowed categories that were aliases (and only categories
under those), but stuff like `pmb:kconfigcheck-uefi` was flagged as an
invalid option by the linting.

This change parses aliases AND all categories in the kconfigcheck and
allows those as options.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7101>
2025-10-01 12:11:05 +00:00
Clayton Craft 95a1a60e4b ci: wiki: support only running for changed devices
The device wiki check currently runs for *all* devices in any given
MR, and can sometimes fail (e.g. if someone edits the wiki for some
unrelated device.) It's not fair to block MRs for devices when the
check fails on unrelated devices. This changes the default behavior to
only run on devices that are changed in the branch. This also adds an
`--all` flag that restores the previous behavior, this could be run on
the pmaports master branch to test general compliance for all devices
without blocking MRs where the check fails for unrelated devices.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7098>
2025-09-29 12:46:33 -07:00
Jens Reidel a51ad1e3e3 ci: fix path type in test_aports_ui
pmb.parse.apkbuild expects a Path object as the input type, but we
currently pass it a str. Since we already construct a Path, we can
simplify this and fix a type error encountered upon parsing the
APKBUILD.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7089>
2025-09-26 21:03:23 +02:00
Clayton Craft 2fe8c34193 ci: lib: check_changed_aports_versions: re-add upstream branch
This was effectively dropped in bc3fb78958, but broke later use of the
'upstream' branch.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6703>
2025-09-25 15:22:07 -07:00
Pablo Correa Gómez bc3fb78958 ci: lib: integrate add_upstream_git_remote into get_base_commit
add_upstream_git_remote was just being run at beginning of every
method using get_changed_packages or get_changed_files, to have
upstream available to use get_base_commit. So then, just move it to
get_base_commit. As a positive side-effect, since the previous commit
get_base_commit will just use the gitlab variable if available. So in
CI we will just completely avoid running these two commands!

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7078>
2025-09-25 20:02:53 +00:00
Pablo Correa Gómez 7bf7616490 ci: common: don't run git if we can just get the base sha from gitlab
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7078>
2025-09-25 20:02:53 +00:00
Pablo Correa Gómez 1d6eea7261 ci: common: remove unused import
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7078>
2025-09-25 20:02:49 +00:00
Pablo Correa Gómez 028f417255 ci: pytest.sh: remove unnecessary workaround
The issue has been closed, and the test runs successfully

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7078>
2025-09-25 20:02:46 +00:00
Pablo Correa Gómez b1e18658c2 ci: test_ui: only run for changed ui packages
Previously, this test would 12 to 16 seconds to run locally, and
having it run unconditionally slows CI (it's always the last test in
the pipelines). This commit changes it to only run on changed UI
packages, speeding up the pytest CI by more than 75% in most situations.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7078>
2025-09-25 20:02:46 +00:00
Pablo Correa Gómez ce47303e35 ci: add job to build docs and trigger handbook pipeline for deployment
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7065

[ci:skip-build]: already built successfully in CI
2025-09-24 12:37:31 +02:00
Pablo Correa Gómez ca97b715c7 ci: ignore docs while checking for files in packages
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7065
2025-09-24 12:37:31 +02:00
Stefan Hansson aa74915a68 CI: Add deviceinfo linting via dint
Needs https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2679
to run locally.

Tested and works locally with 'pmbootstrap ci' as well as in GitLab CI.

Closes https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/2583

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7006>
2025-09-20 09:30:46 +00:00
Clayton Craft 39922de34e ci/shellcheck: run on pmos-base-systemd's apk trigger
This trigger has a lot going on, so let's make sure it always passes
shellcheck. It's not picked up by the normal search for triggers in this
script because the actual logic for the trigger is broken out from the
.trigger file.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6892
2025-09-08 07:33:54 -07:00
Clayton Craft 75d8dc9bd2 ci/testlib: add asserts for string contains/doesn't contain substring
For testing if a given string contains a given subtring, for example
`assert_contains "foo bar bazz" "bar"` would pass,
but `assert_contains "foobar bazz" "bar"` would fail.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6892
2025-09-08 07:33:54 -07:00
Clayton Craft 7d84c11c52 ci/testlib: add asserts for file exists/not exists
For testing whether a given file exists or not exists

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6892
2025-09-08 07:33:54 -07:00
Clayton Craft 0fab76b942 ci/testlib: add test root dir support
Allows creating (and cleaning up) a new root dir for tests, for tests
that deal with files on disk

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6892
2025-09-08 07:33:54 -07:00
Stefan Hansson 8321019c7f CI: Stop using 'pmbootstrap lint' for lint job
Needs https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2679

Closes https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3665

Closes https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2566

Closes https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3274

Closes https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2591

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6979>
2025-09-07 16:14:57 +00:00
Pablo Correa Gómez 244d2ab398 ci: do not run downstream pipeline if the bot is the commiter
The reviewers are responsible to check that the pipeline actually
built and run successfully. The bot has the option to skip the
pipeline completely, but that means we also skip the checks about
bumping pkgver and pkgrel, which means some rebases could cause
issues. Since there is no straight-foward way to make the bot add
"[ci:skip-build]" to the commit message, then we can actually do this
check instead.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6963>
2025-08-28 20:02:26 +00:00
Pablo Correa Gómez 88b1b45879 ci: move check for package counts to where it is used
common is otherwise over-used with things with very little
consumers. So reduce the list by moving the
get_changed_packages_sanity_check to check_changed_aports_versions,
which is the only user. In the process, also rename it to make it more
clear what it's used for: check_package_count

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6963>
2025-08-28 20:02:26 +00:00
Pablo Correa Gómez c83457fed4 ci: don't re-do packages check in build_changed_aports
Since 218d0b1745 the pipeline is created
dynamically. This check already exists in the "commits" lint job. So
let's avoid duplicating it.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6963>
2025-08-28 20:02:23 +00:00
Pablo Correa Gómez 9efda70d16 build-jobs: use parallel:matrix instead of copy-pasting job definitions
This has the additional benefit that the job is always defined, and
then we can just add the placeholder as any other job

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6693
[ci:skip-build]: already built successfully in CI
2025-08-13 12:59:38 +02:00
Martin Roukala (né Peres) a0fd5e421c ci: add support for building and testing device boot images
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6696
2025-07-30 12:54:24 +02:00
Martin Roukala (né Peres) dd643bff2a ci: ignore "gitlab-ci.yml.j2" files in packages
These files are meant for hardware CI and are unrelated to the actual
package.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6696
2025-07-30 12:54:24 +02:00
Pablo Correa Gómez 0257d1ee5c build-jobs: expose the locally-generated key as an artifact
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6696
2025-07-30 12:54:24 +02:00
Oliver Smith 9481543b7b CI: add cross-gcc-tests
When upgrading our cross gcc packages, build some packages with them to
ensure they work as expected.

Put the gitlab-ci.yml in cross/ instead of cross/gcc-x86_64, because:
* it tests gcc-aarch64 too
* so it does not get removed when regenerating gcc-x86_64 with
  pmbootstrap

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6776
2025-07-15 08:32:56 +02:00
Luca Weiss 76b33cdb15 ci: wiki: Use https in URLs
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6719
2025-07-11 22:20:55 +02:00
Luca Weiss 947b2d6bba ci: wiki: Use pathlib instead of os.path
Pathlib is the modern way to use

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6719
2025-07-11 22:20:55 +02:00
Luca Weiss 0973c059e5 ci: wiki: Add type hints
For one of the urllib responses, we need to make it a bit more explicit
that urlopen returns a bytes object - as per Python documentation. Not
sure why mypy needs some extra help there.

Checked with "mypy --strict".

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6719
2025-07-11 22:20:55 +02:00
Luca Weiss 6f8ce18d96 ci: wiki: Resolve some pylint warnings
Use resource management with urllib.request.urlopen, and move a print
out of an unnecessary "else" since the line before returns anyways.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6719
2025-07-11 22:20:50 +02:00
Oliver Smith 82555b8ade CI: test_aports_ui: fix systemd + armhf dep case
Fix the following error that now appears as the systemd-enabled
gnome-keyring package in pmaports will not be built for armhf:

  main/postmarketos-ui-xfce4/APKBUILD: package 'gnome-keyring' from _pmb_recommends not found for arch 'armhf'

This happened, because before this patch pmb.helpers.package.get() would
return the pmaports version of the package (!armhf) instead of the one
in the binary packages from alpine (alpine one is available for armhf),
and then later check the arches of the returned package and fail because
it is not enabled for armhf.

With the patch, the binary package from alpine repos is returned as the
pmaports one is ruled out due to not being available for armhf. The
latter arch check is not necessary anymore and gets removed.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6710
2025-06-29 23:08:43 +02:00