Commit graph

61 commits

Author SHA1 Message Date
Oliver Smith
f9ef1ba850
CI: kconfigcheck.toml change: check all kernels (MR 5391)
When the kconfigcheck.toml file changes, let CI check all kernels
against the modified kconfigcheck.toml file.
2024-07-29 19:57:03 +02:00
Caleb Connolly
c4c6a222c4
CI: use more gitlab.com runners (MR 5236)
We have access to the fancy runners since GitLab.com donate premium to
us. There's no downside to making the most of them while we can. We
don't depend on them, but they'll make our CI go zoom!

For the next few months until we migrate to self-hosted :D

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-07-11 23:05:55 -07:00
Caleb Connolly
d934985209
CI: implement scheduled auto-update pipeline (MR 4967)
Introduce support for having CI automatically update packages using
project access tokens and scheduled pipelines.

The pipeline schedule is configured with an additional variable
containing a list of packages to update, the autoupdate-fetch.sh script
then calls a handler for each of these, the handler is expected to check
for an update, make the necessary APKBUILD changes and commit them.

After all packages have been updated, the changes are pushed to pmaports
master using a project access token.

[ci:skip-build] takes too long to build in CI
2024-06-19 22:45:20 +02:00
Stefan Hansson
fcf8026c83
CI: use latest (stable) Alpine instead of Edge (MR 5174)
Alpine 3.20 has released now which should contain everything we need to
run our CI.

Closes https://gitlab.com/postmarketOS/pmaports/-/issues/2747
[ci:skip-build]: already built successfully in CI
2024-05-27 13:33:23 -07:00
Stefan Hansson
5db3273820
CI: stop adding testing repository to Ruff check (MR 5039)
Ruff is now in community in Alpine Edge.

[ci:skip-build]: already built successfully in CI
2024-05-01 00:54:49 +02:00
Stefan Hansson
3249af6333
CI: run wiki check on changed .gitlab-ci.yml (MR 5039)
Useful to check that changes to the CI definition actually work.
2024-05-01 00:54:49 +02:00
Vitaliy Ognev
b8f8f8dec1
ci: always update docker image packages (MR 5038) 2024-04-16 09:46:11 +03:00
Caleb Connolly
fb8851447b
CI: port to rules (MR 4966)
Rules are the new and much more configurable way to handle conditionally
enabling jobs. Replace the old "only" keyword usage with equivalent
rules.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-03-30 14:40:28 +00:00
Stefan Hansson
e3b8f656b4
CI: do ruff check when .gitlab-ci.yml changes (MR 4838)
To ensure that the check still works after .gitlab-ci.yml changes.
2024-02-18 19:39:20 +00:00
Stefan Hansson
8ff400c128
CI: remove unnecessary apk add (MR 4838)
This happens later in ruff.sh anyway.
2024-02-18 19:39:15 +00:00
Stefan Hansson
73b1a493b9
ci: replace Flake8 with Ruff (MR 4741)
See similar patch in pmbootstrap for rationale:
27618d5ffd

W504 ignore is removed as the rule does not exist in Ruff. But, since it
was ignored anyway, this does not matter.
2024-01-19 18:06:09 +01:00
Stefan Hansson
57aa208435
ci: switch Alpine from latest stable to Edge (MR 4741)
We use this in pmbootstrap, and it is currently necessary to use Ruff.
Issue about moving Ruff to community:
https://gitlab.alpinelinux.org/alpine/aports/-/issues/15693
2024-01-19 18:05:58 +01:00
Luca Weiss
e5c26d38f8
CI: add CODEOWNERS file sanity check (MR 4662)
* Check for space indentation instead of tabs
* Check that an entry actually exists
* Check that a directory ends in a slash, otherwise GitLab seems to
  ignore it
2023-12-29 15:02:10 +01:00
Oliver Smith
a1242ed35e
CI: implement distfile-check as python test (MR 3608)
Reimplement the distfile-check as python test inside this git
repository, so we don't need to download a tarball of ci-common.git to
run it. This would not have been nice for running the test with
'pmbootstrap ci', as we don't want it to get downloaded every time the
test runs.

This new implementation is done in less than 40 lines of code, very fast
and doesn't need to create a lot of files in /tmp to build a
"distfiletree".
2022-11-17 19:10:56 +01:00
Oliver Smith
6dbe4fdc31
CI: move_logs.sh: put in .ci/lib (MR 3608) 2022-11-17 19:10:56 +01:00
Oliver Smith
196abb1575
CI: kconfig adjust for 'pmbootstrap ci' (MR 3608) 2022-11-17 19:10:56 +01:00
Oliver Smith
da52dace85
CI: adjust .ci/common.py users to pmbootstrap ci (MR 3608)
Adjust all CI scripts that make use of .ci/common.py to
'pmbootstrap ci'. Move all scripts that are not direct entry points to
running CI scripts to .ci/lib.

Comment out the dtb check, as it is failing. Apparently it didn't run
properly before. Let's fix this after this CI change is done.
2022-11-17 19:10:56 +01:00
Oliver Smith
8f78988b33
CI: editor-config: adjust for 'pmbootstrap ci' (MR 3608) 2022-11-17 19:10:56 +01:00
Oliver Smith
c88cfa516f
CI: shellcheck: adjust for 'pmbootstrap ci' (MR 3608)
Split out the grep for CHANGEME into a separate .ci/grep.sh script, as
it's not related to shellcheck and also there's another grep check that
I'll move there in a follow-up patch.
2022-11-17 19:10:56 +01:00
Oliver Smith
613aa1c68a
CI: flake8: adjust for 'pmbootstrap ci' (MR 3608) 2022-11-17 19:10:56 +01:00
Oliver Smith
a2f75963bf
CI: wiki: adjust for 'pmbootstrap ci' (MR 3608)
Add a wrapper .ci/wiki.sh, that pmbootstrap ci can run and use it in
gitlab-ci.yml. Add a .ci/lib/gitlab_prepare_ci.sh script that makes a
user available with sudo, as expected by the pmbootstrap ci compatible
scripts. Set up binfmt_misc too while at it, it will be needed for
running pmbootstrap.

The next patches will adjust the rest of the CI scripts and move the old
scripts in the .ci/lib dir, so only the scripts that should be called
directly are in the .ci dir.

Related: https://postmarketos.org/pmb-ci
2022-11-17 19:10:56 +01:00
Luca Weiss
8c19bf2f9b
CI: add riscv64 (MR 3566)
Now that we have the cross compilers in place, make the CI build riscv64
as well.
2022-10-26 20:56:18 +02:00
Anjandev Momi
e7a8141113
CI: check if most text files have final_newline and conform to editorconfig (MR 3530)
fixes #592
2022-10-16 16:27:25 +02:00
Newbyte
60d4821f68
CI: add dtb location check (MR 3254)
[ci:ignore-count]: Too many packages probably
[ci:skip-build]: No way this would finish in time
2022-10-09 17:04:36 +02:00
Oliver Smith
11682fb0ab
gitlab-ci.yml: set timeout for build to 10h (MR 3337)
A common issue is that building kernels takes longer than the default of
1h, and then MR authors need to adjust the timeout in their pmaports
fork and run it again. By setting this option this is hopefully no
longer the case.

I set it to 10h because that's what we currently have set in the
postmarketOS gitlab configuration and it would allow building MRs for
service packs with multiple kernels.

pmbootstrap has logic built in to detect stale builds - by default it
will stop a build if there was no output for 15 minutes. So having a
large timeout shouldn't be a problem.
2022-08-03 09:24:35 -04:00
Newbyte
70be414133
CI: use shellcheck from Alpine again (MR 2691)
Shellcheck is back in Alpine's repos.

This reverts commit 80e35c5eb0.
2021-11-18 18:22:29 +01:00
Oliver Smith
80e35c5eb0
CI: download shellcheck as static binary (MR 2673)
Adjust to shellcheck removal in Alpine. Currently it's still in edge for
x86_64, but installation fails with:

  ERROR: unable to select packages:
    so:libffi.so.7 (no such package):
      required by: shellcheck-0.7.2-r1[so:libffi.so.7]

Use the official static binary release from shellcheck instead of the
Alpine package. Version 0.7.2 is intentionally used instead of latest
8.0.0, since the latter generates a new warning. Let's unbreak CI first
before adjusting to a newer shellcheck version.

Related: https://lists.alpinelinux.org/~alpine/devel/%3C20211021133615.32f08070%40ncopa-desktop.lan%3E
2021-11-10 08:26:42 +01:00
bo41
ef0117cc4e
CI: rename ci folder to consistent naming (MR 2514)
part of https://gitlab.com/postmarketOS/postmarketos/-/issues/26
2021-09-14 09:36:39 +02:00
Oliver Smith
1610a605ec
CI: shellcheck: remove apk upgrade command (MR 2511)
CI is currently failing at the "apk upgrade" line with the following
error. It must be related to the openssl3 transition that is going on in
Alpine:

485B6261A57F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1882:
ERROR: musl-1.2.2-r6: Permission denied
485B6261A57F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1882:
ERROR: busybox-1.34.0-r3: Permission denied
485B6261A57F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1882:
ERROR: musl-utils-1.2.2-r6: Permission denied

So let's get rid of it. It shouldn't be needed to install shellcheck
anyway.
2021-09-12 18:55:12 +02:00
Oliver Smith
743c3eda7e
Revert "CI: skip armhf, x86 build on stable branches (MR 2024)"
This does not work as expected, CI doesn't run for x86 and armhf on
master too. An attempt to fix this was made in MR 2030, but it didn't
work as expected and it's not worth looking into this further right now.

This reverts commit d695455f08.
2021-03-14 21:29:05 +01:00
Oliver Smith
d695455f08
CI: skip armhf, x86 build on stable branches (MR 2024)
Don't try to build for arches where we don't have a binary repository on
stable branches.
2021-03-13 02:30:45 +01:00
Oliver Smith
816616c9de
CI: rename stages "first, second" to "lint, build" (MR 802)
Make it more descriptive and match Alpine's gitlab-ci.yml.
2020-09-10 22:22:57 -07: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
204a56c095
CI: add distfile-check (MR 1388)
Verify that each distfile has the same hash in a directory full of APKBUILDs.

I've considered merging the new job with aports-static, but since there
are quite a few setup steps, it would make the .gitlab-ci.yml less
readable.

Related: https://gitlab.com/postmarketOS/ci-common/-/blob/master/distfile-check/README.md
2020-07-08 18:05:32 +02:00
Oliver Smith
76b3512a1c
CI: aports-static: remove redundant apk add git (MR 1388)
install_pmbootstrap.sh is already installing git, and that line can be
used to install additional dependencies (as done currently with pytest).
2020-07-08 18:05:32 +02:00
Oliver Smith
24b83e2415
CI: use check_mr_settings.py from ci-common.git (MR 1320) 2020-06-17 16:29:34 +02:00
Raatty
86c6ce9ad0
CI: store built apks as artifacts (MR 1264) 2020-06-10 12:54:51 +02:00
Daniele Debernardi
5ead73e86c
CI: use pmbootstrap lint for checking packages (MR 1132) 2020-04-18 11:50:02 +02:00
Oliver Smith
8f79b6f5b2
CI: use install-pmbootstrap.sh from ci-common repo (MR 1147)
This script is used by multiple repositories by now, let's make sure we
only have one place where we need to maintain it. The version in
ci-common is shellchecked and displays less output for 'pmbootstrap
init' again (unless it fails, then it shows the whole log).
2020-04-14 00:43:44 +02:00
Oliver Smith
ff3fbfdb4e
CI: run flake8 for changes in testcases too (!1069) 2020-03-21 22:35:42 +01:00
Oliver Smith
0e5ba649a5
CI: remove upstream compatibility checks (!1085)
Do not run upstream compatibility checks whenever pushing to master.
This is confusing, because if the upstream compatibility check fails,
then it appears that the last patch was broken in some way although it
isn't related.

I've moved the upstream compatibility checks to a separate repository
already, and added a badge to the pmaports gitlab project that indicates
whether they are currently succeding or not. The checks run hourly now.

Related: https://gitlab.com/postmarketOS/monitoring
Fixes: #457
2020-03-21 18:21:16 +01:00
Minecrell
2bfba9106a
CI: update for device/* -> device/testing/* move (!1067) 2020-03-14 09:41:26 +01:00
Alexey Min
1110dab8d5
CI: allow failure for aport linting check 2020-01-13 17:01:01 +03:00
Bart Ribbers
7c31d47745
CI: skip linting check for temp/ folder (!864)
Since we copy these aports directly from Alpine and try to keep them in
sync, we don't want to differ from upstream because our CI doesn't pass
on linting. If the APKBUILD should be improved, it should be done
upstream which is then synced back to us.
2020-01-09 02:40:38 +03:00
Bart Ribbers
7a359510b1
CI: enable APKBUILD linting (!860) 2020-01-06 07:46:00 +01:00
Bart Ribbers
365255c193
CI: split out kconfig check and only run when kernel package has changed (!738) 2020-01-05 19:52:45 +01:00
Bart Ribbers
c4ab1c5c69
CI: fix wiki test (!737)
Run it even if the last commit in the MR does not touch
device/device-*.
2019-11-20 20:58:31 +01:00
Bart Ribbers
a92c06bfea
CI: fix incorrect py-flake8 package name (!736) 2019-11-13 22:02:28 +01:00
Bart Ribbers
81872a59c1
CI: only use Alpine edge image for the shellcheck task (!733) 2019-11-10 13:41:16 +01:00
Bart Ribbers
1b2b3baad1
CI: update Docker image before we do anything (!731)
This resolves issues like broken Python versions
2019-11-09 17:14:01 +01:00