Commit Graph
223 Commits
Author SHA1 Message Date
Pablo Correa Gómez 55a97f8085 ci: fix generation of build-jobs.yaml on devices without kernel variants
The check in Python did not work with devices without kernel variants
due to it returning None and that breaking the has_kernel_variants
check. Fix that, and also adding the kernel variant to install
packages, which was missed. In the process, rename kernels to
kernel_variants. All devices have at least one kernel, but not all
have "variants" :)

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7489>
2026-01-15 07:48:41 +00:00
Pablo Correa Gómez b7de1b3108 ci: enable support for fastboot devices in ci-tron
Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7489>
2026-01-15 07:48:41 +00:00
Pablo Correa Gómez 37ec13a7ee ci: update ci-tron vendored dependencies
This should fix missing logs on error like in
https://gitlab.postmarketos.org/postmarketOS/pmaports/-/jobs/1465845

[ci:skip-vercheck]

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7761>
2026-01-14 15:26:51 -08:00
Pablo Correa Gómez 11e8136f44 ci: fetch ci-common files from "main" branch
Relates https://gitlab.postmarketos.org/postmarketOS/postmarketos/-/issues/122

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7726>
2026-01-14 16:48:52 +00:00
Aelin 38acf0cfdd Build loongarch64 in CI and mark it as supported
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7738>
2026-01-13 14:31:30 +00:00
Aelin 47f342bfcb ci: Use base image from Alpine container registry
Docker does not support loongarch64 for official images yet. Alpine
publishes images for all architectures on their registry, so just use
that instead.

See also https://gitlab.alpinelinux.org/alpine/docker-abuild/-/merge_requests/71

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7738>
2026-01-13 14:31:30 +00:00
Clayton CraftandDylan Van Assche 5971d0f226 main/postmarketos-usb-moded: use a generator to configure UID/GID for umtprd
MTP transfers write files to the home folder of the user.
If no GID and UID are specified, uMTP-responder will use the GID/UID
under which it is running at the time of the file transfer.
This causes users to not be able to access the files on the device after transfering.

This patch adds a systemd generator that:

1) reads /etc/default_user, and appends config to
   /etc/umtprd/umtprd.conf to set the MTP default user/group. If this
   file doesn't exist, 10000:10000 is the fallback uid:gid.
2) installs this config to /run/umtprd/umptrd.conf
3) adds a unit override to /run for umtprd.service that runs the daemon
   with this modified config

The generator is used instead of hardcoding a uid and gid in umtprd.conf
so that this can support immutable installs or situations where the
default UID/GID is not 10000.

Co-authored-by: Dylan Van Assche <dylan@postmarketos.org>
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7658>
2026-01-05 10:15:18 +00:00
Stefan Hansson a652a6f334 CI: Set args.ccache in conftest.py
Fixes CI being broken everywhere:

      File "/builds/postmarketOS/pmaports/.ci/testcases/conftest.py", line 32, in args
        init_args(args)
      File "/tmp/pmbootstrap/pmb/helpers/args.py", line 94, in init
        context.ccache = args.ccache
                     ^^^^^^^^^^^
    AttributeError: 'PmbArgs' object has no attribute 'ccache'

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7670>
2025-12-29 23:37:03 +01:00
Dylan Van Assche c5a8b1b6cd CI: tethering script is removed
usb-moded takes over tethering from NM

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6531>
2025-12-27 22:44:27 -08:00
Pablo Correa Gómez cd5aaf8e9f ci: cache get_base_commit function calls
The commit shall not be updated during a CI run, and this calls git
fetch, which is considerably slow at times. This reduces the git fetch
calls down to 1 from 3 in the generate-build-jobs step.

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 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